Experimental feature if people want to try. Based on a link posted in the diversion thread, there seems to be some new ways to make
YouTube ads blocking (or at least greatly reduce).
https://discourse.pi-hole.net/t/youtube-script-seems-to-be-working-very-well/31316/68
Now, I am a YT Premium subscriber, so I don't see ads, but did some testing in an incognito browser, and it seems to be working.
So, I created a new script for unbound in my dev branch. You need to download it and place it next to the gen_adblock.sh file in /opt/var/lib/unbound/adblock/
Code:
https://raw.githubusercontent.com/juched78/Unbound-Asuswrt-Merlin/develop/adblock/gen_ytadblock.sh
Then add a cron job to run every 5 minutes:
Code:
cru a ytadblock "*/5 * * * * /opt/var/lib/unbound/adblock/gen_ytadblock.sh"
What this script does it check the unbound cache for hits to the googlevideo URL as indicated in the discourse thread above. When it finds hits it add them in as local-data items into unbound every 5 minutes.
Unlike the thread above, you don't need to find the IP to use, this script will find the first IP and use it, and store it for future use. So, you simply set it and start watching YT. after 5 minutes, and every 5 minutes it will check and expand the list, and soon your ads should start stopping or greatly reducing.
If people want to try it and let me know the results, that would be great. running the script directly will simply update the list and tell you how many YT domains are being redirected.
Thanks!
Note: This script doesn't restart unbound, and don't change any settings. To uninstall simply:
Code:
rm -rf /opt/share/unbound/configs/ipytforce
rm -rf /opt/var/lib/unbound/adblock/gen_ytadblock.sh
rm -rf /opt/var/lib/unbound/adblock/ytadblock
unbound_manager restart