News for hackers. Stuff that matters.
Re:Nyxt Browser by danShumway on Saturday March 20, 2021 @08:21PM (#26527101)
Nyxt seems amazing, but it's hard for me to imagine using a browser without Ublock Origin. I understand that it doesn't really make sense for everyone to support webextensions, and it's a huge amount of extra work, but it's just a huge barrier to adoption.

It's hard to trust the smaller browsers to keep me private online if there isn't something that gives me that same level of control over blocking. And there's a huge adblocking community built around this software that maintains lists, fixes websites, and it's just a bunch of privacy-focused community effort that is hard for any small team to replicate.

But aside from webextension support, Nyxt looks really exciting, and I'm glad that people are building browsers that are actually innovating in this space.

Re:Nyxt Browser by boogies on Saturday March 20, 2021 @08:35PM (#26527181)
WebExtension support is ‘on their roadmap’ (thanks dang for the discussion and so much else): https://news.ycombinator.com/item?id=25972374
Re:Nyxt Browser by danShumway on Saturday March 20, 2021 @08:40PM (#26527200)
That is fantastic to hear!

It's a really compelling project, with webextension support I could easily see myself moving over to a scriptable browser built on something like Servo.

Re:Nyxt Browser by Cloudef on Sunday March 21, 2021 @01:48AM (#26528384)
WebExtension support might make me consider this over qutebrowser.
Re:Nyxt Browser by bbeesley on Saturday March 20, 2021 @09:43PM (#26527475)
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.
Re:Nyxt Browser by danShumway on Saturday March 20, 2021 @10:50PM (#26527752)
It 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.

Re:Nyxt Browser by rnhmjoj on Sunday March 21, 2021 @06:14AM (#26529376)
All 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/

[2]: https://github.com/essandess/adblock2privoxy

Re:Nyxt Browser by alpaca128 on Sunday March 21, 2021 @07:11AM (#26529595)
Can 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.

Re:Nyxt Browser by rnhmjoj on Sunday March 21, 2021 @07:52AM (#26529727)
> 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).

Re:Nyxt Browser by unicornporn on Sunday March 21, 2021 @06:50AM (#26529516)
Oh, 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?
Re:Nyxt Browser by rnhmjoj on Sunday March 21, 2021 @07:27AM (#26529657)
> 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.

Re:Nyxt Browser by danShumway on Sunday March 21, 2021 @09:57AM (#26530466)
A couple of criticisms:

1) The converter you link has 62 stars and hasn't been updated in 2 years. Additionally I'm seeing multiple issues about basic adblock rules not taking effect. Short version, I would not trust this repo to convert rules.

This is kind of exactly what I'm talking about with the difficulty of keeping pace with what is essentially a shared standard in the adblocking community. It's not enough to write one converter that gets updated every 2 years, in the space of those 2 years, Ublock Origin has expanded the syntax it supports. Adblocking is a cat-and-mouse game, there isn't a single set of features that can implemented once and then the software marked as "done".

2) Even assuming that converter does work (which I am doubtful of), Ublock Origin uses a superset of the adblock rules format, so you have to target what Ublock Origin supports, not just what adblockers in general do.

And obviously I'm not going to try and recreate those lists myself manually, I don't have the time or energy to do that. They have to be 100% consumable from upstream.

----

Okay, moving on to Privoxy itself:

1) On the community aspect again, I don't see dedicated Reddit groups devoted to finding every single broken website on this software. I don't see a public issue tracker. It seems to be following the old FOSS philosophy of developing software primarily on mailing lists someplace, which is fine for some software but not fine for something that is highly community dependent like adblocking.

You say the software is being actively developed again, I don't see any way to easily confirm that. I don't see any way to easily figure out how many people are using this and verifying that it works.

2) As far as I can tell, this doesn't support DoH. That is also kind of a dealbreaker for me, I don't want to make myself less secure in one area to make myself more secure in another. This is a solveable problem: if Privoxy was being set up as a local DoH server as well, and it was using DoH itself to query/cache results, then the issue would almost completely go away.

However, am I correct in guessing that Privoxy is also going to struggle in the future with encrypted SNI, or with the fact that my browser strips referrer headers from requests?

3) I'm looking at Privoxy's pattern documentation[0], and correct me if I'm wrong but it doesn't seem to support contextual blocking at all. In Ublock Origin I can do rules like:

  $script,third-party,domain=imgbox.com
My original criticism of DNS blocking in general was that it lacked context information, so it's just flat-out not acceptable for a Ublock Origin replacement to lack the ability to distinguish between a third-party request and a first-party request. That's critical functionality. Maybe I'm missing something here, but I've gone over the Actions and Template file documentation and I don't see the words "third-party" even mentioned anywhere.

4) Privoxy seems to lack the ability to block iframes, or at most it seems to have the ability to strip them from the HTML itself. That's not enough, sometimes iframes get dynamically created after a page is loaded, and modifying the HTML is not enough to block that.

5) I don't see any way to mark sites as trusted (probably related to point #3). So there doesn't seem to be a way for me to disable Privoxy when I'm on a specific site.

6) I don't see anything in the docs about CNAME unmasking. And CNAME cloaking isn't a theoretical attack, there are websites in the wild using that technique.

7) Browser integration also seems to be lacking. This isn't the biggest problem, I can tolerate annoyance, but it's a little bit of a quality of life issue.

8) And so on. Most of UBlock Origin's dynamic filtering syntax[1] seems to be unsupported. It's very possible I'm misreading the docs, or the docs are out of date or there's a trick to make it work, but if that's the case, that's also a problem, because then the docs need to be clearer.

----

None of that is to say that Privoxy is bad software. It's just to say that it doesn't seem like it's an all-in-one replacement for what my browser does.

We often do defense-in-depth in this area. You can set up a Piihole, or a firewall, or a proxy server to handle adblocking for devices and applications that don't expose interfaces like the browser does. That's a good idea. But the farther away from the context of the application that you get, the harder it is to do really detailed blocking based on that context.

This is something fundamental about adblocking that people don't always seem to understand -- it's not an either/or proposition, it's not like you set up a proxy server and all of your browser configs become useless. The proxy server just adds another layer of defense.

[0]: https://www.privoxy.org/user-manual/actions-file.html#AF-PAT...

[1]: https://github.com/gorhill/uBlock/wiki/Static-filter-syntax

Re:Nyxt Browser by sildur on Sunday March 21, 2021 @12:16PM (#26531480)
It makes me happy to see privoxy back again. Time to set it up back! :)
Re:Nyxt Browser by hutrdvnj on Sunday March 21, 2021 @07:39AM (#26529688)
Can Privoxy do Javascript based blocking, e.g. stub methods?
Re:Nyxt Browser by rnhmjoj on Sunday March 21, 2021 @07:57AM (#26529759)
No, there's nothing javascript specific in Privoxy, but there's also nothing stopping you from implementing it. You could write filters to inject custom code (like greasemonkey userscripts) or modifying the scripts in tranport.
Re:Nyxt Browser by alpaca128 on Sunday March 21, 2021 @07:06AM (#26529577)
It 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.

Re:Nyxt Browser by rovr138 on Saturday March 20, 2021 @09:53PM (#26527533)
Host 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.

Re:Nyxt Browser by hanniabu on Saturday March 20, 2021 @11:22PM (#26527871)
Is AdGuard/Lockown the same as PiHole or do they do different things?
Re:Nyxt Browser by amagumori on Sunday March 21, 2021 @06:07PM (#26534589)
this is why i think Gemini is the most interesting thing happening in the web space today. the browser itself can't overcome the fundamental bloat and decay of the web as we know it today; the heavier and heavier js load, the ridiculous ad load that necessitates entire extensions just to escape from it; etc, etc.

Gemini is a project that actually attacks the root of the problem by presenting an extremely stripped-down hypertext format and giving an alternative at the protocol level.

i highly recommend checking out Gemini https://gemini.circumlunar.space/docs/faq.gmi and the Lagrange Browser https://github.com/skyjake/lagrange if you find this interesting.

at least for my circle, there's a consensus that the web has calcified and become such a walled garden that we've reached a time where it makes sense to "start over" at a pretty base level; rather than trying to build on top of a platform that, by its nature, inevitably tends towards centralization and capitalization.

Re:Nyxt Browser by pwdisswordfish0 on Sunday March 21, 2021 @11:03PM (#26536434)
> the browser itself can't overcome the fundamental bloat and decay of the web as we know it today

There's nothing "fundamental" about web bloat.

Here's a simple litmus test for Gemini: take a look at a few of the personal websites for people who've spoken highly of Gemini. How many of them have exercised restraint and eschewed with all the sorts of things that Gemini disallows? How many of them have embraced features of the Web that are not permitted in Gemini?

> rather than trying to build on top of a platform that, by its nature, inevitably tends towards centralization and capitalization

If we take it for granted that it's true of the Web (and that's being generous), why is Gemini going to fare better?

These all seem like a bunch of vague and empty talking points for a piece of tech who's main catalyst for coming into interest and capturing attention comes down to NIH, and not actually any fundamental correctness about its nature.

Re:Nyxt Browser by netflixandkill on Saturday March 20, 2021 @09:31PM (#26527409)
This is primarily why I use Brave, particularly on phones. I've had some form of ublock and js whitelisting since 2002 or so and don't even recognize most sites without them.

I assume a lot of the potential "early adopters" for any new browser are privacy/security focused and as neat as it is conceptually that's going to be a steep climb for any new project.

Re:Nyxt Browser by christophilus on Saturday March 20, 2021 @08:25PM (#26527129)
As scriptable as Nyxt looks, I imagine you could pretty easily wire it up to block a list of domains.
Re:Nyxt Browser by danShumway on Saturday March 20, 2021 @08:30PM (#26527157)
The problem is that UBlock Origin goes way beyond just blocking a list of domains, it's not just a Piihole.

It's also doing CNAME uncloaking, request rewriting, stubbing functions in pages, it has syntax to handle CSS changes, it has rules that allow requests to only go through in certain contexts or if they're originating from certain domains. And most importantly, there's a giant community of people basically standardized on Ublock Origin who maintain all of these lists and who are constantly identifying new threats and proposing new features.

So a competitor to Ublock Origin would need to be constantly competing with it, it would need to be pulling in new features as they got released, and it would need to be consuming the same lists that Ublock Origin uses. It's just really hard to keep pace with that.

If Mozilla came out tomorrow and said they were going to do native adblocking, I would trust them less than Ublock Origin. I don't think even they would be able to keep pace if they were trying to build a community from scratch.

Re:Nyxt Browser by Shared404 on Saturday March 20, 2021 @10:29PM (#26527671)
I would however be interested in Mozilla folding UBO into Firefox officially though.

Sadly, I doubt that'll ever happen with the amount of funding they get from Google.

Re:Nyxt Browser by dudik on Sunday March 21, 2021 @05:50AM (#26529300)
What about blockit[0]? It does implement some of the features you need. It's still a WIP, but I'm actively working on it and it uses the adblock-rust library from Brave, which is already able to compete with uBlock Origin.

[0] https://github.com/dudik/blockit

Re:Nyxt Browser by danShumway on Sunday March 21, 2021 @10:28AM (#26530708)
Looks very promising! Correct me if I'm wrong, but it looks like adblock-rust also handles CNAME resolution? That's pretty good. And I also like that it directly consumes adblock rules, it doesn't require them to be converted into a new format.

That being said:

> it has rules that allow requests to only go through in certain contexts or if they're originating from certain domains

I haven't personally seen a proposal for server-based blocking outside of the browser that could begin to tackle this problem, and contextual blocking is a huge part of what makes browser adblockers work so well. As far as I can tell, adblock-rust isn't an exception to that.

It's a very difficult problem. In order for you to have a rule like "block 3rd-party requests on a-bank-website.com", you need more information than just the request itself. Maybe this is something where sites could piggyback off of CORS requests? But browsers don't always send CORS requests.

I'm not sure what the solution would be, but regardless I don't think that blockit would be a replacement in its current state. Still looks like a promising project as a network-based blocker though.

Re:Nyxt Browser by CyberRabbi on Saturday March 20, 2021 @10:58PM (#26527780)
Actually I would invert the problem: I wish nyxt itself were a webextension. IME Using a WebKit forks (or whatever) will always eventually be insufficient.
Re:Nyxt Browser by dvdkon on Sunday March 21, 2021 @04:58AM (#26529089)
Unfortunately, it can't. Even something as simple as catching all keypresses globally is impossible with WebExtensions. Having to insert UI elements into pages is also pretty limiting and not a great user-experience with resource-hogging sites.
Re:Nyxt Browser by CyberRabbi on Monday March 22, 2021 @02:06AM (#26537330)
Seems like a missed opportunity
Re:Nyxt Browser by samename on Saturday March 20, 2021 @08:25PM (#26527131)
Have you considered blocking on the DNS level with a hosts file or NextDNS?
Re:Nyxt Browser by danShumway on Saturday March 20, 2021 @08:32PM (#26527165)
DNS blocks are good, but not really comparable to what a modern browser adblocker does. The state of adblocking on the web has gotten a lot more involved as both websites and adblockers have evolved in the kind of cat-and-mouse game they play with each other.