Home

Awesome

Hosts Updater

This script intends to help manage large collection of blacklisted domains. It's best to describe it as a replacement for adblock, but instead of slowing down your browser it blocks domains of ad and scam websites at DNS level.

Quick start guide

$ gem install hosts_updater
$ sudo hosts-updater --help

It requires sudo in order to write to /etc/hosts file.

What it does?

This script download lists of malicious domains from following websites:

Unique entries from those lists are added together, and results are combined with your current hosts file (no data will be lost as original hosts file is copied and reused in the future).

How is it better than AdBlock/Ghostery etc?

Each browser plugin that blocks ads is using large amount of resources, hogs browser, and often causes strange errors. In constrast to this, blacklisting domains in /etc/hosts only takes couple seconds after file change, and besides that has nearly zero impact on performance. Additionally AdBlock is removing parts of websites very aggressively, often leaving broken layout - it should be less common problem with domain blacklisting.

On the other hand there is a small amount of ads that are unblockable by domain blacklisting - that are visible from time to time, but probably not often enough to complain ;)

Slow auto complete

As a lot of hosts are added to your system, autocomplete might slow down. To solve this in zsh prezto one could replace cat /etc/hosts (|)(N) with sed /0\.0\.0\.0/d. This prevents the domains to be loaded for completion.

How to configure what domains I want whitelisted/blacklisted?

During first run hosts-updater will create folder in /etc/hosts.d, in which it will store all configuration files:

Any other configuration options?

See hosts-updater --help for more configuration options.

Are you owner of those blacklists?

No - I'm just using them with proper attribution. All kudos and suggestions should be sent to maintainers of appropriate lists.

Support

If you like my work then consider supporting me:

Donate with Bitcoin

Donate with Ethereum

License

MIT License

Copyright © 2014 Bernard Potocki