Hacker News new | ask | show | jobs
by TekMol 459 days ago
Ok, but the proxy could insert JS code into the html page which does what uBlock Origin does, couldn't it?

This would give the same flexibility without the need for a browser plugin.

2 comments

You'd still have to MITM HTTPS which is non-trivial (compared to installing an extension) and accept the risks of managing your own CA

Afaik uBlock benefits from some browser APIs that can do things like prevent content from loading before the add-on is injected into the page so you'd lose some coverage there. I imagine it'd also be fairly difficult to intercept all outgoing web requests (to selectively block them) which a browser is fairly well positioned to provide an API for.

You can try, but that adds way more complexity and fragility than a simple browser extension.

That said, if you build such a product (something that can MITM HTTPS and then inject ad blocking JS on every page or video, or simply rewrite traffic to strip out ads like a packet shaping firewall, etc.) and that can make use of existing filter lists, I'd be very happy (eager, actually) to pay for it.

That is similar to how Adguard works, but that can't run on a router like Pihole does. I don't know how you'd get past the HTTPS cert issue. I think you'd first have to install that custom cert on every device connected to the router, or else have the router completely proxy every HTTPS connection and re-serve it from own domain and cert. Might run into dnssec issues too? Not really sure but sounds messy. Browser extensions don't have to worry about HTTPS and can (or could before manifest V3) directly manipulate the DOM.

That the market hasn't created one yet suggests it might be difficult. But I'd love to see one.