I also Updated from 0.6.2 to snapshot successfully.
Yes all seems well from my own testing.
root@OpenWrt:~# service adblock-lean update -v snapshot
Stopping adblock-lean.
Removing any adblock-lean blocklist files in dnsmasq config directories.
Checking dnsmasq instances.
Restarting dnsmasq.
Waiting for dnsmasq initialization.
Restart of dnsmasq completed.
Stopped adblock-lean.
Getting GitHub ref for snapshot version of adblock-lean.
Downloading adblock-lean, version 'a47ea59'.
NOTE: config format has changed from v6 to v7.
Error: Unexpected keys in config: 'initial_dnsmasq_restart'.
Corresponding config entries:
initial_dnsmasq_restart="0"
Error: Missing keys in config: 'MAX_PARALLEL_JOBS unload_blocklist_before_update '.
Corresponding default config entries:
MAX_PARALLEL_JOBS="auto"
unload_blocklist_before_update="auto"
Perform following automatic changes?
1. Remove unexpected entries from the config
2. Re-add missing config entries with default values
y|n: y
Old config file was saved as /tmp/adblock-lean_config.old.
This will overwrite existing config. Proceed?
y|n: y
Saving new config file to '/etc/adblock-lean/config'.
Copying file 'adblock-lean'.
Copying file 'abl-lib.sh'.
Copying file 'abl-process.sh'.
The adblock-lean service is already enabled.
adblock-lean has been updated to version 'snapshot'.
Start adblock-lean now? (y|n)
y|n: y
Starting adblock-lean, version a47ea59.
gawk detected so using gawk for fast (sub)domain match removal and entries packi ng.
GNU sed detected so list processing will be fast.
coreutils-sort detected so sort will be fast.
Checking dnsmasq instances.
No existing compressed or uncompressed blocklist identified.
Testing connectivity.
Downloading and processing blocklist parts (max parallel jobs: 2).
Processing raw allowlist: /etc/adblock-lean/allowlist
Successfully processed list: /etc/adblock-lean/allowlist (0 lines, 0 B).
Not using any allowlist for blocklist processing.
Starting raw blocklist part(s) download.
Processing raw blocklist: https://raw.githubusercontent.com/hagezi/dns-blocklist s/main/wildcard/native.tiktok.extended-onlydomains.txt
Processing raw blocklist: https://raw.githubusercontent.com/hagezi/dns-blocklist s/main/wildcard/hoster-onlydomains.txt
Successfully processed list: https://raw.githubusercontent.com/hagezi/dns-blockl ists/main/wildcard/hoster-onlydomains.txt (2,134 lines, 25.98 KiB).
Processing raw blocklist: https://raw.githubusercontent.com/hagezi/dns-blocklist s/main/wildcard/popupads-onlydomains.txt
Successfully processed list: https://raw.githubusercontent.com/hagezi/dns-blockl ists/main/wildcard/native.tiktok.extended-onlydomains.txt (362 lines, 9.77 KiB).
Processing raw blocklist: https://raw.githubusercontent.com/hagezi/dns-blocklist s/main/wildcard/native.winoffice-onlydomains.txt
Successfully processed list: https://raw.githubusercontent.com/hagezi/dns-blockl ists/main/wildcard/native.winoffice-onlydomains.txt (361 lines, 11.04 KiB).
Processing raw blocklist: https://raw.githubusercontent.com/hagezi/dns-blocklist s/main/wildcard/native.roku-onlydomains.txt
Successfully processed list: https://raw.githubusercontent.com/hagezi/dns-blockl ists/main/wildcard/native.roku-onlydomains.txt (76 lines, 2.23 KiB).
Processing raw blocklist: /etc/adblock-lean/blocklist
Successfully processed list: /etc/adblock-lean/blocklist (4,189 lines, 64.26 KiB ).
Successfully processed list: https://raw.githubusercontent.com/hagezi/dns-blockl ists/main/wildcard/popupads-onlydomains.txt (98,893 lines, 1.63 MiB).
Successfully generated preprocessed blocklist file with 106,015 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: 1.75 MiB.
Checking dnsmasq instances.
Successfully imported new compressed blocklist file for use by dnsmasq with size : 716.93 KiB.
Restarting dnsmasq.
Waiting for dnsmasq initialization.
Restart of dnsmasq completed.
Processing time for blocklist generation and import: 0m:13s.
Checking 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 file.
New blocklist installed with entries count: 106,001.
Checking for adblock-lean updates.
Getting GitHub ref for snapshot version of adblock-lean.
The locally installed adblock-lean is the latest version.
Successfully updated to snapshot version to test
Thank you @spence and @jojosupir! I think we'll wait a bit longer and if no problems are reported, we'll make the release, unless @Lynx minds.
Edit: thank you @d687r02j8g as well!
same as others: update went fine (had to agree to adjust/remove config keys), feels a bit snappier overall.
installation
Sat Apr 12 12:16:09 2025 user.info adblock-lean: Getting GitHub ref for snapshot version of adblock-lean.
Sat Apr 12 12:16:09 2025 user.info adblock-lean: Downloading adblock-lean, version 'a47ea59'.
Sat Apr 12 12:16:10 2025 user.notice adblock-lean: NOTE: config format has changed from v6 to v7.
Sat Apr 12 12:16:10 2025 user.err adblock-lean: Error: Unexpected keys in config: 'initial_dnsmasq_restart'.
Sat Apr 12 12:16:10 2025 user.err adblock-lean: Error: Missing keys in config: 'MAX_PARALLEL_JOBS unload_blocklist_before_update'.
Sat Apr 12 12:16:36 2025 user.info adblock-lean: Old config file was saved as /tmp/adblock-lean_config.old.
Sat Apr 12 12:16:38 2025 user.info adblock-lean: Saving new config file to '/etc/adblock-lean/config'.
Sat Apr 12 12:16:38 2025 user.info adblock-lean: Copying file 'adblock-lean'.
Sat Apr 12 12:16:38 2025 user.info adblock-lean: Copying file 'abl-lib.sh'.
Sat Apr 12 12:16:38 2025 user.info adblock-lean: Copying file 'abl-process.sh'.
Sat Apr 12 12:16:38 2025 user.info adblock-lean: The adblock-lean service is already enabled.
Sat Apr 12 12:16:38 2025 user.info adblock-lean: adblock-lean has been updated to version 'snapshot'.
Sat Apr 12 12:16:40 2025 user.info adblock-lean: Starting adblock-lean, version a47ea59.
Sat Apr 12 12:16:40 2025 user.info adblock-lean: gawk detected so using gawk for fast (sub)domain match removal and entries packing.
Sat Apr 12 12:16:40 2025 user.info adblock-lean: GNU sed detected so list processing will be fast.
Sat Apr 12 12:16:40 2025 user.info adblock-lean: coreutils-sort detected so sort will be fast.
Sat Apr 12 12:16:40 2025 user.info adblock-lean: Checking dnsmasq instances.
Sat Apr 12 12:16:40 2025 user.info adblock-lean: No existing compressed or uncompressed blocklist identified.
Sat Apr 12 12:16:40 2025 user.info adblock-lean: Testing connectivity.
Sat Apr 12 12:16:40 2025 user.info adblock-lean: Downloading and processing blocklist parts (max parallel jobs: 4).
Sat Apr 12 12:16:40 2025 user.info adblock-lean: Not using any allowlist for blocklist processing.
Sat Apr 12 12:16:40 2025 user.info adblock-lean: Starting raw blocklist part(s) download.
Sat Apr 12 12:16:40 2025 user.info adblock-lean: No local blocklist identified.
Sat Apr 12 12:16:40 2025 user.info adblock-lean: Processing raw blocklist: https://raw.githubusercontent.com/hagezi/dns-blocklists/main/wildcard/pro-onlydomains.txt
Sat Apr 12 12:16:40 2025 user.info adblock-lean: Processing raw blocklist: https://raw.githubusercontent.com/hagezi/dns-blocklists/main/wildcard/tif-onlydomains.txt
Sat Apr 12 12:16:42 2025 user.info adblock-lean: Successfully processed list: https://raw.githubusercontent.com/hagezi/dns-blocklists/main/wildcard/pro-onlydomains.txt (206,260 lines, 3.91 MiB).
Sat Apr 12 12:16:47 2025 user.info adblock-lean: Successfully processed list: https://raw.githubusercontent.com/hagezi/dns-blocklists/main/wildcard/tif-onlydomains.txt (960,797 lines, 17.68 MiB).
Sat Apr 12 12:16:47 2025 user.info adblock-lean: Successfully generated preprocessed blocklist file with 1,167,057 entries.
Sat Apr 12 12:16:47 2025 user.info adblock-lean: Sorting and merging the blocklist parts into a single blocklist file.
Sat Apr 12 12:16:52 2025 user.info adblock-lean: Stopping dnsmasq.
Sat Apr 12 12:16:52 2025 user.info adblock-lean: Checking the resulting blocklist with 'dnsmasq --test'.
Sat Apr 12 12:16:53 2025 user.info adblock-lean: New blocklist file check passed.
Sat Apr 12 12:16:53 2025 user.info adblock-lean: Final list uncompressed file size: 20.84 MiB.
Sat Apr 12 12:16:53 2025 user.info adblock-lean: Checking dnsmasq instances.
Sat Apr 12 12:16:53 2025 user.info adblock-lean: Successfully imported new compressed blocklist file for use by dnsmasq with size: 7.23 MiB.
Sat Apr 12 12:16:53 2025 user.info adblock-lean: Restarting dnsmasq.
Sat Apr 12 12:17:02 2025 user.info adblock-lean: Waiting for dnsmasq initialization.
Sat Apr 12 12:17:13 2025 user.info adblock-lean: Restart of dnsmasq completed.
Sat Apr 12 12:17:13 2025 user.info adblock-lean: Processing time for blocklist generation and import: 0m:33s.
Sat Apr 12 12:17:13 2025 user.info adblock-lean: Checking active blocklist.
Sat Apr 12 12:17:13 2025 user.info adblock-lean: Checking dnsmasq instances.
Sat Apr 12 12:17:13 2025 user.info adblock-lean: Using following nameservers for DNS resolution verification: 127.0.0.1, ::1
Sat Apr 12 12:17:13 2025 user.info adblock-lean: Testing adblocking.
Sat Apr 12 12:17:13 2025 user.info adblock-lean: Testing DNS resolution.
Sat Apr 12 12:17:13 2025 user.info adblock-lean: Active blocklist check passed with the new blocklist file.
Sat Apr 12 12:17:13 2025 user.info adblock-lean: New blocklist installed with entries count: 1,113,206.
Sat Apr 12 12:17:13 2025 user.info adblock-lean: Checking for adblock-lean updates.
Sat Apr 12 12:17:13 2025 user.info adblock-lean: Getting GitHub ref for snapshot version of adblock-lean.
Sat Apr 12 12:17:14 2025 user.info adblock-lean: The locally installed adblock-lean is the latest version.
update
Sat Apr 12 12:23:16 2025 user.info adblock-lean: Starting adblock-lean, version a47ea59.
Sat Apr 12 12:23:16 2025 user.info adblock-lean: gawk detected so using gawk for fast (sub)domain match removal and entries packing.
Sat Apr 12 12:23:16 2025 user.info adblock-lean: GNU sed detected so list processing will be fast.
Sat Apr 12 12:23:16 2025 user.info adblock-lean: coreutils-sort detected so sort will be fast.
Sat Apr 12 12:23:16 2025 user.info adblock-lean: Checking dnsmasq instances.
Sat Apr 12 12:23:16 2025 user.info adblock-lean: No existing compressed or uncompressed blocklist identified.
Sat Apr 12 12:23:16 2025 user.info adblock-lean: Testing connectivity.
Sat Apr 12 12:23:16 2025 user.info adblock-lean: Downloading and processing blocklist parts (max parallel jobs: 4).
Sat Apr 12 12:23:16 2025 user.info adblock-lean: Not using any allowlist for blocklist processing.
Sat Apr 12 12:23:16 2025 user.info adblock-lean: Starting raw blocklist part(s) download.
Sat Apr 12 12:23:16 2025 user.info adblock-lean: No local blocklist identified.
Sat Apr 12 12:23:16 2025 user.info adblock-lean: Processing raw blocklist: https://raw.githubusercontent.com/hagezi/dns-blocklists/main/wildcard/pro-onlydomains.txt
Sat Apr 12 12:23:16 2025 user.info adblock-lean: Processing raw blocklist: https://raw.githubusercontent.com/hagezi/dns-blocklists/main/wildcard/tif-onlydomains.txt
Sat Apr 12 12:23:18 2025 user.info adblock-lean: Successfully processed list: https://raw.githubusercontent.com/hagezi/dns-blocklists/main/wildcard/pro-onlydomains.txt (206,260 lines, 3.91 MiB).
Sat Apr 12 12:23:23 2025 user.info adblock-lean: Successfully processed list: https://raw.githubusercontent.com/hagezi/dns-blocklists/main/wildcard/tif-onlydomains.txt (960,797 lines, 17.68 MiB).
Sat Apr 12 12:23:23 2025 user.info adblock-lean: Successfully generated preprocessed blocklist file with 1,167,057 entries.
Sat Apr 12 12:23:23 2025 user.info adblock-lean: Sorting and merging the blocklist parts into a single blocklist file.
Sat Apr 12 12:23:28 2025 user.info adblock-lean: Stopping dnsmasq.
Sat Apr 12 12:23:28 2025 user.info adblock-lean: Checking the resulting blocklist with 'dnsmasq --test'.
Sat Apr 12 12:23:29 2025 user.info adblock-lean: New blocklist file check passed.
Sat Apr 12 12:23:29 2025 user.info adblock-lean: Final list uncompressed file size: 20.84 MiB.
Sat Apr 12 12:23:29 2025 user.info adblock-lean: Checking dnsmasq instances.
Sat Apr 12 12:23:29 2025 user.info adblock-lean: Successfully imported new compressed blocklist file for use by dnsmasq with size: 7.23 MiB.
Sat Apr 12 12:23:29 2025 user.info adblock-lean: Restarting dnsmasq.
Sat Apr 12 12:23:38 2025 user.info adblock-lean: Waiting for dnsmasq initialization.
Sat Apr 12 12:23:49 2025 user.info adblock-lean: Restart of dnsmasq completed.
Sat Apr 12 12:23:49 2025 user.info adblock-lean: Processing time for blocklist generation and import: 0m:32s.
Sat Apr 12 12:23:49 2025 user.info adblock-lean: Checking active blocklist.
Sat Apr 12 12:23:49 2025 user.info adblock-lean: Checking dnsmasq instances.
Sat Apr 12 12:23:49 2025 user.info adblock-lean: Using following nameservers for DNS resolution verification: 127.0.0.1, ::1
Sat Apr 12 12:23:49 2025 user.info adblock-lean: Testing adblocking.
Sat Apr 12 12:23:49 2025 user.info adblock-lean: Testing DNS resolution.
Sat Apr 12 12:23:49 2025 user.info adblock-lean: Active blocklist check passed with the new blocklist file.
Sat Apr 12 12:23:49 2025 user.info adblock-lean: New blocklist installed with entries count: 1,113,206.
Sat Apr 12 12:23:49 2025 user.info adblock-lean: Checking for adblock-lean updates.
Sat Apr 12 12:23:49 2025 user.info adblock-lean: Getting GitHub ref for snapshot version of adblock-lean.
Sat Apr 12 12:23:50 2025 user.info adblock-lean: The locally installed adblock-lean is the latest version.
Found the time for 0.6.2
:
Processing time for blocklist generation and import: 0m:36s.
For snapshot
Processing time for blocklist generation and import: 0m:32s.
Sweet! Thanks for the testing and the feedback.
Hello guys.
This morning I got an error when it was doing its daily updates.
Starting raw blocklist part(s) download.
Downloading, checking and sanitizing raw blocklist part from: https://raw.githubusercontent.com/hagezi/dns-blocklists/main/wildcard/pro-onlydomains.txt.
Error: downloaded blocklist part size reached the maximum value set in config (4000 KB).
Consider either increasing this value in the config or removing the corresponding blocklist part path or URL from config.
Skipping file and continuing.
Downloading, checking and sanitizing raw blocklist part from: https://raw.githubusercontent.com/hagezi/dns-blocklists/main/wildcard/tif.mini-onlydomains.txt.
Successfully processed blocklist (source file size: 1.78 MiB, sanitized line count: 87,854).
Successfully generated preprocessed blocklist file with 87,854 entries.
Sorting and merging the blocklist parts into a single blocklist file.
Stopping dnsmasq.
It seems the default domain url has increased in size and the config is set to a limit of 4,000kb. I've increased it to 5,000kb which seems to work, but as a default setting is this ideal? Should the url change for a lower size file instead???
I think what matters is that there is enough RAM to handle the download, processing and final list loaded into dnsmasq
and meeting the RAM demands of other processes. The defaults are a best-guess setting that may warrant adjustments depending our individual needs.
Look at free
or the status page in luci to see if your device is close to running out of free memory. Be aware that without reading how memory is managed, it can be deceiving and you may think there is less free than is real. buff/cache
and maybe some other columns include dynamically managed memory that will be freed if there is demand for it but stays occupied or even grows while memory demand is low.
EDIT:
Adjust the block-lists in a compromise between what you want blocked vs memory to hold them. If you have enough RAM then you can load the big lists. Cut back as needed.
I guess we can tweak the algorithm setting the part size limit for presets (I'll look into this). But in general, the main concern here is to guard against excessive memory use. For devices with as little memory as 128MiB, increasing the final blocklist default size limit is too dangerous IMO. The actual size of the downloaded files is not under our control, and those sizes may change over time as entries are added or removed by upstream (in this case, by Hagezi). So we are doing our best to (on one hand) make it really easy to set up adblock-lean with a preset which matches the memory capacity of the device (based on current list sizes plus some headroom), and on the other hand, to safeguard against Out-Of-Memory errors caused by loading excessively large lists. Users (especially users of devices which are very memory-constrained) may need to adjust the settings or pick different lists from time to time.
That said, we are considering to implement a mechanism which will fall back to smaller versions of Hagezi lists when a larger version exceeds the size limit.
Edit: for now, I sent a PR tweaking the default limits. Note that this will not change previously set config limits, but users who run either service adblock-lean gen_config
or service ablock-lean setup
will be able to pick a preset with the updated limits. (note that the PR has not been accepted yet)
@Lynx just merged the PR which tweaks the default limits. Would be nice if you could confirm that this solves the issue by running:
service adblock-lean update -v snapshot
service adblock-lean gen_config
service adblock-lean start
This will also help us with testing the upcoming version of adblock-lean.
(Please read the above post for explanation of what changed since the last release, how the adblock-lean update system works and how to go back to the release update channel)
Tested and ran the update -v snapshot,gen-config (selecting small instead of medium(auto detect my 256MB device), edit blocklist and start adblock-lean service.Smooth sailing.
_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
-----------------------------------------------------
OpenWrt 24.10.0, r28427-6df0e3d02a
-----------------------------------------------------
root@OpenWrt:~# service adblock-lean status
adblock-lean (a47ea59) status:
adblock-lean service is enabled.
Checking 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: 106,494.
adblock-lean is active.
Generating dnsmasq stats.
dnsmasq stats available for reading using 'logread'.
Checking for adblock-lean updates.
Getting GitHub ref for snapshot version of adblock-lean.
The locally installed adblock-lean seems to be outdated (update channel: snapshot, installed: 'a47ea59', latest: '9823713'.).
Consider running: 'service adblock-lean update' to update it to the latest version.
root@OpenWrt:~# service adblock-lean update -v snapshot
Stopping adblock-lean.
Removing any adblock-lean blocklist files in dnsmasq config directories.
Checking dnsmasq instances.
Restarting dnsmasq.
Waiting for dnsmasq initialization.
Restart of dnsmasq completed.
Stopped adblock-lean.
Getting GitHub ref for snapshot version of adblock-lean.
Downloading adblock-lean, version '9823713'.
Copying file 'adblock-lean'.
Copying file 'abl-lib.sh'.
Copying file 'abl-process.sh'.
The adblock-lean service is already enabled.
adblock-lean has been updated to version 'snapshot'.
Start adblock-lean now? (y|n)
y|n: y
Starting adblock-lean, version 9823713.
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.
No existing compressed or uncompressed blocklist identified.
Testing connectivity.
Downloading and processing blocklist parts (max parallel jobs: 2).
Processing raw allowlist: /etc/adblock-lean/allowlist
Successfully processed list: /etc/adblock-lean/allowlist (0 lines, 0 B).
Not using any allowlist for blocklist processing.
Starting raw blocklist part(s) download.
Processing raw blocklist: https://raw.githubusercontent.com/hagezi/dns-blocklists/main/wildcard/native.tiktok.extended-onlydomains.txt
Processing raw blocklist: https://raw.githubusercontent.com/hagezi/dns-blocklists/main/wildcard/hoster-onlydomains.txt
Successfully processed list: https://raw.githubusercontent.com/hagezi/dns-blocklists/main/wildcard/hoster-onlydomains.txt (2,133 lines, 25.97 KiB).
Processing raw blocklist: https://raw.githubusercontent.com/hagezi/dns-blocklists/main/wildcard/popupads-onlydomains.txt
Successfully processed list: https://raw.githubusercontent.com/hagezi/dns-blocklists/main/wildcard/native.tiktok.extended-onlydomains.txt (361 lines, 9.74 KiB).
Processing raw blocklist: https://raw.githubusercontent.com/hagezi/dns-blocklists/main/wildcard/native.winoffice-onlydomains.txt
Successfully processed list: https://raw.githubusercontent.com/hagezi/dns-blocklists/main/wildcard/native.winoffice-onlydomains.txt (359 lines, 10.96 KiB).
Processing raw blocklist: https://raw.githubusercontent.com/hagezi/dns-blocklists/main/wildcard/native.roku-onlydomains.txt
Successfully processed list: https://raw.githubusercontent.com/hagezi/dns-blocklists/main/wildcard/native.roku-onlydomains.txt (76 lines, 2.23 KiB).
Processing raw blocklist: /etc/adblock-lean/blocklist
Successfully processed list: /etc/adblock-lean/blocklist (4,189 lines, 64.26 KiB).
Successfully processed list: https://raw.githubusercontent.com/hagezi/dns-blocklists/main/wildcard/popupads-onlydomains.txt (99,391 lines, 1.64 MiB).
Successfully generated preprocessed blocklist file with 106,509 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: 1.76 MiB.
Checking dnsmasq instances.
Successfully imported new compressed blocklist file for use by dnsmasq with size: 720.74 KiB.
Restarting dnsmasq.
Waiting for dnsmasq initialization.
Restart of dnsmasq completed.
Processing time for blocklist generation and import: 0m:14s.
Checking 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 file.
New blocklist installed with entries count: 106,494.
Checking for adblock-lean updates.
Getting GitHub ref for snapshot version of adblock-lean.
The locally installed adblock-lean is the latest version.
root@OpenWrt:~# service adblock-lean gen_config
Based on the total usable memory of this device (234.67 MiB), the recommended preset is 'medium':
Elements count: ~450k
blocklist_urls="https://raw.githubusercontent.com/hagezi/dns-blocklists/main/wildcard/pro-onlydomains.txt https://raw.githubusercontent.com/hagezi/dns-blocklists/main/wildcard/tif.medium-o nlydomains.txt"
max_file_part_size_KB="9000"
max_blocklist_file_size_KB="10000"
min_good_line_count="120000"
[C]onfirm this preset or [p]ick another preset?
c|p: p
All available presets:
mini: recommended for devices with 64 MB of memory.
Elements count: ~85k
blocklist_urls="https://raw.githubusercontent.com/hagezi/dns-blocklists/main/wildcard/pro.mini-onlydomains.txt"
max_file_part_size_KB="2000"
max_blocklist_file_size_KB="2000"
min_good_line_count="24000"
small: recommended for devices with 128 MB of memory.
Elements count: ~250k
blocklist_urls="https://raw.githubusercontent.com/hagezi/dns-blocklists/main/wildcard/pro-onlydomains.txt https://raw.githubusercontent.com/hagezi/dns-blocklists/main/wildcard/tif.mini-onl ydomains.txt"
max_file_part_size_KB="5000"
max_blocklist_file_size_KB="6100"
min_good_line_count="71000"
medium: recommended for devices with 256 MB of memory.
Elements count: ~450k
blocklist_urls="https://raw.githubusercontent.com/hagezi/dns-blocklists/main/wildcard/pro-onlydomains.txt https://raw.githubusercontent.com/hagezi/dns-blocklists/main/wildcard/tif.medium-o nlydomains.txt"
max_file_part_size_KB="9000"
max_blocklist_file_size_KB="10000"
min_good_line_count="120000"
large: recommended for devices with 512 MB of memory.
Elements count: ~1200k
blocklist_urls="https://raw.githubusercontent.com/hagezi/dns-blocklists/main/wildcard/pro-onlydomains.txt https://raw.githubusercontent.com/hagezi/dns-blocklists/main/wildcard/tif-onlydoma ins.txt"
max_file_part_size_KB="24000"
max_blocklist_file_size_KB="29000"
min_good_line_count="340000"
large_relaxed: recommended for devices with 1024 MB of memory.
Elements count: ~1200k
blocklist_urls="https://raw.githubusercontent.com/hagezi/dns-blocklists/main/wildcard/pro-onlydomains.txt https://raw.githubusercontent.com/hagezi/dns-blocklists/main/wildcard/tif-onlydoma ins.txt"
max_file_part_size_KB="48000"
max_blocklist_file_size_KB="58000"
min_good_line_count="340000"
Pick preset:
mini|small|medium|large|large_relaxed: small
Selected preset 'small'.
Checking dnsmasq instances.
Detected only 1 dnsmasq instance - skipping manual instance selection.
Selected dnsmasq instance 0: 'cfg01411c'.
Selected dnsmasq conf-dir '/tmp/dnsmasq.cfg01411c.d'.
Cron job configuration:
A cron job can be created to enable automatic list updates.
The default schedule is '0 5 * * *': daily at 5am (5 o'clock at night)
The cron job will run with an added random number of minutes.
Create cron job with default schedule for automatic list updates?
'n' will set the 'cron_schedule' setting to 'disable'. You can later create a cron job with a custom schedule as described in:
https://github.com/lynxthecat/adblock-lean/blob/master/README.md
y|n: y
Generating new default config for adblock-lean from preset 'small'.
This will overwrite existing config. Proceed?
y|n: y
Saving new config file to '/etc/adblock-lean/config'.
root@OpenWrt:~# service adblock-lean start
Starting adblock-lean, version 9823713.
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 compressed backup of existing blocklist.
Checking dnsmasq instances.
Restarting dnsmasq.
Waiting for dnsmasq initialization.
Restart of dnsmasq completed.
Downloading and processing blocklist parts (max parallel jobs: 2).
Processing raw allowlist: /etc/adblock-lean/allowlist
Successfully processed list: /etc/adblock-lean/allowlist (0 lines, 0 B).
Not using any allowlist for blocklist processing.
Starting raw blocklist part(s) download.
Processing raw blocklist: https://raw.githubusercontent.com/hagezi/dns-blocklists/main/wildcard/pro-onlydomains.txt
Processing raw blocklist: https://raw.githubusercontent.com/hagezi/dns-blocklists/main/wildcard/tif.mini-onlydomains.txt
Successfully processed list: https://raw.githubusercontent.com/hagezi/dns-blocklists/main/wildcard/tif.mini-onlydomains.txt (88,670 lines, 1.8 MiB).
Processing raw blocklist: /etc/adblock-lean/blocklist
Successfully processed list: /etc/adblock-lean/blocklist (4,189 lines, 64.26 KiB).
Successfully processed list: https://raw.githubusercontent.com/hagezi/dns-blocklists/main/wildcard/pro-onlydomains.txt (217,018 lines, 4.1 MiB).
Successfully generated preprocessed blocklist file with 309,877 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: 5.73 MiB.
Checking dnsmasq instances.
Successfully imported new compressed blocklist file for use by dnsmasq with size: 2 MiB.
Restarting dnsmasq.
Waiting for dnsmasq initialization.
Restart of dnsmasq completed.
Processing time for blocklist generation and import: 0m:19s.
Checking 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 file.
New blocklist installed with entries count: 293,333.
Checking for adblock-lean updates.
Getting GitHub ref for snapshot version of adblock-lean.
The locally installed adblock-lean is the latest version.
root@OpenWrt:~# vi /etc/adblock-lean/config
root@OpenWrt:~# vi /etc/adblock-lean/config
root@OpenWrt:~# vi /etc/adblock-lean/blocklist
root@OpenWrt:~# service adblock-lean start
Starting adblock-lean, version 9823713.
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 compressed backup of existing blocklist.
Checking dnsmasq instances.
Restarting dnsmasq.
Waiting for dnsmasq initialization.
Restart of dnsmasq completed.
Downloading and processing blocklist parts (max parallel jobs: 2).
Processing raw allowlist: /etc/adblock-lean/allowlist
Successfully processed list: /etc/adblock-lean/allowlist (0 lines, 0 B).
Not using any allowlist for blocklist processing.
Starting raw blocklist part(s) download.
Processing raw blocklist: https://raw.githubusercontent.com/hagezi/dns-blocklists/main/wildcard/popupads-onlydomains.txt
Processing raw blocklist: https://raw.githubusercontent.com/hagezi/dns-blocklists/main/wildcard/native.winoffice-onlydomains.txt
Successfully processed list: https://raw.githubusercontent.com/hagezi/dns-blocklists/main/wildcard/native.winoffice-onlydomains.txt (359 lines, 10.96 KiB).
Processing raw blocklist: https://raw.githubusercontent.com/hagezi/dns-blocklists/main/wildcard/native.tiktok.extended-onlydomains.txt
Successfully processed list: https://raw.githubusercontent.com/hagezi/dns-blocklists/main/wildcard/native.tiktok.extended-onlydomains.txt (361 lines, 9.74 KiB).
Processing raw blocklist: https://raw.githubusercontent.com/hagezi/dns-blocklists/main/wildcard/native.roku-onlydomains.txt
Successfully processed list: https://raw.githubusercontent.com/hagezi/dns-blocklists/main/wildcard/native.roku-onlydomains.txt (76 lines, 2.23 KiB).
Processing raw blocklist: /etc/adblock-lean/blocklist
Successfully processed list: /etc/adblock-lean/blocklist (4,189 lines, 64.26 KiB).
Successfully processed list: https://raw.githubusercontent.com/hagezi/dns-blocklists/main/wildcard/popupads-onlydomains.txt (99,391 lines, 1.64 MiB).
Successfully generated preprocessed blocklist file with 104,376 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: 1.74 MiB.
Checking dnsmasq instances.
Successfully imported new compressed blocklist file for use by dnsmasq with size: 710.99 KiB.
Restarting dnsmasq.
Waiting for dnsmasq initialization.
Restart of dnsmasq completed.
Processing time for blocklist generation and import: 0m:13s.
Checking 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 file.
New blocklist installed with entries count: 104,369.
Checking for adblock-lean updates.
Getting GitHub ref for snapshot version of adblock-lean.
The locally installed adblock-lean is the latest version.
I've been using the snapshot version. I just upgraded to 24.10.1. As per the documentation, I ran "sh /etc/init.d/adblock-lean setup" post upgrade, and I got the following:
sh /etc/init.d/adblock-lean setup
/etc/init.d/adblock-lean is already executable.
Existing config file found.
Generate [n]ew config or use [e]xisting config?
n|e: e
/etc/init.d/adblock-lean: line 796: can't create /var/run/adblock-lean/parser_error: nonexistent directory
Error: Failed to parse config.
In my sysupgrade.conf I have
/etc/init.d/adblock-lean
/etc/adblock-lean/
/etc/adblock-lean/config
/etc/adblock-lean/allowlist
/etc/adblock-lean/blocklist
/usr/lib/adblock-lean/
/usr/lib/adblock-lean/abl-lib.sh
/usr/lib/adblock-lean/abl-process.sh
After running "mkdir /var/run/adblock-lean" the setup command worked successfully.
Thank you for reporting this. Should be fixed in current master
.
Im on 24.10.1 and using the latest luci-adblock-lean ipk and I get
Error checking blocklist status, try again in a minute
Hi, luci-adblock-lean is a separate project by @Ree9 (not officially part of adblock-lean). It is a work-in-progress, and currently a bit behind the adblock-lean development, so you may run into issues when using it, especially with latest versions of adblock-lean. You can report the issue to the author here.
Fellow adblockers, the new adblock-lean release v0.7.0 is now available. The code has been ready for quite some time now in the master
branch but we had some delays with updating the README, and then I've been busy with another project, so just now I had the time to go through the long list of changes and compile them into a coherent announcement.
This is a pretty big update to adblock-lean (177 commits total, big and small), featuring following main changes:
-
Implement parallel downloads and processing
-
Add option
MAX_PARALLEL_JOBS
, default toauto
-
Replace option
initial_dnsmasq_restart
withunload_blocklist_before_update
, default toauto
-
Increase "expected/max" elements count for presets
large
andlarge_relaxed
from 1M to 1.2M -
Tweaks in algorithm calculating the
max_*
andmin_*
default preset values in order to accommodate recent increase in Hagezi'sPro
list entries count (thanks @duceduc for reporting the issue) -
parse_config(): rewrite parser in awk
-
abl_process: skip dnsmasq restart if adblock-lean run state is stopped
-
fix
status
command reported entries count being off by 1 -
The custom script (optionally set in adblock-lean config) can now have the
report_update()
function as requested by @vJoseph, which (if it is defined) will be called to deliver notifications when adblock-lean updates are available -
Multiple major improvements in error detection, handling and reporting
-
Compacted and improved console messages
-
Minor usability improvements
-
Various bugfixes
-
Various minor code optimizations
-
The README was improved and updated
Full Changelog: https://github.com/lynxthecat/adblock-lean/compare/v0.6.2...v0.7.0
Special thank you to @spence for massive help with testing and to @d687r02j8g for testing and reporting issues, and all other users who tested and reported back - it is great to have such a community and it is really helping us to make adblock-lean better!
NOTE: users who have temporarily switched to the snapshot
update channel can now use the following command to switch back to the release
update channel:
service adblock-lean update -v latest
All other users can update to this version, as usual, via the command
service adblock-lean update
New users can install adblock-lean by following the instructions in the official adblock-lean GitHub repository.
Enjoy!
Upgraded successfully. Thanks all!
Hello. I don't receive email notification from this forum for whatever reason. But. I have also updated to v7.0 with no issue. Though I've tried to find the script where report_success() is sending this text below but failed. Perhaps Telegram's unable to parse special characters? It suppose to read as:
New blocklist installed with entries count: 274,403
If it's only for this topic then make sure that this is set like so:
If it's for the whole OpenWrt forum then probably either you registered with wrong email address or your email provider is filtering the messages for one reason or another.
Thanks for the report. The special symbols are colors used when outputting messages to the console. Probably we have a bug which causes them to be attached to the sent message as well. I'll look into this - thank you for the report!