I was looking to replace my Firefox with something more lightweight. Since I fell in love with the Pentadactyl extension for the Fox, and I think that a browser used in a tiling WM should be controllable with the keyboard, I was looking for something similar. After some looking around, I settled on luakit, since it is pretty lightweight, amazingly fast, easily extensible using some lua scripting, and it just simply has some amazing looks.
There was one thing I was missing from using Firefox, though, and that's the nice Adblock Plus extension. I replaced that with the filtering proxy Privoxy. Unfortunately, I could really feel the impact on browsing speed, so I had to take some action to speed this up again. Enter Polipo, a caching proxy.
Now, you may argue that if I'm piping web output through two proxies, I might as well go back to using Firefox, but I've found that still, this uses less resources than FF on my system. And, since all the filtering and caching is outsourced to daemons constantly running in the background, and luakit is not bugged down with extensions, the startup of my browser is instant (no, I'm not kidding. It's seriously done starting up as soon as I release the keybinding to launch it).
Well, that's the story. Now we need to go deeper...
This part was pretty easy, all the components were found either in Arch's repos, or the ever-helpful AUR.
All I had to do was to add "polipo" and "privoxy" (both prefixed with a "@", so they won't slow down my boot) to my DAEMONS array in /etc/rc.conf to have them start on boot.
This is important. Running multiple proxies requires some piping of the data. Luckily, the creators of both proxies aknowledge the existence of the other, and a user's potential wish to run both of them simultaneously.The path you want to be shooting for here is as follows:Internets > polipo > privoxy > browser
So you have to tell privoxy where to find it's data. You do that by setting it's "forward" settings in it's config (default in Arch: /etc/privoxy/config). Polipo uses port 8123 as it's default port, so this setting will do:
1 forward / localhost:8123
Now, you have tell luakit (or any other browser) where to find it's data, so you want to point it to Privoxy, which uses port 8118 by default. So in $XDG_CONFIG_HOME/luakit/global.lua, you need to enable
1 http_proxy = "http://localhost:8118"
If you don't feel like messing with Privoxy's filters yourself, there's a nice script in the AUR, which allows you to download, convert and use Adblock Plus' filter lists. It's called privoxy-blocklist, and it automatically sets up a cronjob that updates you filter lists every week. It will run fine with no user interaction, but you might want to change the blocklists it uses. To do this, just edit the "URLS" array in /usr/sbin/privoxy-blocklist.