sites

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit b9c418493f91892732d3526fd11f629f7fa6a700
parent 4094ed4ab58f35ceb375dfdd8ce6c0e41d9203cf
Author: Christoph Lohmann <20h@r-36.net>
Date:   Thu, 31 Oct 2013 07:20:10 +0100

Add some adblocking hosts method.

Diffstat:
Asurf.suckless.org/files/adblock-hosts.md | 37+++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+), 0 deletions(-)

diff --git a/surf.suckless.org/files/adblock-hosts.md b/surf.suckless.org/files/adblock-hosts.md @@ -0,0 +1,37 @@ +Adblocking using /etc/hosts +=========================== + +Adblocking is a non-trivial task, but there are trivial solutions. + +1.) Install hosts-gen from http://git.r-36.net/hosts-gen/ + + % git clone http://git.r-36.net/hosts-gen + % cd hosts-gen + % sudo make install + + # Make sure all your custom configuration from your current /etc/hosts is + # preserved in a file in /etc/hosts.d. The files have to begin with a + # number, a minus and then the name. + + % sudo hosts-gen + +2.) Install the zerohosts script. + + # In the above directory. + % sudo cp examples/gethostszero /bin + % sudo chmod 775 /bin/gethostszero + % sudo /bin/gerhostszero + % sudo hosts-gen + +Now the /etc/hosts with the zero hosts is ready and will be used in any +further started application. + +The gethostszero file can of course be reused to more easier create the +/etc/hosts file. A cronjob can be used to update the file and run hosts-gen +again. + +Author +------ + +* Christoph Lohmann < 20h (at) r-36 (dot) net > +