Not sure exactly which htop column to look at, but I get VIRT = 13724 and RES = 13236 after 2h uptime.
initial_dnsmasq_restart is on, didn't try it off.
Not sure exactly which htop column to look at, but I get VIRT = 13724 and RES = 13236 after 2h uptime.
initial_dnsmasq_restart is on, didn't try it off.
That's actually quite impressive
Although I just realized I get this weird system log:
Wed Feb 21 19:55:19 2024 user.notice adblock-lean: The dnsmasq --test on the processed blocklist passed.
Wed Feb 21 19:55:19 2024 user.notice adblock-lean: New blocklist file check passed.
Wed Feb 21 19:55:26 2024 user.notice adblock-lean: Successfully injected new blocklist file for use by dnsmasq with size: 1589 KB.
Wed Feb 21 19:55:26 2024 user.notice adblock-lean: Restarting dnsmasq.
Wed Feb 21 19:55:27 2024 daemon.info dnsmasq[1]: exiting on receipt of SIGTERM
Wed Feb 21 19:55:36 2024 daemon.info dnsmasq[1]: started, version 2.89 cachesize 1000
Wed Feb 21 19:55:36 2024 daemon.info dnsmasq[1]: DNS service limited to local subnets
Wed Feb 21 19:55:36 2024 daemon.info dnsmasq[1]: compile time options: IPv6 GNU-getopt no-DBus UBus no-i18n no-IDN DHCP no-DHCPv6 no-Lua TFTP no-conntrack no-ipset no-nftset no-auth no-cryptohash no-DNSSEC no-ID loop-detect inotify dumpfile
Wed Feb 21 19:55:36 2024 daemon.info dnsmasq[1]: UBus support enabled: connected to system bus
Wed Feb 21 19:55:36 2024 daemon.info dnsmasq-dhcp[1]: DHCP, IP range 192.168.1.100 -- 192.168.1.249, lease time 12h
Wed Feb 21 19:55:36 2024 daemon.info dnsmasq[1]: using only locally-known addresses for test
Wed Feb 21 19:55:36 2024 daemon.info dnsmasq[1]: using only locally-known addresses for onion
Wed Feb 21 19:55:36 2024 daemon.info dnsmasq[1]: using only locally-known addresses for localhost
Wed Feb 21 19:55:36 2024 daemon.info dnsmasq[1]: using only locally-known addresses for local
Wed Feb 21 19:55:36 2024 daemon.info dnsmasq[1]: using only locally-known addresses for invalid
Wed Feb 21 19:55:36 2024 daemon.info dnsmasq[1]: using only locally-known addresses for bind
Wed Feb 21 19:55:36 2024 daemon.info dnsmasq[1]: using only locally-known addresses for zzzyyzzzyyyzyyzyyyzzyyzyzzzzzzzzyyzzyyyyyzyzyyzzyzpol7196.cmkaarten.nl
Wed Feb 21 19:55:36 2024 daemon.info dnsmasq[1]: using only locally-known addresses for zzznews.ru
Wed Feb 21 19:55:36 2024 daemon.info dnsmasq[1]: using 219868 more local addresses
Wed Feb 21 19:55:43 2024 daemon.info dnsmasq[1]: reading /tmp/resolv.conf.d/resolv.conf.auto
Wed Feb 21 19:55:43 2024 daemon.info dnsmasq[1]: using nameserver 9.9.9.9#53
Wed Feb 21 19:55:43 2024 daemon.info dnsmasq[1]: using nameserver 149.112.112.112#53
Wed Feb 21 19:55:43 2024 daemon.info dnsmasq[1]: using nameserver 74.116.184.28#53
Wed Feb 21 19:55:43 2024 daemon.info dnsmasq[1]: using nameserver 96.127.255.29#53
Wed Feb 21 19:55:43 2024 daemon.info dnsmasq[1]: using only locally-known addresses for test
Wed Feb 21 19:55:43 2024 daemon.info dnsmasq[1]: using only locally-known addresses for onion
Wed Feb 21 19:55:43 2024 daemon.info dnsmasq[1]: using only locally-known addresses for localhost
Wed Feb 21 19:55:43 2024 daemon.info dnsmasq[1]: using only locally-known addresses for local
Wed Feb 21 19:55:43 2024 daemon.info dnsmasq[1]: using only locally-known addresses for invalid
Wed Feb 21 19:55:43 2024 daemon.info dnsmasq[1]: using only locally-known addresses for bind
Wed Feb 21 19:55:43 2024 daemon.info dnsmasq[1]: using only locally-known addresses for zzzyyzzzyyyzyyzyyyzzyyzyzzzzzzzzyyzzyyyyyzyzyyzzyzpol7196.cmkaarten.nl
Wed Feb 21 19:55:43 2024 daemon.info dnsmasq[1]: using only locally-known addresses for zzznews.ru
Wed Feb 21 19:55:43 2024 daemon.info dnsmasq[1]: using 219868 more local addresses
Wed Feb 21 19:55:49 2024 daemon.info dnsmasq[1]: read /etc/hosts - 12 names
Wed Feb 21 19:55:49 2024 daemon.err dnsmasq[1]: failed to load names from /var/run/adblock-fast/dnsmasq.addnhosts: No such file or directory
Wed Feb 21 19:55:49 2024 daemon.info dnsmasq[1]: read /tmp/hosts/dhcp.cfg01411c - 4 names
Wed Feb 21 19:55:49 2024 daemon.info dnsmasq[1]: read /tmp/hosts/odhcpd - 4 names
Wed Feb 21 19:55:49 2024 daemon.info dnsmasq-dhcp[1]: read /etc/ethers - 0 addresses
Wed Feb 21 19:55:49 2024 user.notice adblock-lean: Restart of dnsmasq completed.
Wed Feb 21 19:55:49 2024 user.notice adblock-lean: Checking dnsmasq instance.
Wed Feb 21 19:55:50 2024 user.notice adblock-lean: The dnsmasq check passed with new blocklist file.
Wed Feb 21 19:55:50 2024 user.notice adblock-lean: New blocklist installed with good line count: 219869.
Looks like you still have remnants of Adblock-fast in your dnsmasq config. Otherwise the log looks normal.
Thatās weird, I have absolutely no memory of having installed Adblock-fast. Thanks for catching that!
You might like to experiment with the zram-swap package (see the posts on this thread on that topic). Iād be curious if that helps or not on your setup.
Also, you could recover about an extra 1.5MB by deleting the compressed blocklist after the dnsmasq restart, but then thatād require generating a new blocklist from scratch every dnsmasq restart and so the gain is presumably not worth it - does everyone agree?
The beauty of what we have now with the compressed blocklist and extraction script is that every time dnsmasq restarts, the present blocklist will be extracted and loaded. This way only minimal RAM is occupied by the local copy of the blocklist during normal operation.
Pity we canāt have dnsmasq write out its presently loaded blocklist to a compressed file on exit. I wonder if we should ask the dnsmasq maintainers to make that an option?
This device is my parent's router, I don't have access to it very often. I am quite happy with it's current blocklist. Using hagezi pro would be nice, but I'm more interested in blocking harmful content than ads and trackers and I think my blocklist combination strikes a good balance. I would like to block a bit more phishing, but all the phishing lists I've seen are quite big.
I'm wondering if zram would introduce slowdowns because of compression? It's already such a low-powered device, I don't want to slow it down further. The original adblock was actually quite unusable with anything but a few thousand entries because of a slowed DNS lookup.
The idea to keep the final blocklist in /tmp/dnsmasq.d/ was always incase of unexpected dnsmasq restarts, in which case the existing blocklist would simply be reloaded - no other intervention required. I think the specific example given was that DoH would restart dnsmasq on interface refreshes (or somthing along those lines). Not that DoH is a default package anyway, but still a good example.
HI,
just remove adblock to install adblock-lean, I have some questions, is my log is ok after I did restart the app;
Fri Feb 23 15:47:04 2024 user.notice adblock-lean: Download of new blocklist file part from: https://raw.githubusercontent.com/hagezi/dns-blocklists/main/dnsmasq/pro.txt suceeded (downloaded file size: 6843 KB; line count: 249871).
Fri Feb 23 15:47:04 2024 user.notice adblock-lean: Sanitizing blocklist file part.
Fri Feb 23 15:47:09 2024 user.notice adblock-lean: Checking for any rogue elements.
Fri Feb 23 15:47:13 2024 user.notice adblock-lean: Successfully generated preprocessed blocklist file with 249871 line(s).
Fri Feb 23 15:47:13 2024 user.notice adblock-lean: Removing duplicates and forming new preprocessed blocklist file.
Fri Feb 23 15:47:13 2024 user.notice adblock-lean: No local allowlist identified.
Fri Feb 23 15:47:15 2024 user.notice adblock-lean: Processed blocklist file size: 6843 KB.
Fri Feb 23 15:47:15 2024 user.notice adblock-lean: Performing dnsmasq --test on the processed blocklist.
Fri Feb 23 15:47:15 2024 user.notice adblock-lean: dnsmasq --test output: dnsmasq: syntax check OK.
Fri Feb 23 15:47:15 2024 user.notice adblock-lean: The dnsmasq --test on the processed blocklist passed.
Fri Feb 23 15:47:15 2024 user.notice adblock-lean: New blocklist file check passed.
Fri Feb 23 15:47:16 2024 user.notice adblock-lean: Successfully injected new blocklist file for use by dnsmasq with size: 1813 KB.
Fri Feb 23 15:47:16 2024 user.notice adblock-lean: Restarting dnsmasq.
Fri Feb 23 15:47:16 2024 daemon.info dnsmasq[1]: exiting on receipt of SIGTERM
Fri Feb 23 15:47:19 2024 daemon.crit dnsmasq[1]: cannot execute sh /tmp/dnsmasq.d/.extract_blocklist: No such file or directory
Fri Feb 23 15:47:19 2024 daemon.crit dnsmasq[1]: FAILED to start up
Fri Feb 23 15:47:24 2024 daemon.crit dnsmasq[1]: cannot execute sh /tmp/dnsmasq.d/.extract_blocklist: No such file or directory
Fri Feb 23 15:47:24 2024 daemon.crit dnsmasq[1]: FAILED to start up
Fri Feb 23 15:47:29 2024 daemon.crit dnsmasq[1]: cannot execute sh /tmp/dnsmasq.d/.extract_blocklist: No such file or directory
Fri Feb 23 15:47:29 2024 daemon.crit dnsmasq[1]: FAILED to start up
Fri Feb 23 15:47:34 2024 daemon.crit dnsmasq[1]: cannot execute sh /tmp/dnsmasq.d/.extract_blocklist: No such file or directory
Fri Feb 23 15:47:34 2024 daemon.crit dnsmasq[1]: FAILED to start up
Fri Feb 23 15:47:39 2024 daemon.crit dnsmasq[1]: cannot execute sh /tmp/dnsmasq.d/.extract_blocklist: No such file or directory
Fri Feb 23 15:47:39 2024 daemon.crit dnsmasq[1]: FAILED to start up
Fri Feb 23 15:47:44 2024 daemon.crit dnsmasq[1]: cannot execute sh /tmp/dnsmasq.d/.extract_blocklist: No such file or directory
Fri Feb 23 15:47:44 2024 daemon.crit dnsmasq[1]: FAILED to start up
Fri Feb 23 15:47:44 2024 daemon.info procd: Instance dnsmasq::cfg01411c s in a crash loop 6 crashes, 0 seconds since last crash
Fri Feb 23 15:48:19 2024 user.notice adblock-lean: Restart of dnsmasq completed.
Fri Feb 23 15:48:19 2024 user.notice adblock-lean: Checking dnsmasq instance.
Fri Feb 23 15:48:19 2024 user.notice adblock-lean: No instance of dnsmasq detected with new blocklist.
Fri Feb 23 15:48:19 2024 user.notice adblock-lean: The dnsmasq check failed with new blocklist file.
Fri Feb 23 15:48:19 2024 user.notice adblock-lean: No previous blocklist file found.
root@OpenWrt:~/adblock-lean# /etc/init.d/adblock-lean status
Checking dnsmasq instance.
No instance of dnsmasq detected with new blocklist.
The dnsmasq check failed with existing blocklist file.
Considering a full reset by running service adblock stop.
and in my startup I see adblock, should I see adblock-lean?
thanks
Um no thatās certainly not OK.
Does adblock interfere with the dnsmasq directory? Since it seems your dnsmasq tries to run the adblock-lean dnsmasq conf file entry bit then fails to identify the extract script needed to decompress the blocklist. So Iām wondering if adblock has removed that.
Either something is very broken in your setup or very broken with adblock-lean.
I think remove all traces of adblock before running adblock-lean.
I completely removed adblock but when I start adblock-lean, I loose wifi connection
Probably best to have only one adblock installed, so try and remove "adblock" completely and see how that goes. Adblock-lean will be at the bottom of the list, ordered by startup priority 99 on the left column.
What commands did you run during adblock-lean setup?
All of these?
wget https://raw.githubusercontent.com/lynxthecat/adblock-lean/main/adblock-lean -O /etc/init.d/adblock-lean
chmod +x /etc/init.d/adblock-lean
service adblock-lean gen_config # generates default config in /root/adblock-lean/config
uci add_list dhcp.@dnsmasq[0].addnmount='/bin/busybox' && uci commit # to enable use of compressed blocklist
service adblock-lean enable
yes, exactly
Looks like adblock is still present. Lurking in a corner. You think itās gone. But itās there in the shadows staring at you with red eyes.
I dont think so, really, nothing in /etc, in/init.d and in condfig
Can you post your /root/adblock-lean/config file pls
root@OpenWrt:/etc/config# cat /root/adblock-lean/config
# adblock-lean configuration options
# One or more dnsmasq blocklist urls separated by spaces
blocklist_urls="https://raw.githubusercontent.com/hagezi/dns-blocklists/main/dnsmasq/pro.txt"
# Path to optional local allowlist/blocklist files in the form:
# site1.com
# site2.com
local_allowlist_path="/root/adblock-lean/allowlist"
local_blocklist_path="/root/adblock-lean/blocklist"
# Mininum number of lines of any individual downloaded blocklist part
min_blocklist_file_part_line_count=1
# Maximum size of any individual downloaded blocklist part
max_blocklist_file_part_size_KB=20000
# Maximum total size of combined, processed blocklist
max_blocklist_file_size_KB=30000
# Minimum number of good lines in final postprocessed blocklist
min_good_line_count=100000
# compress blocklist to save memory once blocklist has been loaded
compress_blocklist=1 # enable (1) or disable (0) blocklist compression
# restart dnsmasq if previous blocklist was extracted and before generation of
# new blocklist thereby to free up memory during generaiton of new blocklist
initial_dnsmasq_restart=0 # enable (1) or disable (0) initial dnsmasq restart
# Rogue element action:
# SKIP_PARTIAL - skip failed blocklist file part and continue blocklist generation
# STOP - stop blocklist generation (and fallback to previous blocklist if available)
# IGNORE - ignore any rogue elements (warning: use with caution)
rogue_element_action="SKIP_PARTIAL"
# Download failed action:
# SKIP_PARTIAL - skip failed blocklist file part and continue blocklist generation
# STOP - stop blocklist generation (and fallback to previous blocklist if available)
download_failed_action="SKIP_PARTIAL"
# The following shell variables are invoked using:
# 'eval ${report_failure}' and 'eval ${report_success}'
# thereby to facilitate sending e.g. mailsend/sms notifications
# The variables '${failure_msg}' and '${success_msg}' can be employed
report_failure=""
report_success=""
# Start delay in seconds when service is started from system boot
boot_start_delay_s=120
root@OpenWrt:/etc/config#
Maybe just try this and see what happens
compress_blocklist=0
Have you tried a reboot at all?
I will reboot to see,
seems good, thanks
root@OpenWrt:~# /etc/init.d/adblock-lean status
Blocklist in /tmp/dnsmasq.d/ not identified.
adblock-lean is not active.
root@OpenWrt:~# /etc/init.d/adblock-lean start
Started adblock-lean.
No existing compressed or uncompressed blocklist identified.
No local blocklist identified.
Downloading new blocklist file part(s).
Downloading new blocklist file part from: https://raw.githubusercontent.com/hagezi/dns-blocklists/main/dnsmasq/pro.txt.
Download of new blocklist file part from: https://raw.githubusercontent.com/hagezi/dns-blocklists/main/dnsmasq/pro.txt suceeded (downloaded file size: 6843 KB; line count: 249871).
Sanitizing blocklist file part.
Checking for any rogue elements.
Successfully generated preprocessed blocklist file with 249871 line(s).
Removing duplicates and forming new preprocessed blocklist file.
No local allowlist identified.
Processed blocklist file size: 6843 KB.
Performing dnsmasq --test on the processed blocklist.
dnsmasq --test output: dnsmasq: syntax check OK.
The dnsmasq --test on the processed blocklist passed.
New blocklist file check passed.
Successfully injected new blocklist file for use by dnsmasq with size: 6843 KB.
Restarting dnsmasq.
Restart of dnsmasq completed.
Checking dnsmasq instance.
The dnsmasq check passed with new blocklist file.
New blocklist installed with good line count: 249871.
root@OpenWrt:~#
root@OpenWrt:~# /etc/init.d/adblock-lean status
Checking dnsmasq instance.
The dnsmasq check passed and the presently installed blocklist has good line count: 249871.
adblock-lean appears to be active.
Generating dnsmasq stats.
dnsmasq stats available for reading using 'logread'.