This is a replacement/new version for the simple-adblock package, which couldn't have been taken further while keeping the existing config file structure, hence the new package/name.
Migration script from simple-adblock is included and ran after the installation. It should carry over the lists/domains you've been allowing/blocking with simple-adblock and also stop and disable simple-adblock, so if you're migrating, it should be a smooth and easy process.
This new package auto-detects supported list formats:
AdBlockPlus format
domains list format
hosts file format
dnsmasq config file (with both server= and local= statements) format
So pretty much any list which doesn't require the complex processing you can throw at adblock-fast and it should figure it out on the fly.
Unless anyone has experienced issues with adblock-fast (and the luci app) over the last week of testing, my plan is to merge the update into snapshots and 23.05.0-rc tomorrow.
PS. Many thanks to @jow and @stokito for polishing up the luci app code.
Thanks for releasing this - I like its simplicity. I'm struggling with the "dnsmasq_instance" option, though. I run 3 dnsmasq instances and want to ad-block #0 and #1, so I've set "option dnsmasq_instance '0 1'" in the config file. Running "/etc/init.d/adblock-fast restart" gives "/etc/rc.common: eval: line 606: 1: not found" and the dnsmasq configs don't contain the adblock servers line. Setting it to a single number or '*' works as expected. This is what your doc says about the option:
String of space-separated DNSMASQ instance numbers (or β*β for all) to be affected by the service.
Tried it with oisd big and it seems to be blocking only when selecting dnsmasq.servers not dnsmasq.addnhosts. Anything I can provide to solve the issue?
With dnsmasq.servers you really need to use a dnsmasq-specific list, or a wildcard-domains list. For dnsmasq.addnhosts, the list of domains has to be non-wildcard, usually.
Thanks for the report. That file doesn't have the header the adblock-fast was expecting for the ABP-style list, so I've updated it to better detect ABP-style lists in adblock-fast 1.0.0-3 (available in my repo, instructions are at https://docs.openwrt.melmac.net/). I'd appreciate it if you could test this version before I merge changes to the main OpenWrt packages repository.
Are there lists you're aware of that do use wildcards?
The intention was that adblock-fast should be able to create a dnsmasq.servers file from any combination of formats of input files.
Hi Stan, I'm sorry but where do I find the adblock-fast 1.0.0-3 in your repo? Tried to look it up here https://github.com/stangri/repo.openwrt.melmac.net but there's still 1.0.0-2? Or am I looking at the wrong repo?
Quick Feedback: In 1.0.0-4 I no longer get an error message because my allowlist is empty and it works great.
Any idea why I get those messages on restarting dnsmasq:
Fri Sep 29 22:00:34 2023 daemon.info dnsmasq[1]: using only locally-known addresses for zzzhuoxiaqu.online
Fri Sep 29 22:00:34 2023 daemon.info dnsmasq[1]: using only locally-known addresses for zzz.fhauiehgha.com
Fri Sep 29 22:00:34 2023 daemon.info dnsmasq[1]: using only locally-known addresses for zzz.alie3ksgdd.com
Fri Sep 29 22:00:34 2023 daemon.info dnsmasq[1]: using only locally-known addresses for zzyjtsgls.com
Fri Sep 29 22:00:34 2023 daemon.info dnsmasq[1]: using only locally-known addresses for zzxmcp.com
Fri Sep 29 22:00:34 2023 daemon.info dnsmasq[1]: using only locally-known addresses for zzxedr.xyz
Fri Sep 29 22:00:34 2023 daemon.info dnsmasq[1]: using only locally-known addresses for zzux.com
Fri Sep 29 22:00:34 2023 daemon.info dnsmasq[1]: using only locally-known addresses for zzsqqx.shopjapan.co.jp
Fri Sep 29 22:00:34 2023 daemon.info dnsmasq[1]: using 180808 more local addresses
dnsmasq is too chatty and lists the domains from the end of the block-file in the output. It's an indication that dnsmasq picked up the block-list created by the adblock-fast.
I'm not sure I fully understand the issue. Can you post your config which is cause the issues and the output of service adblock-fast dl with verbosity set to 2.
Failed to detect format https://raw.githubusercontent.com/hagezi/dns-blocklists/main/dnsmasq/multi.txt
Failed to create '/var/run/adblock-fast/dnsmasq.servers' file
Failed to create block-list or restart DNS resolver```
Edit:
Just forgot to ask. Is there a something like a cron job for updating the blocklists daily?
Edit2:
Upon reloading the service i get this error. Seems to be a cosmetic bug, because I don't have an allow-list.
Service Errors
Failed to process allow-list
Errors encountered, please check the [README](https://docs.openwrt.melmac.net/adblock-fast/)
!```