Releases: gaenserich/hostsblock
Version 0.999.8.1 (Alpha 8.1) (Dedicated to @glitsj16)
Version 0.999.8
See https://github.com/gaenserich/hostsblock/commits/master for a complete list of updates
Systemd Job Improvements
- Systemd service now heavily hardened and sandboxed for enhanced security
- Fixed simultaneous download feature so that it actually does what it is supposed to
- Added processing support for source blocklists that just list domain names to be blocked, e.g.
ads.google.com
instead of0.0.0.0 ads.google.com
- Added support to read directly from zip and 7z files containing a single file without decompressing to a cache
- Optimized filters used to process domains with improved throughput
- If run with dash instead of bash, hostsblock has significant performance improvements
- Removed annotation feature to reduce dependencies and overall processing demands
- Vastly expanded list of potential blocklists (see
block.urls
)
POSIX-Compatibility Improvements
- Supports POSIX shells (dash, ash, zsh) instead of just bash
- Removed GNU-specific utilities, relies only on POSIX options
- Should now run on *BSD and macOS (and perhaps even Android and iOS!) if proper POSIX environments are installed. UNTESTED
UrlCheck Mode Improvements
- User-facing command now a wrapper script that handles
sudo
execution for the user, reducing configuration demands - Significant performance improvements by moving from incremental to mass handling of domain names
- Added noninteractive commands
-s
(status),-b
(block),-l
(blacklist),-w
(whitelist),-b -o
(unblock),-l -o
(deblacklist),-w -o
(dewhitelist) - Interactive and noninteractive commands can now recursively handle urls contained in target page (with
-r
subcommand), and even target just blocked domains (with-k
subcommand) - To minimize repeated writes, changes to target hosts file now don't write to file until after the whole process completes
Upgrading to 0.999.8
For existing hostsblock users, please note the following changes in version 0.999.8:
Changes in hostsblock.conf
Due to the shift to POSIX-shell compatibility, the list of blocklists to be downloaded cannot be held in hostsblock.conf
via the blockl ists=
parameter. Instead, this parameter contains the path to a file that contains the list of urls, e.g. /var/lib/hostsblock/block.urls
.
The new block.urls file is simply a newline separated list of urls with no quotations. Whitespace and text after # are ignored. An examp
le block.urls file could look like this:
http://hosts-file.net/download/hosts.zip # General blocking meta-list
http://winhelp2002.mvps.org/hosts.zip
http://hostsfile.mine.nu/Hosts.zip
See the example block.urls
in the /var/lib/hostsblock/config.examples
directory for details.
No more postprocessing within script
Due to enhanced security and sandboxing, hostsblock no longer handles postprocessing on its own. Instead, users should use other systemd c
apabilities to replace the postprocess() {}
functionality.
Hostsblock comes with systemd service files that replicate the most common scenarios. See the directions above for instructions on how to
enable them.
Changes with sudo
sudo
is no longer as widely used as before. The man systemd service no longer requires it. You only need it if you want to use the hostsblock -c URL
(urlcheck) utility. See the above directions for details.
Caveats
- The
hostsblock-urlcheck
symlink is depreciated. Please usehostsblock -c URL
instead. - In UrlCheck mode, large hosts files will generate large temporary cache files that will eat up a lot of temporary storage. If you have a machine with little RAM (<6GB) and want to block a lot of domains, consider changing your $tmpdir to an HDD- or SSD-backed filesystem instead of the default tmpfs under
/tmp
. - UrlCheck mode will not be able to provide information on which blocklist blocked which domains anymore (annotation feature removed)
- Hostsblock uses 0.0.0.0 as default redirection IP address instead of 127.0.0.1. 0.0.0.0 theoretically offers better performance without the need of a pseudo-server.