AUR (en) - hostsblock
madalu commented on 2019-04-15 22:11
jav209 commented on 2019-04-07 21:15
Version 0.999.8.1 (Alpha 8.1)
- Fixed typos in various docs (Thanks to @glitsj16)
- Made installation more distro-neutral (Thanks to @glitsj16)
jav209 commented on 2019-04-06 19:28
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.cominstead 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
sudoexecution 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
-rsubcommand), and even target just blocked domains (with-ksubcommand) - 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-urlchecksymlink is depreciated. Please usehostsblock -c URLinstead. - 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.
jav209 commented on 2018-01-19 19:55
Version 0.999.7 (Alpha 7) (19.01.2018)
-
Typo fixes in install.sh
-
Added cryptomining block lists
-
Fixed permission errors in packaging (thanks @madalu)
-
Added optdepend (pixelserv-tls) (thanks @liljaylj)
-
Fixed superficial warning
liljaylj commented on 2018-01-19 18:39
Hello @jav209, I am maintainer of pixelserv-tls package here on AUR. pixelserv-tls - is like pixelserv, but works over HTTPS, too. I would be really appreciate if you add pixelserv-tls to optional dependencies. Thanks.
madalu commented on 2017-12-05 23:24
Would it be possible to change the default permissions on /var/lib/hostsblock to 755 so as to workaround the following issue:
https://github.com/gaenserich/hostsblock/issues/70
I've added dnsmasq to the hostsblock group, but it fails to access /var/lib/hostsblock/hosts.block unless the directory is world readable.
jav209 commented on 2017-08-06 13:52
@Shebang, no, you didn't hose anything, I did. Fixed in Version 0.999.6-3
Shebang commented on 2017-08-05 21:18
Sweet, one other problem I've encountered is that hostsblock is supposed to be run as the user hostsblock but in your package function it only sets root up with exec permissions on /usr/bin/hostsblock
Or did I hose something when I configured this?
jav209 commented on 2017-08-04 18:31
@Shebang: Revised in Version 0.999.6-2.
Shebang commented on 2017-08-04 14:03
Hey jav209, my system doesn't have a hostsblock user on it. It's required to build the package though. If I add the user manually it appears to build fine.
==> Starting package()...
install: invalid user ‘hostsblock’
==> ERROR: A failure occurred in package().
Aborting...
Package is missing a cache directory in /var/lib/hostsblock. Without the cache directory, hostblock fails with the following messages:
FAILED to refresh/download blocklist...
If I create the cache dir, the errors go away. This is probably an upstream bug, since hostblock should be smart enough to create the cache dir if it doesn't exist.