In this article we learn using Adzap with Squid proxy server,we'll see how to install and start using Adzap.
Cameron Simpson's Adzap (http://adzapper.sourceforge.net) is a Perl program written to match and replaces those annoying web ads.It uses the redirector option of Squid proxy-caching server (http://www.squid-cache.org), a fast and efficient caching server.
How does Adzap work?
Squid proxy server is designed to cache web content as clients requests,it checks for presence of local copy of request, if found servers it directly.This not only saves bandwidth usage but accelerates web speed.
Squid redirects requested URL to adzapper program which tries to identify ads,unrequested pop-up widows and other unsolicited content using regular expressions.
Most of content such as graphics,flash animations,client-side scripts and executables are matched and quietly replaced.Adzap returns sanitized request back to squid which servers it.This increases the surfing speeds considerably even if you are on boardband connection.
Most commercial web advertisers track user preferences and surfing habits.Adzap protects your privacy by efficiently blocking such ads from loading.
How do you install Adzap?
You can download the latest version of Adzap from http://adzapper.sourceforge.net.
Uncompress the the Adzap files to your /usr/local/ directory.If you use any other directory,please do change the commands in this article.
$ tar zxvf adzap-20030726.tar.gz -C /usr/local/
Change your directory to /usr/local/adzap.All the adzap programs are found under the scripts directory.
$ cd /usr/local/adzap/
Edit the scripts/wrapzap file and set the zapper to squid_redirect.You can customize the Adzap to suit your needs in this file.
Configure the squid to use Adzap as its redirector program.The squid configuration file in most *nix's is /etc/squid/squid.conf.Set the redirect_program option as mentioned.
Restart the squid server.
$ /etc/init.d/squid restart
Check the /var/log/squid/cache.log for any errors.Start your favorite browser and point it towards your squid server and enjoy ad free surfing.
Rakesh 'arky' Ambati is a Red Hat Certified Engineer interested in Free Software movement (http://www.fsf.org),he spends time working on technical writing for http://www.grmtech.com and coordinating with local Free Software Community activities. He lives in Bangalore,India.