We're now getting down to the big hitters in the list – tools that can not only block content but also manipulate it at will as if webpages were putty.
But before we can get into the juicy business of blocking ads and banners, forcing YouTube Safety Mode and Google/Yahoo SafeSearch and rewriting content on the fly, we must handle the somewhat tricky and long-winded installation process.
Chances are, SafeSquid isn't on offer via the software repositories of your distribution, so the first step is to download one of the many free versions available. For most users, the all-purpose SafeSquid Free Composite Edition Version SR.4.2.2 will do just fine.
While on the SafeSquid website please also register on the forum boards. The installation process makes this a necessity – you'll need to use your registered email after installation for the one-time SafeSquid activation.
When SafeSquid is installed, point your browser to http://safesquid.cfg/ to begin configuring it to filter content. You should review each of the tutorials listed on the Documentation page for SafeSquid, otherwise you'll have difficulty creating your own filters.
The Downloads page lists various sample rules for filtering keywords, blocking ads and such, and you can easily import any of these using the Load Settings option from the http://safesquid.cfg page.
If you wish to impose time restrictions on the users, select Limits from the Select A Section To Configure drop-down list and click Submit. You can then specify month, day, hour and even minute ranges. You can also limit upload and download speeds and the tooltips explain each of the options, so you can't go wrong.
Unless you're absolutely sure of what you're doing, it's best to steer clear of the Rewrite Document section. If misconfigured, instead of blocking pop-ups, and Java scripts, you may well make pages unreadable.
Despite a browser interface, for certain types of rules you're required to create entire files from scratch.
Of all the tools we've covered thus far, Privoxy makes it the easiest to modify and add new filters. Most distributions provide Privoxy through their software repositories.
Once installed, you can start the privoxy daemon with: etc/init.d/privoxy start
After some configuration you'll be able to access Privoxy's user interface by pointing your browser to http:// config.privoxy.org or http://p.p/. From this page you can look up the current configuration settings and also read the Documentation file. We recommend that you browse this to get a hang of just what all Privoxy can do.
There are three main configuration files stored in the etc/privoxy/ directory, which regulate how Privoxy modifies the content on the pages you browse. The main configuration file is called config.
Of all the settings within, you need only be concerned with a few, such as enforce-blocks, enable-editactions etc. Privoxy lets you control web pages in two ways: actions and filters.
The default.action file covers the rules for just about everything and shouldn't be modified. You only need to interact with the user.action file, which takes precedence over the other action files because it gets loaded last. You can turn actions on and off using the + or the - signs. A +block for instance means 'block the following' and a -block means 'allow the following'.
Edit files via a browser
Privoxy enables you to edit its configuration files via the browser interface itself. This feature is disabled by default but can be easily enabled by editing the config configuration file.
Browse to section 4.5 of the config file, titled – enable-edit-actions – and change the enable-edit-actions 0 line so that it reads enable-edit-actions 1. Save the file when you're done.
When you now access the http://config.privoxy.org/show-status page, you'll notice an Edit button next to the files currently in use. Needless to say, users on the network shouldn't be allowed to edit the configuration files.
The following code snippet is all it takes for Privoxy to rid you of popups:
# Kill OnUnload popups.
Perl's s /// operator in operation here can be used in similar fashion to effectively substitute words from a page if you so wish.
One of the most popular setups is using Privoxy with Tor. The Tor network is a network of relays run by volunteers spread across the world. You access the network by installing an onion proxy software (also called Tor) on your own machine.
The idea is to use many different nodes in the network before messages finally reach the destination. Tor uses encryption to protect the data and its origin from each of the nodes in the network. Effectively, from the final destination's POV, the traffic originated at the exit node.
The reason Tor and Privoxy chaining is popular is because it allows you to bypass censorship. If websites have blocked your ISP or if your ISP has blocked some websites, this setup can provide you access regardless of the block. Fight the power!
Price: Free under GPL
Privoxy is highly customisable, easy to set up, has good documentation and is fun to work with. Use it!