Page 1 of 1

Ad blocking for all applications using privoxy+adblock lists

Posted: 19. Jan 2011, 10:27
by garby
I block ads using the following with any applications (particularly browsers without adding adblock plus). Copy and save the following script as ultimate-adblocker.sh and chmod+x ultimate-adblocker.sh and then do ./ultimate-adblocker.sh

Code: Select all

#!/bin/sh
groupadd -g 206 privoxy
useradd -u 206 -g privoxy -d /dev/null -s /bin/false privoxy
slapt-src -i privoxy
wget http://andrwe.org/doku.php/scripting/bash/privoxy-blocklist?do=export_code&codeblock=0
chmod +x privoxy-blocklist.sh
./privoxy-blocklist.sh
And create a crontab to executie privoxy-blocklist.sh periodically. And do not forget to change the port from 8181 to something else if you are using tor+polipo (also runs in port 8118).

For chromium, you can do something like this:

Code: Select all

chromium --proxy-server=127.0.0.1:8118
Hope it is helpful.

Re: Ad blocking for all applications using privoxy+adblock l

Posted: 19. Jan 2011, 11:39
by gapan

Code: Select all

mv privoxy-blocklist.sh
That has to be wrong. And you certainly don't need to run the grouadd and useradd commands in the script so that they are run every time, running them once would work anyway.

Re: Ad blocking for all applications using privoxy+adblock l

Posted: 19. Jan 2011, 12:20
by garby
Yes, you are right. the script is only for one time installation. Butt the privoxy-blocklist.sh should be run to update the adblock plus list for privoxy. Thank you again!