Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Let's say you load https://example.com/video and that page loads https://example.com/ads.js in the background.

What DNS adblockers like PiHole see is only a request for the domain (example.com), they can't see whether it is http or https nor can they see /ads.js or the rest of the path, port, query parameters, etc. They may not even see the second attempt at loading the domain (the /ads.js request) because the browser and the OS have probably cached the request.

uBlock Origin and other adblockers can see the whole request and modify it[1]. They can see whether it is http or https (that's how https everywhere knows what to redirect and where) and they can see whether you are loading /video or /ads.js and if they see /ads.js they can tell the browser to not load that.

[1] Google is going to remove the "modify" part of functionality in manifest v3 citing privacy and security concerns (while ironically keeping the "see" part) in an attempt to kill or limit the functionality of adblockers. Since YouTube uses an ever changing list of domains for serving videos and ads this change will effectively unblock ads in YouTube because adblockers can only keep a static list of what to block and when instead of doing it dynamically, and said static list can only be updated (as far as I know) by pushing a new version of the extension to the store, severely limiting the frequency of updates, making it impossible to keep up with the frequent changes in YouTube.



Mozilla has already said firefox may retain extra features when adopting v3, is the modify capability not part of that?

How feasible is it to have my vpn gateway self cert and proxy everything and do the work there?


Yes, Mozilla is keeping the whole functionality. You can MITM yourself but then you'll be lowering your own security and your proxy will have to do its own certificate validation because the browser won't be able to do it anymore. You are also restricted to things you can modify with a simple regex (unless you add HTML parsing to your proxy but then you'll be double parsing, once in the proxy and another time in the browser). And it's still probably going to break with websites in the HSTS preload list. And content generated by JavaScript won't be blocked easily. It's also going to be very inefficient, don't underestimate the years of performance improvements behind adblocking extensions. Adblockers like uBlock Origin also do much more than just blocking requests. For example they can inject small snippets of JavaScript to neutralize tracking scripts without breaking websites that depend on them by introducing dummy functions with the same API as the tracking script or to counter anti adblocking scripts. It can also inject CSS snippets to fix website breakage. And block requests based on what website they originate from. And probably much more than you can easily do with a simple proxy.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: