5 ms·
It makes a lot more sense to ad block system wide than to expect every bit of software you use to implement extensions to allow you to do it. There are plenty o
by bbeesley 5y ago
It makes a lot more sense to ad block system wide than to expect every bit of software you use to implement extensions to allow you to do it. There are plenty of services like AdGuard and Lockdown, they can use the same lists that ublock uses, and you protect not just your browser but your email and everything else you use. Some routers will let you do something similar, and you can add a pihole to your network if your router won’t help.
- rovr138 5y agoHost based lists help to a point but they are also easy to bypass. Get everyone to add a cname or rotate the domains. If they use the main domain and proxy the requests, you can’t block the domain without breaking the site. That’s why there are lists that operate on selectors and the content on the pages too.
- danShumway 5y agoIt would be great to move adblocking to an OS/network level, but DNS blocking just isn't comparable to what a browser-level adblocker does. To get to the point where I would feel comfortable having my OS handle browser blocking, a reasonable chunk web browser functionality would need to be moved out of the browser and onto the OS. I just don't see that happening any time soon, and I'm not sure that's the direction we would want to move with browsers anyway. Ublock Origin will do things like stub Javascript methods on the page. A Piihole can't do that. And even for simple things like blocking requests based on the current domain -- the movement towards DoH and SNI are going to make that harder and harder as time progresses. You really need an interface that has insight into not just what requests you're making, but where/why you're making them. Not to say that system wide blockers don't have value, but they're really there for the apps that can't handle their own adblocking. They're a defense in depth for the requests that slip through other parts of your setup, but they're not a good replacement for a browser extension.
- rnhmjoj 5y agoAll you're asking is already possible with Privoxy[1], which is even stronger than a browser adblocker. It's a very old software: it used to be unmaintained and lacking some essential features, but thankfully the development resumed and is now fully fuctional again with the modern web. It can be used as an adblocker based on domain, request path, HTTP headers, etc, but it can do much more. It can redirect requests (for example, replacing assets from a CDN with a local cache), modify headers (stripping or making cookies temporary, changing user agent, etc.) and even rewrite the content of web pages using regular expressions or any external program. By default, it has only a basic configuration that blocks tracking and ads, but there are tools[2] that convert adblock rules to the Privoxy format, so it will be functionally equivalent to adblock. It acts as a CONNECT proxy, so you can run it locally or on a router and if combined with a NAT rule, it can also work transparently (obviously, you need to manually trust a CA certificate for https). [1]: https://www.privoxy.org/ https://www.privoxy.org/ [2]: https://github.com/essandess/adblock2privoxy https://github.com/essandess/adblock2privoxy
- unicornporn 5y agoOh, Privoxy. Must've been 20 years since I used that. But, can it block certain elements with certain IDs? And do I have to disable DoH to make it work?
- rnhmjoj 5y ago> can it block certain elements with certain IDs? If you mean hiding an element, yes it's possible: you can either inject CSS into the page or write a filter to remove the HTML entirely. For example, adblock2privoxy generates both Privoxy rules to block requests and stylesheets to hide elements (you need a local webserver for this, though). > And do I have to disable DoH to make it work? It's Privoxy, not the browser, that will do the DNS queries. So, no: it will work regardless of DoH.
- alpaca128 5y agoCan it let me pick any visible HTML element on a website to filter out just by clicking on it? Can it block content of a website without interfering with a `curl` request or a file download from a random messenger app? All those things are trivial to do in a browser plugin but probably a total workaround-filled pain on any other layer in the system.
- rnhmjoj 5y ago> Can it let me pick any visible HTML element on a website to filter out just by clicking on it? The best it can offer is a CGI editor to change its configuration from the browser. I don't see how you could implement something like this: it's either interactive or a passive network element, but not both. > Can it block content of a website without interfering with a `curl` request or a file download from a random messenger app? This is really trivial, just don't proxy them (ie don't set the http_proxy variable).
- hutrdvnj 5y agoCan Privoxy do Javascript based blocking, e.g. stub methods?
- hanniabu 5y agoIs AdGuard/Lockown the same as PiHole or do they do different things?
- alpaca128 5y agoIt makes sense to use both, but there is no alternative to "context-aware" ad blocking within the browser. YouTube video ads cannot be blocked via hosts file, same for any ad that's served directly from that site. Also uBlock Origin lets you block any HTML element on any site. This lets you (interactively!) cut out autoplaying videos, annoying popups and basically anything that you as an individual user find distracting. Or how about the option to block loading of large images? Try implementing that system wide without accidentally breaking certain requests using `curl` and while still allowing the user to flip that switch in seconds. There's no single abstraction layer where it makes sense to do everything at once.