Now it looks broken again
But don't worry, it's OK. The forum software was updated some time ago and that introduced all sorts of bugs.
P.s. it did work for me when trying triple-backticks.
Edit: if it's easier for you, no one will mind you posting logs without the 'hidden' block. I believe that the forum software represents long code blocks as scrollable text element.
adblock-lean v0.8 is now available!
(the code in the master has been ready for a couple of weeks but I was busy with other stuff so only got to this now)
This is a rather big release with following main changes:
Add support for hosts-format lists. Note that the support only covers lists which couple domains to block with the 0.0.0.0 IPv4 address or with :: for IPv6. The majority of hosts-format blocklists are compatible, a minority which uses the 127.0.0.1 address for blocked domains is incompatible (adblock-lean will ignore any 127.0.0.1 entries). Note that, rather than feeding hosts lists as-is to dnsmasq, adblock-lean converts them into raw-domains format and then further processes them as usual. This allows for entries deduplication across lists with different source format. Subdomains compression for hosts-format lists has also been implemented, based on the code by @dibdot in adblock for OpenWrt.
Support short identifiers for Steven Black's lists (e.g. hosts_block_lists=”stevenblack:base stevenblack:gambling”)
Support specifying default mirror to use when downloading lists for given author (currently Hagezi, oisd, Steven Black), add config options hagezi_default_mirror, oisd_default_mirror, stevenblack_default_mirror. Allowed values for these options are listed in the config file comments, next to the options.
When list download fails, adblock-lean will now automatically use another mirror when retrying.
Note that mirrors are only taken into account for lists specified via short identifier. For lists specified via URL, only that URL will be used.
Several config options names were changed. When updating adblock-lean to this version, values of the old options will be automatically migrated.
Add support for the new Hagezi social list.
Prettier and (hopefully) more readable console output messages.
Reduce the number of messages sent to system log to minimum. adblock-lean still writes the complete log to its own log file which you can view by running service adblock-lean print_log.
The service adblock-lean status command now prints the time and date of last blocklist update.
Read GitHub readme and it looks promising project, how we can compare this with adblock-fast? Maybe indecent question but still i hope to get decent reply @antonk
I don't really want to compare, and also I'm not familiar with the code of adblock-fast. I can say what we were trying to achieve (and hopefully achieved) with adblock-lean.
We wanted it to be very user-friendly. I.e. setup is very easy, everything is automated, lots of error checks and sanity checks, helpful progress messages, helpful error messages printed when anything is not right and automatic recovery from fault conditions. The user should never be guessing whether adblock-lean is working correctly, and as a byproduct, we (the maintainers) have to put very little time into support.
We wanted it to be as efficient as possible, especially in regards to memory use, but also in regards to processing speed. A lot of time and effort has been put into optimization.
We wanted it to be very versatile. Currently adblock-lean supports 3 different list formats (dnsmasq format, raw domains format and hosts format). So basically every popular list out there which is compatible with DNS-based adblocking is supported. Also lots of options are available for tweaking which cover a wide variety of use cases, e.g. whitelist mode, support for adblocking on multiple dnsmasq instances, compression utility selection, compression options selection, configurable parallel processing, support for calling a custom script on success or failure, and more. We have 5 presets, each one intended for devices with a certain memory capacity, from 64 MiB to 1024 MiB or more, and the service adblock-lean setup command automatically checks the memory capacity of the device and recommends one of the presets based on that.
We wanted the code to be robust, readable and easy to maintain.
Excellent and precise, no one can ask anything more from an ad blocker, thank you
I installed and it suggested me huge list as my ram is 1024mb, and i see 1666xxx (16 lac +) domains, which is very high figure, previously i was just using steven black unified and ad-away hosts totaling 48252 domains and it blocked 74% ads which is very impressive , (i know it's not 97%) , my priority is to keep things ultra light, like nothing is affecting dns speed or keeping latency free everything, please suggest which servers i should keep in lean for achieving similar?
Secondly, in lean is it possible for my gaming console to be independent of ad blocking? IP based? Purpose is to keep PS5 at super latency free and nothing should hog it ever
I'm not sure what you mean by "16 lac +". For devices with 1GiB of memory, adblock-lean suggests the preset large-relaxed which includes Hagezi Pro and Hagezi TIF lists. Hagezi Pro list currently includes ~170k domains - this is what is doing most of the adblocking. Hagezi TIF list currently includes ~550k domains - this list basically blocks requests to domains serving malicious payloads or used for malicious purposes. After deduplication, the combined final blocklist currently includes ~670k domains. This is an order of magnitude more than you are used to but as long as your router has a half-decent CPU , I don't think that you need to worry about latency or DNS resolution speed. dnsmasq is surprisingly efficient and even low-end devices can easily handle 200k blocked domains.
That said, if you want to use a smaller blocklist anyway then just run service adblock-lean gen_config and pick another preset, for example medium or small. Default Hagezi lists included in our presets are well balanced, so if you want a quick and effective solution, just use the presets. If you want to combine the presets with custom selection of lists then you can do this but you will need to decide which lists to use by yourself.
As to disabling adblocking on your PS5: again, I wouldn't worry about latency, but if you want to do it anyway then you will need to either connect your PS5 to a separate network interface (if your router has one available), or set up VLANs - 1 for your PS5, another one for all other devices. Probably it makes sense to disable adblock-lean while you are experimenting, in order to speed up this process: service adblock-lean disable. Then you will need to make some changes in /etc/config/dhcp and rather than having one dnsmasq instance serving your network, configure 2 instances, each one bound to its own interface or VLAN. Make sure to use the command service dnsmasq restart after making any changes to /etc/config/dhcp in order to apply the changes, then use logread to make sure no errors are reported. Once you have this setup working, you can run service adblock-lean select_dnsmasq_instances and pick the instance(s) you want to adblock on, then service adblock-lean enable and service adblock-lean start. I can't really provide a more detailed guide for setting up multiple dnsmasq instances because I'm not using multiple instances myself.
Hi all, there is a regression in v0.8 which causes local lists to not be processed unless downloaded lists of same type (allow- or block-) are specified. This is fixed in current adblock-lean snapshot. Thanks to Github user hohosinsan for the bug report.
I think that this regression justifies making a new small release but before that, I'd like to hear whether anyone encountered any other issues with v0.8.
(if all is working well for you, letting us know also helps)
root@OpenWrt:~# service adblock-lean status
adblock-lean (version 38131f9c153d2cbe0f462008217e379da50c7693) status:
Checking dnsmasq instances.
adblock-lean service is enabled.
Checking the active blocklist.
Checking dnsmasq instances.
Using following nameservers for DNS resolution verification: 127.0.0.1, ::1
Testing adblocking.
Testing DNS resolution.
The dnsmasq check passed and the presently installed blocklist has entries count: 167,807
adblock-lean is active.
Blocklist was updated on: Dec 02 2025, 03:09:36
Generating dnsmasq stats.
dnsmasq stats available for reading using 'logread'.
Checking for adblock-lean updates.
The locally installed adblock-lean is the latest version.
root@OpenWrt:~#
No impact whatsoever on DNS resolution latency. adblock-lean feeds the domains list to dnsmasq and that list is stored in dnsmasq memory as long as dnsmasq process is alive. When dnsmasq service is restarted, it needs to load the blocklist again - this is when the compressed file is extracted, directly into dnsmasq standard input. Compression only adds a few seconds to the time it takes to compile a new blocklist (depending on the CPU, blocklist size and compression utility), typically adds no delay when loading the blocklist, and saves a few MiB of memory permanently and some additional memory while downloaded lists are being processed. Not really significant for a device which has 1GiB of memory, especially with a small blocklist. But doesn't hurt either.
adblock-lean v0.8.1 is now available. This is a very small release fixing a regression in v0.8 which causes local lists to not be processed unless downloaded lists of same type (allow- or block-) are used.
To update adblock-lean:
service adblock-lean update
If you are currently running the snapshot version of adblock-lean and would like to switch back to the release update channel:
service adblock-lean update -v release
For README and installation instructions, visit the project's Github page.
I switched back from snapshot to release on my R4S. As usual, it worked fine.
root@R4S-wrt:~# service adblock-lean update -v release
Downloading adblock-lean, version '0.8.1' (update channel: 'release').
Installing new files...
File '/usr/lib/adblock-lean/abl-lib.sh' did not change - not updating.
Warning: File '/etc/init.d/adblock-lean' was manually modified - overwriting.
Saved a backup copy of manually modified file to /tmp/abl_old_modified_files/adblock-lean
Copying file '/etc/init.d/adblock-lean'.
Copying file '/usr/lib/adblock-lean/abl-process.sh'.
adblock-lean has been updated to version '0.8.1'.
Start adblock-lean now? (y|n)
y|n: y
Starting adblock-lean, version 0.8.1.
gawk detected so using gawk for fast (sub)domain match removal and entries packing.
GNU sed detected so list processing will be fast.
coreutils-sort detected so sort will be fast.
Checking dnsmasq instances.
Creating uncompressed backup of existing blocklist.
Testing connectivity.
Downloading and processing blocklist parts (max parallel jobs: 4).
Not using any allowlist for blocklist processing.
Processing raw blocklist: https://raw.githubusercontent.com/hagezi/dns-blocklists/main/wildcard/pro-onlydomains.txt
Processing raw blocklist: /etc/adblock-lean/blocklist
Processing raw blocklist: https://raw.githubusercontent.com/hagezi/dns-blocklists/main/wildcard/tif-onlydomains.txt
Successfully processed list: /etc/adblock-lean/blocklist [ 414.00 B - 16 lines ]
Successfully processed list: https://raw.githubusercontent.com/hagezi/dns-blocklists/main/wildcard/pro-onlydomains.txt [ 3.04 MiB - 168,046 lines ]
Successfully processed list: https://raw.githubusercontent.com/hagezi/dns-blocklists/main/wildcard/tif-onlydomains.txt [ 8.58 MiB - 514,906 lines ]
Successfully generated preprocessed blocklist file with 682,968 entries.
Sorting and merging the blocklist parts into a single blocklist file.
Stopping dnsmasq.
Checking the resulting blocklist with 'dnsmasq --test'.
New blocklist file check passed.
Final list uncompressed file size: 10.85 MiB
Importing the blocklist file.
Restarting dnsmasq.
Waiting for dnsmasq initialization.
Restart of dnsmasq completed.
Successfully imported new blocklist file for use by dnsmasq with size: 10.85 MiB
Processing time for blocklist generation and import: 0m:25s.
Checking the active blocklist.
Checking dnsmasq instances.
Using following nameservers for DNS resolution verification: 127.0.0.1, ::1
Testing adblocking.
Testing DNS resolution.
Active blocklist check passed with the new blocklist.
New blocklist installed with entries count: 635,585
Checking for adblock-lean updates.
The locally installed adblock-lean is the latest version.
root@R4S-wrt:~#
```
Since the update to 0.8 and above, I no longer see update check notifications like “Checking for adblock-lean updates. The locally installed adblock-lean is the latest version.” in the openwrt syslog. This was pretty handy to have as I could see if an update is needed after the daily blocklist update cron job restarted the service. I still see the notification in the ssh terminal, but having it added to syslog again would be great.
I'm looking at the syslog though LuCI (Status > System Log), same as before - could always see the update notification there without running additional commands.
I'm currently undecided on this matter. On one hand, I would like to fulfill your request. On the other hand, I'm not sure that syslog is the appropriate place to advertise application updates. Maybe we can add an option to print more messages to the syslog in order to make everybody happy. What do you think @Lynx ?
adblock-lean is meant to be ‘set and forget’ and I think running additional commands to know if an update exists goes against that - it should be able to leave a simple note in the logs (as it always has), for users to take any needed action. The other way would be to implement a self-update mechanism as part of service restarts, but I know not all would prefer that, since this presents an opportunity for things to break in case of potential regressions.