How To Set Up Privoxy Ad Filtering For Leopard
2008-02-29
I use Privoxy to filter ads and other assorted nasty stuff. It runs as a proxy HTTP server, so I set up my computer so that all my HTTP traffic is channeled through it rather than going directly to the web. The Leopard version is a little different from the Tiger version and it took a while to figure out how to make it work.
First I download Privoxy. There are two pieces, the utility and the application itself. I go to the download page and under the Mac OS X section selected Privoxy 3.0.8 Universal and the PrivoxyUtility.
Then, having unpacked them I instal Privoxy and run the utility to start Privoxy running. In the system preferences I go to Network, selected my Ethernet port and click on Advanced.... to set up the Proxy tab like this:

Now all accesses by applications that use the system proxy settings will go through IP address 127.0.0.1 (my local machine) at port 8118 where Privoxy is listening. I also set up HTTPS the same way. This setting does not affect Firefox because Firefox ignores the system and has its own proxy settings.
Done. Privoxy is now filtering ads.
But sometimes I want to turn it off, or make certain sites bypass the filtering. Configuration changes are done through a web browser. By going to a special URL (http://config.privoxy.org/) I can change the way Privoxy runs. The problem I found is that by default the Leopard version does not allow configurations to be changed this way: configuration change options are missing from the page.
From the available information, it is not obvious where the global configuration file for Privoxy is located. I had to look at the installer code to learn that it is in /usr/local/etc/privoxy. I use the Finder's Go menu and selected Go to Location... to open that folder and then drag the file config onto TextWrangler. I set the string enable-remote-toggle to 1. That allows Privoxy to be turned on and off via the http://config.privoxy.org/ address. I also set enable-edit-actions to 1 so I can reconfigure the filters.
To make the configuration file change have any effect I stop and then start Privoxy via the Privoxy Utility:

Now I get the option to toggle Privoxy on and off:

The first line gives me the ability to add web sites that I want to block or allow:

In the user.action file I can add lines to allow content through. The web interface shown above just makes it a little easier than editing raw text files.
Editing the raw files involves adding and changing lines like these:
# Allow all cookies from these sites
{ allow-all-cookies }
.smugmug.com
# Turn off filtering for these sites
{-filter }
.smugmug.com
.bagelturf.com
# Allow advertising through on these sites
{ allow-ads }
.slashdot.com
.dpreview.com
#No access to these sites
{+block}
.maxim.com
It's not difficult, but takes a little while to find out how to do some basic things because the terminology is not standard and there are a lot of macros to deal with. There is a lot more documentation on the Privoxy site.
First I download Privoxy. There are two pieces, the utility and the application itself. I go to the download page and under the Mac OS X section selected Privoxy 3.0.8 Universal and the PrivoxyUtility.
Then, having unpacked them I instal Privoxy and run the utility to start Privoxy running. In the system preferences I go to Network, selected my Ethernet port and click on Advanced.... to set up the Proxy tab like this:

Now all accesses by applications that use the system proxy settings will go through IP address 127.0.0.1 (my local machine) at port 8118 where Privoxy is listening. I also set up HTTPS the same way. This setting does not affect Firefox because Firefox ignores the system and has its own proxy settings.
Done. Privoxy is now filtering ads.
But sometimes I want to turn it off, or make certain sites bypass the filtering. Configuration changes are done through a web browser. By going to a special URL (http://config.privoxy.org/) I can change the way Privoxy runs. The problem I found is that by default the Leopard version does not allow configurations to be changed this way: configuration change options are missing from the page.
From the available information, it is not obvious where the global configuration file for Privoxy is located. I had to look at the installer code to learn that it is in /usr/local/etc/privoxy. I use the Finder's Go menu and selected Go to Location... to open that folder and then drag the file config onto TextWrangler. I set the string enable-remote-toggle to 1. That allows Privoxy to be turned on and off via the http://config.privoxy.org/ address. I also set enable-edit-actions to 1 so I can reconfigure the filters.
To make the configuration file change have any effect I stop and then start Privoxy via the Privoxy Utility:

Now I get the option to toggle Privoxy on and off:

The first line gives me the ability to add web sites that I want to block or allow:

In the user.action file I can add lines to allow content through. The web interface shown above just makes it a little easier than editing raw text files.
Editing the raw files involves adding and changing lines like these:
# Allow all cookies from these sites
{ allow-all-cookies }
.smugmug.com
# Turn off filtering for these sites
{-filter }
.smugmug.com
.bagelturf.com
# Allow advertising through on these sites
{ allow-ads }
.slashdot.com
.dpreview.com
#No access to these sites
{+block}
.maxim.com
It's not difficult, but takes a little while to find out how to do some basic things because the terminology is not standard and there are a lot of macros to deal with. There is a lot more documentation on the Privoxy site.
The Bagelturf site welcomes Donations of any size