sites

public wiki contents of suckless.org
git clone git://git.suckless.org/sites
Log | Files | Refs

commit 549ad088003622d19a713066825298a6e9724410
parent a4bc5e7893ac91b88b616cc4d24ffec2d01d11d4
Author: Thuban <thuban@yeuxdelibad.net>
Date:   Sat,  9 Mar 2019 11:34:07 +0100

* improve layout since smu
* add zerohosts script gathering different lists in one /etc/hosts

Diffstat:
Msurf.suckless.org/files/adblock-hosts/index.md | 65+++++++++++++++++++++++++++++++++++++++++++++++------------------
1 file changed, 47 insertions(+), 18 deletions(-)

diff --git a/surf.suckless.org/files/adblock-hosts/index.md b/surf.suckless.org/files/adblock-hosts/index.md @@ -3,25 +3,26 @@ 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/ +host-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. +Install hosts-gen from <http://git.r-36.net/hosts-gen/> - % sudo hosts-gen + % git clone http://git.r-36.net/hosts-gen + % cd hosts-gen + % sudo make install -2. Install the zerohosts script. +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. - # In the above directory. - % sudo cp examples/gethostszero /bin - % sudo chmod 775 /bin/gethostszero - % sudo /bin/gethostszero - % sudo hosts-gen +Install the gethostszero script. + + # In the above directory. + % sudo cp examples/gethostszero /bin + % sudo chmod 775 /bin/gethostszero + % sudo /bin/gethostszero + % sudo hosts-gen Now the /etc/hosts with the zero hosts is ready and will be used in any further started application. @@ -30,8 +31,36 @@ 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 > +* Author : Christoph Lohmann < 20h (at) r-36 (dot) net > + + +zerohosts +--------- + +The following script gather well-known and trusted lists from various +places : [adaway](https://adaway.org/hosts.txt), +[someonewhocares](https://someonewhocares.org/hosts/zero/hosts), +[pgl.yoyo](https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=0&mimetype=plaintext)... + +They are written in `/etc/hosts` file to disable DNS resolution. + +Get the script from here : +[zerohosts](https://dev.yeuxdelibad.net/OpenBSD-stuff/zerohosts). + +Edit the script to add you own entries if necessary : + + MYHOSTS=" + 127.0.0.1 localhost + ::1 localhost + " + +Run the script each time you want to update the lists using a cronjob, or +`/etc/rc.local` : + + /usr/local/sbin/zerohosts & + +* Main page : <https://yeuxdelibad.net/Logiciel-libre/Code/zerohosts.html> +* Author : < thuban (at) yeuxdelibad (dot) net > (feel free to suggest +improvements)