Disclaimer: this software is in testing. Don’t use it if you don’t want to use the command line on your phone or aren’t prepared to use recovery.
That said, it will come out of testing at some point so stay tuned.
The script collects, sanitizes and compiles blocklists from the internet into a hosts file that will block domains on your whole system.
It runs immediately after installation, then once a week (currently hardcoded) through a systemd timer/service.
It sends various graphical notifications when something important happens (good or bad).
Only if you want stricter or less strict blocking, can you copy /usr/share/doc/hosts-block/cfg.sh.example to /home/defaultuser/.config/cfg.sh
and edit it to your liking. You can also black/whitelist sites by creating /home/defaultuser/.config/whitelist.txt and blacklist.txt resp.
By default only Steven Black’s default list is used, but the script can extract domains from all kinds of formats and combine them into one huge list. See /usr/share/doc/hosts-block/cfg.sh for a maxi list (about 10x larger than the default).
The package is a collaboration between myself & @vlagged.
Many thanks to you for bringing ad-blocking to lazy tinkerers like me!
Certain sites load much faster, almost instantly, after installing Hosts-block. I always thought the browser was just a bit slow in some regard, but apparently it was all about excessive traffic caused by the ads.
I don’t know if this should be expected, but I had to install lipstick-qt5-tools before I was able to install this package.
Thanks for bringing the dependency issue to my attention. lipstick-qt5-tools is listed as a dependency; I thought that as such, it gets installed automatically.
It’s not even a hard dependency, only for notifications.
Thanks for bringing it to chum! I had it installed before already and did the installation without uninstalling it before. So far I didn’t notice any problems, do you think that was OK?
Very nice! Finally! Cool!
Ohnonot, would you explain please, if i want to adblock “more and more and more”, i need to copy cfg.sh file from doc folder to home/defaultuser/.config and uncomment last lines only as on screenshot? That’s all? What’s after, need to restart something, how?
Thanks for using it.
Yes, uncomment the variables from here onwards:
## uncomment all variables for maximum blocking:
## all variables can contain multiple urls separated by newlines (see extraurls below)
## uassets Must be in tar.gz format. top folder must be named *u[aA]ssets*
## under which we look for thirdparties and filters subfolders
uassets="https://github.com/uBlockOrigin/uAssets/archive/refs/heads/master.tar.gz"
## A list of urls containing blocklists. Only lines starting with http(s) are considered:
metalists="https://v.firebog.net/hosts/lists.php?type=tick"
## Extra urls of blocklists, 1 per line: (note the quotes, var contains newlines)
extraurls="https://malware-filter.gitlab.io/malware-filter/phishing-filter-hosts.txt
https://malware-filter.gitlab.io/malware-filter/urlhaus-filter-hosts.txt
https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-social/hosts"
and save as /home/defaultuser/.config/hosts-block/cfg.sh.
Currently it won’t automatically update /etc/hosts*; open a terminal and enter devel-su systemcl start hosts-block
* I just found out that this is relatively simple to achieve. Stay tuned!
But not works, on same page in Sailfish - no ads, in that page in AppSupport - there’s ads.
Then - just start AppSupport and it will work?
If we want to disable ad block in AppSupport - just delete this alien-generate-extra-config.sh file?
And would you please explain, how does hosts-block works with this huge 40 mb file on filesystem? Read it every time? Load it into memory? In what process? Didn’t find any new processes in Crest after installing hosts-block.
@jauri.gagarin.II
Your system still works but hosts.head is too large.
Just delete it (as root), it will be recreated with default values the next time the script runs.
This did not happen for me just now, the Chum package pulled the dependency in just as one would expect. Maybe this is from the very old package (before I made this thread) or the one from Openrepo’s (broken through my fault, @vlagged should remove)?
As promised blacklisting & whitelisting works and the script will auto-update /etc/hosts if one of blacklist.txt, whitelist.txt or cfg.sh have been edited in ~/.config/hosts-block
Not sure what happened there. The message is very recent and the 0.0.2 from openrepos should’ve fixed it (maybe the 0.0.2 builds were not listed as latest, as there were two… hmm).
To be safe(er), I have updated 0.0.6 in openrepos one last time, and added a message to use chum. Thanks
I installed the package was from Chum testing repository after reading your original post. I even double-checked this just now; the package is not listed as installed in Storeman, only in Chum GUI.