Iβm not actually sure if this works but If anyone else wants to try it out and give me feedback feel free.
Using Tor to Avoid Ads on YouTube
Configure Tor to use only exit nodes from countries with few or no YouTube ads.
WARNING: Do not try this unless you understand the implications it has for your system wide tor setup. TorBrowser does way more than merely proxy Traffic through Tor, but also prevent #InformationLeakage and block tracking code. This is not a substitute for using the TorBrowser and does not improve your anonymity.
Tor Configuration
Edit /etc/tor/torrc:
ExitNodes {AL},{MD},{GE},{AM}{VN}
StrictNodes 1
Then restart Tor:
sudo systemctl restart tor
FoxyProxy Setup
1. Add a new proxy:
FieldValueHost127.0.0.1Port9050TypeSOCKS52. Set proxy mode to: Proxy by Patterns
3. Add URL patterns and assign them to the proxy above:
PatternPurpose*youtube.com/*Main site*youtu.be/*Short links*ytimg.com/*Thumbnails and assets*googlevideo.com/*Video stream dataytimg.com and googlevideo.com are required β without them thumbnails and video playback will fail through the proxy.
Notes
StrictNodes 1forces Tor to only use the listed countries β it will stall rather than fall back- Ukraine and Romania will handle most traffic; Albania has decent exit node coverage
- If buffering is bad, try capping YouTube quality at 480p

