NewDisplayName Posted October 16, 2019 Share Posted October 16, 2019 (edited) So hi there guys, im proud to present you a way to block ALL (more or less) ADs in youtube (like on your mobile youtube app - or TV app) with pihole docker. I think it works by extracting ad urls out of the log files of pihole and then blocking it, while allowing normal videos to play. This means, you need to watch every (or visit) ad one time, and then after 15 minutes it should be automatic added to blocklist so you dont need to see it another time. This is neccessary because youtube changes his URLs so often. This is all NOT my WORK (!!!), i just scratched it (and repaired it) from https://discourse.pi-hole.net/t/how-do-i-block-ads-on-youtube/253/117 many many thanks to Joshua_joezoef_B_ZzO and all other in this thread who helped. BUT i need some help to finish it. See the end of my text. You can skip 1.) if your pihole docker is already set up (you might need to change locations tho if you dont use the same official pihole docker then I!) 1.) Install Pihole docker i recommend using the pihole:latest (https://github.com/pi-hole/docker-pi-hole) I use the following "extra arguments": -e WEBPASSWORD= -v /mnt/user/appdata/pihole:/etc/pihole --cap-add=NET_ADMIN --dns=127.0.0.1 --dns=8.8.8.8 --env DNS1=192.168.0.1 --env DNS2="no" --restart=unless-stopped "-e WEBPASSWORD=" mean no password, you can add your own password if you like. "v /mnt/user/appdata/pihole:/etc/pihole" this allows you to access the inside of the docker from outside (e.g. via SMB) "--cap-add=NET_ADMIN" recommended (dont know) "--dns=127.0.0.1 --dns=8.8.8.8" this is the DNS Server for the pihole docker (!) first should always be 127.0.0.1 ! "--env DNS1=192.168.0.1 --env DNS2="no"" optional, thats the upstream DNS. I want pihole to query my router when he cant find a IP to a domain name (like local DNS name resolution) If not set, will default to googles DNS Service. "--restart=unless-stopped" recommended (restarts if something fails) 2.) download youtube-adblock-install.sh and put it in your pihole directory (should be reachable via SMB from outside now) 3.) make it executable chmod +x /your/path/may/another/youtube-adblock-install.sh 4.) run youtube-adblock-install.sh from inside the container (i used docker exec pihole sh /etc/pihole/youtube-adblock-install.sh within the unraid terminal) Now comes my problem. The script itself seems to work. The problem is that some characters from the install script dont get correct written to the youtube-ads.sh (thats the script that the cron entry runs every 15min. Thats why i have uploaded the youtube-ads.sh also, compare it to my version if it doenst work. Next problem is, every update to the pihole docker will probably (?) remove these modifications, i need help out of the community to rewrite this script so that it can be run outside of the docker and just inserted... into pihole? You can check if it works when you go to http://pihole/youtube-ads-list.txt Thats my steady growing list at the moment: r8.sn-4g5ednzz.googlevideo.com r8---sn-4g5ednzz.googlevideo.com r6.sn-4g5ednll.googlevideo.com r6.sn-4g5edney.googlevideo.com r6.sn-4g5ednek.googlevideo.com r6.sn-4g5ednee.googlevideo.com r6.sn-4g5edn7e.googlevideo.com r6.sn-4g5e6nez.googlevideo.com r6---sn-4g5ednll.googlevideo.com r6---sn-4g5edney.googlevideo.com r6---sn-4g5ednek.googlevideo.com r6---sn-4g5ednee.googlevideo.com r6---sn-4g5edn7e.googlevideo.com r6---sn-4g5e6nez.googlevideo.com r5.sn-h0jeenek.googlevideo.com r5.sn-4g5ednzz.googlevideo.com r5.sn-4g5ednsz.googlevideo.com r5.sn-4g5ednsy.googlevideo.com r5.sn-4g5ednsr.googlevideo.com r5.sn-4g5ednsl.googlevideo.com r5.sn-4g5ednsd.googlevideo.com r5.sn-4g5edns6.googlevideo.com r5.sn-4g5ednly.googlevideo.com r5.sn-4g5edn7s.googlevideo.com r5.sn-4g5e6nzl.googlevideo.com r5.sn-4g5e6nze.googlevideo.com r5.sn-4g5e6nz7.googlevideo.com r5.sn-4g5e6nsz.googlevideo.com r5.sn-4g5e6nsy.googlevideo.com r5.sn-4g5e6nss.googlevideo.com r5.sn-4g5e6nsk.googlevideo.com r5.sn-4g5e6ns7.googlevideo.com r5.sn-4g5e6ns6.googlevideo.com r5.sn-4g5e6nls.googlevideo.com r5.sn-4g5e6ney.googlevideo.com r5.sn-4g5e6n7r.googlevideo.com r5.sn-4g5e6n7k.googlevideo.com r5---sn-h0jeenek.googlevideo.com r5---sn-4g5ednzz.googlevideo.com r5---sn-4g5ednsz.googlevideo.com r5---sn-4g5ednsy.googlevideo.com r5---sn-4g5ednsr.googlevideo.com r5---sn-4g5ednsl.googlevideo.com r5---sn-4g5ednsd.googlevideo.com r5---sn-4g5edns6.googlevideo.com r5---sn-4g5ednly.googlevideo.com r5---sn-4g5edn7s.googlevideo.com r5---sn-4g5e6nzl.googlevideo.com r5---sn-4g5e6nze.googlevideo.com r5---sn-4g5e6nz7.googlevideo.com r5---sn-4g5e6nsz.googlevideo.com r5---sn-4g5e6nsy.googlevideo.com r5---sn-4g5e6nss.googlevideo.com r5---sn-4g5e6nsk.googlevideo.com r5---sn-4g5e6ns7.googlevideo.com r5---sn-4g5e6ns6.googlevideo.com r5---sn-4g5e6nls.googlevideo.com r5---sn-4g5e6ney.googlevideo.com r5---sn-4g5e6n7r.googlevideo.com r5---sn-4g5e6n7k.googlevideo.com r4.sn-4g5ednz7.googlevideo.com r4.sn-4g5ednsy.googlevideo.com r4.sn-4g5ednsk.googlevideo.com r4.sn-4g5ednsd.googlevideo.com r4---sn-4g5ednz7.googlevideo.com r4---sn-4g5ednsy.googlevideo.com r4---sn-4g5ednsk.googlevideo.com r4---sn-4g5ednsd.googlevideo.com r3.sn-4g5ednz7.googlevideo.com r3.sn-4g5ednss.googlevideo.com r3.sn-4g5ednsd.googlevideo.com r3.sn-4g5ednls.googlevideo.com r3.sn-4g5ednll.googlevideo.com r3.sn-4g5ednee.googlevideo.com r3.sn-4g5edned.googlevideo.com r3.sn-4g5edne7.googlevideo.com r3.sn-4g5edne6.googlevideo.com r3.sn-4g5e6nzz.googlevideo.com r3.sn-4g5e6nzs.googlevideo.com r3.sn-4g5e6nsz.googlevideo.com r3.sn-4g5e6nsy.googlevideo.com r3.sn-4g5e6nsk.googlevideo.com r3.sn-4g5e6nle.googlevideo.com r3.sn-4g5e6nld.googlevideo.com r3---sn-4g5ednz7.googlevideo.com r3---sn-4g5ednss.googlevideo.com r3---sn-4g5ednsd.googlevideo.com r3---sn-4g5ednls.googlevideo.com r3---sn-4g5ednll.googlevideo.com r3---sn-4g5ednee.googlevideo.com r3---sn-4g5edned.googlevideo.com r3---sn-4g5edne7.googlevideo.com r3---sn-4g5edne6.googlevideo.com r3---sn-4g5e6nzz.googlevideo.com r3---sn-4g5e6nzs.googlevideo.com r3---sn-4g5e6nsz.googlevideo.com r3---sn-4g5e6nsy.googlevideo.com r3---sn-4g5e6nsk.googlevideo.com r3---sn-4g5e6nle.googlevideo.com r3---sn-4g5e6nld.googlevideo.com r2.sn-hp57kn6e.googlevideo.com r2.sn-h0jeln7e.googlevideo.com r2.sn-h0jeener.googlevideo.com r2.sn-h0jeen76.googlevideo.com r2.sn-4g5ednzz.googlevideo.com r2.sn-4g5ednly.googlevideo.com r2.sn-4g5ednls.googlevideo.com r2.sn-4g5ednle.googlevideo.com r2.sn-4g5ednee.googlevideo.com r2.sn-4g5edned.googlevideo.com r2.sn-4g5edn7y.googlevideo.com r2.sn-4g5e6nsz.googlevideo.com r2.sn-4g5e6nsy.googlevideo.com r2.sn-4g5e6nsk.googlevideo.com r2.sn-4g5e6ns6.googlevideo.com r2.sn-4g5e6nl7.googlevideo.com r2.sn-4g5e6ney.googlevideo.com r2---sn-hp57kn6e.googlevideo.com r2---sn-h0jeln7e.googlevideo.com r2---sn-h0jeener.googlevideo.com r2---sn-h0jeen76.googlevideo.com r2---sn-4g5ednzz.googlevideo.com r2---sn-4g5ednse.googlevideo.com r2---sn-4g5ednly.googlevideo.com r2---sn-4g5ednls.googlevideo.com r2---sn-4g5ednle.googlevideo.com r2---sn-4g5ednee.googlevideo.com r2---sn-4g5edned.googlevideo.com r2---sn-4g5edn7y.googlevideo.com r2---sn-4g5e6nsz.googlevideo.com r2---sn-4g5e6nsy.googlevideo.com r2---sn-4g5e6nsk.googlevideo.com r2---sn-4g5e6ns6.googlevideo.com r2---sn-4g5e6nl7.googlevideo.com r2---sn-4g5e6ney.googlevideo.com r15.sn-4g5ednzz.googlevideo.com r15---sn-4g5ednzz.googlevideo.com r11.sn-4g5ednzz.googlevideo.com r11---sn-4g5ednzz.googlevideo.com r10.sn-4g5ednzz.googlevideo.com r10---sn-4g5ednzz.googlevideo.com r1.sn-h0jeln7e.googlevideo.com r1.sn-h0jeened.googlevideo.com r1.sn-h0jeen76.googlevideo.com r1.sn-4g5ednsd.googlevideo.com r1.sn-4g5ednly.googlevideo.com r1.sn-4g5ednll.googlevideo.com r1.sn-4g5edne6.googlevideo.com r1.sn-4g5e6nzz.googlevideo.com r1.sn-4g5e6nz7.googlevideo.com r1.sn-4g5e6nsy.googlevideo.com r1.sn-4g5e6nez.googlevideo.com r1---sn-h0jeln7e.googlevideo.com r1---sn-h0jeened.googlevideo.com r1---sn-h0jeen76.googlevideo.com r1---sn-4g5ednsd.googlevideo.com r1---sn-4g5ednly.googlevideo.com r1---sn-4g5ednll.googlevideo.com r1---sn-4g5edne6.googlevideo.com r1---sn-4g5e6nzz.googlevideo.com r1---sn-4g5e6nz7.googlevideo.com r1---sn-4g5e6nsy.googlevideo.com r1---sn-4g5e6ns7.googlevideo.com r1---sn-4g5e6nez.googlevideo.com manifest.googlevideo.com r8.sn-n02xgoxufvg3-2gbs.googlevideo.com r8---sn-n02xgoxufvg3-2gbs.googlevideo.com r6.sn-4g5edne7.googlevideo.com r6---sn-4g5edne7.googlevideo.com r5.sn-hp57yn7y.googlevideo.com r5---sn-hp57yn7y.googlevideo.com r4.sn-h0jeln7l.googlevideo.com r4.sn-h0jeln7e.googlevideo.com r4.sn-h0jeened.googlevideo.com r4.sn-4g5ednzz.googlevideo.com r4.sn-4g5edns7.googlevideo.com r4.sn-4g5ednly.googlevideo.com r4.sn-4g5ednld.googlevideo.com r4.sn-4g5edney.googlevideo.com r4.sn-4g5e6nzs.googlevideo.com r4.sn-4g5e6ns6.googlevideo.com r4.sn-4g5e6nez.googlevideo.com r4---sn-h0jeln7l.googlevideo.com r4---sn-h0jeln7e.googlevideo.com r4---sn-h0jeened.googlevideo.com r4---sn-4g5ednzz.googlevideo.com r4---sn-4g5edns7.googlevideo.com r4---sn-4g5ednly.googlevideo.com r4---sn-4g5ednld.googlevideo.com r4---sn-4g5edney.googlevideo.com r4---sn-4g5e6nzs.googlevideo.com r4---sn-4g5e6ns6.googlevideo.com r4---sn-4g5e6nez.googlevideo.com r3.sn-4g5ednzz.googlevideo.com r3.sn-4g5ednsz.googlevideo.com r3.sn-4g5edns6.googlevideo.com r3.sn-4g5ednld.googlevideo.com r3.sn-4g5e6nsr.googlevideo.com r3.sn-4g5e6nl7.googlevideo.com r3---sn-4g5ednzz.googlevideo.com r3---sn-4g5ednsz.googlevideo.com r3---sn-4g5edns6.googlevideo.com r3---sn-4g5ednld.googlevideo.com r3---sn-4g5e6nsr.googlevideo.com r3---sn-4g5e6nl7.googlevideo.com r2.sn-4g5ednse.googlevideo.com r2.sn-4g5ednld.googlevideo.com r2.sn-4g5e6nzl.googlevideo.com r2.sn-4g5e6nez.googlevideo.com r2---sn-4g5ednld.googlevideo.com r2---sn-4g5e6nzl.googlevideo.com r2---sn-4g5e6nez.googlevideo.com r1.sn-4g5ednsr.googlevideo.com r1.sn-4g5ednsl.googlevideo.com r1.sn-4g5ednse.googlevideo.com r1.sn-4g5edned.googlevideo.com r1.sn-4g5e6ns7.googlevideo.com r1.sn-4g5e6ns6.googlevideo.com r1.sn-4g5e6nl6.googlevideo.com r1.sn-4g5e6ne6.googlevideo.com r1---sn-4g5ednsr.googlevideo.com r1---sn-4g5ednsl.googlevideo.com r1---sn-4g5ednse.googlevideo.com r1---sn-4g5edned.googlevideo.com r1---sn-4g5e6ns6.googlevideo.com r1---sn-4g5e6nl6.googlevideo.com r1---sn-4g5e6ne6.googlevideo.com If you have any questions i try to help as much as i can. But im no programer. youtube-adblock-install.sh youtube-ads.sh Edited October 16, 2019 by nuhll Quote Link to comment
Xaero Posted October 17, 2019 Share Posted October 17, 2019 6 hours ago, nuhll said: So hi there guys, im proud to present you a way to block ALL (more or less) ADs in youtube (like on your mobile youtube app - or TV app) with pihole docker. I think it works by extracting ad urls out of the log files of pihole and then blocking it, while allowing normal videos to play. This means, you need to watch every (or visit) ad one time, and then after 15 minutes it should be automatic added to blocklist so you dont need to see it another time. This is neccessary because youtube changes his URLs so often. This is all NOT my WORK (!!!), i just scratched it (and repaired it) from https://discourse.pi-hole.net/t/how-do-i-block-ads-on-youtube/253/117 many many thanks to Joshua_joezoef_B_ZzO and all other in this thread who helped. BUT i need some help to finish it. See the end of my text. You can skip 1.) if your pihole docker is already set up (you might need to change locations tho if you dont use the same official pihole docker then I!) 1.) Install Pihole docker i recommend using the pihole:latest (https://github.com/pi-hole/docker-pi-hole) I use the following "extra arguments": -e WEBPASSWORD= -v /mnt/user/appdata/pihole:/etc/pihole --cap-add=NET_ADMIN --dns=127.0.0.1 --dns=8.8.8.8 --env DNS1=192.168.0.1 --env DNS2="no" --restart=unless-stopped "-e WEBPASSWORD=" mean no password, you can add your own password if you like. "v /mnt/user/appdata/pihole:/etc/pihole" this allows you to access the inside of the docker from outside (e.g. via SMB) "--cap-add=NET_ADMIN" recommended (dont know) "--dns=127.0.0.1 --dns=8.8.8.8" this is the DNS Server for the pihole docker (!) first should always be 127.0.0.1 ! "--env DNS1=192.168.0.1 --env DNS2="no"" optional, thats the upstream DNS. I want pihole to query my router when he cant find a IP to a domain name (like local DNS name resolution) If not set, will default to googles DNS Service. "--restart=unless-stopped" recommended (restarts if something fails) 2.) download youtube-adblock-install.sh and put it in your pihole directory (should be reachable via SMB from outside now) 3.) make it executable chmod +x /your/path/may/another/youtube-adblock-install.sh 4.) run youtube-adblock-install.sh from inside the container (i used docker exec pihole sh /etc/pihole/youtube-adblock-install.sh within the unraid terminal) Now comes my problem. The script itself seems to work. The problem is that some characters from the install script dont get correct written to the youtube-ads.sh (thats the script that the cron entry runs every 15min. Thats why i have uploaded the youtube-ads.sh also, compare it to my version if it doenst work. Next problem is, every update to the pihole docker will probably (?) remove these modifications, i need help out of the community to rewrite this script so that it can be run outside of the docker and just inserted... into pihole? You can check if it works when you go to http://pihole/youtube-ads-list.txt Thats my steady growing list at the moment: If you have any questions i try to help as much as i can. But im no programer. youtube-adblock-install.sh 3.91 kB · 0 downloads youtube-ads.sh 1.19 kB · 0 downloads See my (old, outdated, don't use it anymore plex has been updated) Plex wrapper script here: https://github.com/Xaero252/unraid-plex-nvdec This script can be added to CA User Scripts to run after your automatic docker updates to reinstall the modifications after the docker has updated. Similarly, you could do this with the pihole docker. I would also suggest pinging the pihole docker maintainer and see if they might be willing to add a layer for your modification. Since its a direct extension of pihole rather than a hack like my plex script, it is more reasonable to include it in the actual docker image as an optional flag. Quote Link to comment
hernandito Posted November 2, 2019 Share Posted November 2, 2019 Hi, I would love this... can you please clarify Quote Now comes my problem. The script itself seems to work. The problem is that some characters from the install script dont get correct written to the youtube-ads.sh (thats the script that the cron entry runs every 15min. Thats why i have uploaded the youtube-ads.sh also, compare it to my version if it doenst work. ‘Thanks, H. Quote Link to comment
NewDisplayName Posted November 3, 2019 Author Share Posted November 3, 2019 (edited) Just let the install script run and then look at youtube-ads.sh, it should look like mine. If not, change it (or download mine). Anyway i removed it after some testing, it seems to block some ads, but not all, but more of a problem is that "auto run next video" doesnt work anymore... also some videos only start after F5... Edited November 3, 2019 by nuhll Quote Link to comment
glennv Posted November 3, 2019 Share Posted November 3, 2019 tried it some weeks ago and also blocks lots of normal videos and lots of videos that would play ads now get stuck and just wait (likely for a signal that the add is finished , which it wont get). Also the rate at which new urls for add get generated makes it useless and more an annoiance unfortunately.Removed it. The method is not the way to go unfortunately. Quote Link to comment
NewDisplayName Posted November 3, 2019 Author Share Posted November 3, 2019 (edited) yea, its the right direction, but not 100%... does anyone know if a pfsense router could block ads, thru packet insepction or something like that? I look for a way to block ads on devices where i cant use ublock (mobile, TV) Edited November 3, 2019 by nuhll Quote Link to comment
glennv Posted November 3, 2019 Share Posted November 3, 2019 not sure what you mean. my pihole works across all devices as dns based. Just make the dns for all your devices the pihole and you are good to go. Quote Link to comment
SystemLord83 Posted November 12, 2019 Share Posted November 12, 2019 On 11/3/2019 at 10:29 PM, nuhll said: yea, its the right direction, but not 100%... does anyone know if a pfsense router could block ads, thru packet insepction or something like that? I look for a way to block ads on devices where i cant use ublock (mobile, TV) Im second to that. Sick of seeing my wife with ads on her iPhone, where I never see any on my Android special little apk. 🙂 Surely there is a way with pfBlockerNG. Research continues..... Quote Link to comment
bonienl Posted November 12, 2019 Share Posted November 12, 2019 I have multiple Pi-hole containers running, one for each dedicated network I have at home. One such dedicated network is for mobile devices. Quote Link to comment
lizardkink Posted November 17, 2019 Share Posted November 17, 2019 (edited) Gents, After about 3 or even 4 months of experimenting with different solutions and workarounds, digging deep into countless forums, i must say that there's no ideal solution to the above. The specific problem of filtering Youtube ads on devices that won't support browser based ad-blockers (e.g. smart TVs) can't be solved on the network/ router level. Since Google is serving their content and the ads from the same host, DNS filtering won't cut it. You can resolve IPs, reverse lookup DNSes and automate/ recursively add them to filter tables, and in the end you'll block the whole CDN including the content. No matter how intelligent your regex rule is, it will face the same problem. I have tried to triage packets with DPI. Fired up virtual machines running Sophos, PRTG and ntop/nDPI just to catch the streams and analyse them. Wiresharked into the soul of my TV. Hell, i even MITM attacked myself just for fun! I have followed the same logic as @nuhll You know what worked? Streaming to the TV from mobile with Youtube Vanced. Probably there's a thingy around the headers used by Vanced to forward the request. I really did not investigate much. I still see the "starting" ad, from time to time, but that's it. Have not tried VPNs, proxies or even upstream DNS providers, for the reasons mentioned above. Edited November 17, 2019 by lizardkink Quote Link to comment
NewDisplayName Posted November 18, 2019 Author Share Posted November 18, 2019 (edited) had vanced on my smartphone but from one day to the other it stopped working (like doesnt load images and videos) so i throw it away... if ublock and co can filter it out, a firewall can do the same. Edited November 18, 2019 by nuhll Quote Link to comment
mrgrinch Posted December 2, 2019 Share Posted December 2, 2019 Let me be clear - I wish this would work, but alas, this will *not* work. Why? Well, due to TLS and the fact that YouTube holds all the cards. They are serving the ads from the very same servers that serve you content. So ... if you block via DNS, you will also be blocking the same servers trying to serve the content to you. YT is smart enough to know how to close loopholes that undermine their business model (an ad-free experience is available if you pay for YT premium; previously YT Red). And a paid sub brings up privacy concerns of course. uOrigin and similar blockers inspect content *on the endpoint* since they have a MiTM position where TLS is already decrypted. The only way to do the same at the network layer would be to add your own trusted cert on every device and break the TLS, determine the difference between real content vs. ad and scrub from there. This certainly alters the experience where content may/may not work and could very well be spotty as providers change how they operate. Add to this, that it's not even possible to add certs to some IoT type devices (think smart TVs). For iDevices you can manually install certs via MDM or Apple Configurator. Android is fairly straight forward, but that is also why other options are quite abundant on that platform. Quote Link to comment
poniz Posted December 23, 2019 Share Posted December 23, 2019 Hey did you ever get the script to work or any other way to block youtube-ads on pihole? Quote Link to comment
clowrym Posted December 23, 2019 Share Posted December 23, 2019 I eventually gave up trying to block youtube ad's w/ pihole.... Quote Link to comment
Due Diligence Posted July 1, 2020 Share Posted July 1, 2020 (edited) Hi When I download videos from YT ads do not end up on my hard drive. I sometimes download before watching. Edited July 1, 2020 by Due Diligence Spelling Quote Link to comment
YiannisProd Posted August 30, 2020 Share Posted August 30, 2020 Following the extensive list you shared (tahnks for the samples) , you can use the following two regex ones in stead of adding one by one the entries that you find. (^r)+([0-9])\-+([a-z]+)\-([a-z,A-Z,0-9]+\.([a-z])+\.([a-z])+) r6---sn-4g5ednll.googlevideo.com r6---sn-4g5edney.googlevideo.com r6---sn-4g5ednek.googlevideo.com r6---sn-4g5ednee.googlevideo.com r6---sn-4g5edn7e.googlevideo.com r6---sn-4g5e6nez.googlevideo.com (^r)+([0-9])\.?(?[n]\-[a-z,A-Z,0-9]+\.([a-z])+\.([a-z])+) r8.sn-4g5ednzz.googlevideo.com r8---sn-4g5ednzz.googlevideo.com r6.sn-4g5ednll.googlevideo.com r6.sn-4g5edney.googlevideo.com r6.sn-4g5ednek.googlevideo.com r6.sn-4g5ednee.googlevideo.com r6.sn-4g5edn7e.googlevideo.com r6.sn-4g5e6nez.googlevideo.com cheers, Yiannis Quote Link to comment
Terrance Posted February 11, 2021 Share Posted February 11, 2021 On 8/30/2020 at 1:47 PM, YiannisProd said: Following the extensive list you shared (tahnks for the samples) , you can use the following two regex ones in stead of adding one by one the entries that you find. (^r)+([0-9])\-+([a-z]+)\-([a-z,A-Z,0-9]+\.([a-z])+\.([a-z])+) r6---sn-4g5ednll.googlevideo.com r6---sn-4g5edney.googlevideo.com r6---sn-4g5ednek.googlevideo.com r6---sn-4g5ednee.googlevideo.com r6---sn-4g5edn7e.googlevideo.com r6---sn-4g5e6nez.googlevideo.com (^r)+([0-9])\.?(?[n]\-[a-z,A-Z,0-9]+\.([a-z])+\.([a-z])+) r8.sn-4g5ednzz.googlevideo.com r8---sn-4g5ednzz.googlevideo.com r6.sn-4g5ednll.googlevideo.com r6.sn-4g5edney.googlevideo.com r6.sn-4g5ednek.googlevideo.com r6.sn-4g5ednee.googlevideo.com r6.sn-4g5edn7e.googlevideo.com r6.sn-4g5e6nez.googlevideo.com cheers, Yiannis Actually to cover all those sites this is all that is needed: ^r[0-9]-*.*.googlevideo.com Doing this will block the YouTube videos from even starting. However, once the video has started enabling this will block the rest of the ads in the video. Quote Link to comment
hernandito Posted February 12, 2021 Share Posted February 12, 2021 6 hours ago, Terrance said: Doing this will block the YouTube videos from even starting. However, once the video has started enabling this will block the rest of the ads in the video. Hi Terrance, Can you please clarify the above? Does this mean that one has to: Disable Pihole Launch a video and pause it (ads always play at start of video) Enable Pihole, and then you watch ad-free? Can I impose on you to clarify how one would add your Regex into Pi-Hole? It's simple right? Thank you! H. Quote Link to comment
FifthAxiom Posted February 23, 2021 Share Posted February 23, 2021 Hi, For those who want to block YouTube ads using the app while sending content to Chromecast, the following will suffice: block: manifest.googlevideo.com and block all googlevideo.com domains like this: r2---sn-mn4vg5aa-5hnl.googlevideo.com (5hnl could be anything) Of course you will also need to block sites like googleadservices, doubleclick, etc. if you still experience ads from time to time, you can also try blocking some regular hostnames (e.g. r2---sn-mn4vg5aa.googlevideo.com) but I'll doubt its effect. I have practically no ads (well, ones every 30-60 minutes for about 10 seconds) Greetings. 🖐️ Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.