Router-based advert blockers cannot effectively block YouTube adverts owing to the use of end-to-end encryption and the router not seeing the traffic sent through the encrypted channel (*).
There was a chrome extension: ublock-origin that can (since at the browser the traffic is unencrypted), but I saw a notification about its support getting dropped (and hence chrome wants to disable it and so it had to be manually re-enabled) - so how long it will remain working for under chrome is uncertain.
(*) one way to overcome this issue is to provide a kind of man-in-the-middle arrangement in which YouTube video traffic can nevertheless be seen by the router. Or a kind of proxy service that recreates the interface on the fly like this one:
That requires a lot of CPU power on the router to run.
So browser-based extensions like ublock-origin seem best.
First of all, thank you for your answer. I'll read the linked page.
What surprises me is that it previously worked on both YouTube and Twitch and commercials were filtered out after 2 seconds.
Are you sure that you are not using any in-browser extension to block ads? This could be simply a case where that extension was blocking YouTube ads previously but coincidentally is not blocking them now because a change in YouTube or in the extension.
Besides that, are ads on other websites blocked by adblock-lean?
Your problem is on YouTube's end. They inject ads into the video streams since YT earns money by showing users ads (or from subscriptions). So that is why DNS based adblocking does not work. Some adblockers use different methods to block ads. However, it is always a game of cat and mice between those adblockers and Alphabet Inc.
A change in adblock-lean is very unlikely to have caused this change because, as noted above by @Lynx and by @Bartvz, DNS-based adblocking is not able to block Youtube video ads in the first place, and never was able to (at least not in recent years). Also there has not been any change in adblock-lean code which could have changed anything related to this. Possibly Youtube was not showing ads in your region for one reason or another, and now it is. Anyway, the way forward is using ublock-origin in your browser.
Antonk is correct. For chrome based browsers you can use Adblock Origin Lite since the original Adblock Origin is not working correctly anymore die to changes Google made in the Chrome Framework. For Firefox based browsers it still works with the Original Extension. If you want to get rid also of promo and sponsor stuff in videos, you can add the extension "SponsorBlock" for a complete adfree/commercial free YouTube experience.
Hello everyone!
First of all, thank you for this adblocker, it is really amazing!!
I ran into an issue today that i thought it was because my power went down, ads were not being blocked. I thought it was a bad boot from the router or something, but then i stumbled into this:
root@OpenWrt:/etc/adblock-lean# service adblock-lean start
Starting adblock-lean, version v0.6.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.
No existing compressed or uncompressed blocklist identified.
Testing connectivity.
No local allowlist identified.
Not using any allowlist for blocklist processing.
No local blocklist identified.
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.
Successfully processed blocklist (source file size: 3.54 MiB, sanitized line count: 188,920).
Downloading, checking and sanitizing raw blocklist part from: https://raw.githubusercontent.com/hagezi/dns-blocklists/main/wildcard/tif-onlydomains.txt.
Error: downloaded blocklist part size reached the maximum value set in config (19000 KB).
Consider either increasing this value in the config or removing the corresponding blocklist part path or URL from config.
Skipping file and continuing.
Successfully generated preprocessed blocklist file with 188,920 entries.
Sorting and merging the blocklist parts into a single blocklist file.
Stopping dnsmasq.
Checking the resulting blocklist with 'dnsmasq --test'.
Error: Entries count (188,920) is below the minimum value set in config (330,000).
Error: Failed to generate new blocklist.
Restoring saved blocklist file.
Error: No previous blocklist file found.
Error: Failed to restore saved blocklist.
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.
perhaps an increase in max_file_part_size_KB is needed in the large presets, right?
when i changed the max_file_part_size_KB to 39000 it worked perfectly again.
Having issues adding urls to allowlist. After I add them in nano and restart I get an error message: Error: Download of new allowlist file part from: raw.githubusercontent.com failed. This goes for all the urls and adblock-lean won't start up. Clearly I'm doing something wrong but can't figure it out.
Yes. There is no need to uninstall when you break your config - just run service adblock-lean gen_config and a new config will be created for you (also it may help to read the readme which mentions this). We can guide you if you need help, as long as you provide the requested information (i.e. contents of config file you're having trouble with)
Also, just to clarify: the allowlist_urls option in the config is not where you specify which domains to allow. This is where you specify URLs which adblock-lean downloads the allowlists from. If you just want to allow certain domains which you specify by yourself, this is not the way to do it. Rather, create the file /etc/adblock-lean/allowlist and put your domains in that file (one domain per line), then run the command service adblock-lean start.
I think we should also add a separate section in the readme explaining the local allowlist/blocklist functionality. Thank you for letting us know about the issue.
Was actually just looking at the luci app to see if any updates were needed in relation to the abl updates.
I tried wiping my system clean, then installing the luci app, then using its install screen to install abl, but have run into an issue.
It looks like the luci app is able to make the rpc call to the install function, which downloads the latest adblock-lean, and puts it into /etc/init.d/adblock-lean, but then presumably when setup is called something is failing because the things I'd expect to happen after that don't happen (make /etc/init.d/adblock-lean executable, generate a config file, etc)
Do you know if any changes are needed in how I call setup here?
EDIT: I created a test.sh that sourced adblock-lean and called setup, and it errored out because the library files are missing. It said I should run update -f and try setup again, so I changed the rpc script to call update -f before setup and that seems to do the trick. Just want to confirm that's what I should do, or is there a different way I should go about it?
So the new rpc function looks like:
if . "$adblockLeanFilename"; then
update -f
setup
install_abl_result=$?
else
install_abl_result=3 # this indicates error while initializing the script
fi
There are some nuances related to switching from all-in-one script to main script + libraries which the luci app needs to take into account. I'll write a more comprehensive reply soon.