atlas-engineer / nyxt

Nyxt - the hacker's browser.
https://nyxt-browser.com/
9.79k stars 409 forks source link

Adblock/Umatrix like functionality? #32

Open schvabodka-man opened 6 years ago

schvabodka-man commented 6 years ago

Hello. Are there plans on implementing per domain based settings to block stuff like ads, javascript, pictures, etc like umatrix?

crocket commented 2 years ago

While it's good to have adblock in a web browser, Rob Braxman recommends blocking ads in your personal recursive DNS resolver because uBlock Origin makes browser fingerprint more unique.

Ambrevar commented 2 years ago

Is blocking at the recursive DNS level different from regular host blocking?

If not, then our blocker-mode should more or less do this already, no?

crocket commented 2 years ago

Does nyxt's host blocker automatically update its block list?

aartaka commented 2 years ago

Does nyxt's host blocker automatically update its block list?

Yes, it does. The update frequency (in seconds) can be configured using nyxt/blocker-mode:update-interval slot of nyxt/blocker-mode:blocker-mode.

aartaka commented 2 years ago

Oh, wait, I'm wrong here :sweat_smile: It's nyxt/blocker-mode:update-interval of every hostlist that you need to manually alter, i.e.

(define-configuration nyxt/blocker-mode:blocker-mode
  ((nyxt/blocker-mode:hostlists
    (mapcar (lambda (h)
              ;; Update every 2 minutes
              (setf (nyxt/blocker-mode:update-interval h) 120))
            %slot-default%))))
neophrema commented 2 years ago

I'm sorry to ask explicitly, are there plans to make something like uMatrix work? I prefer it to just allowing scripts as whole or not. I could imagine that the integration into nyxt would be rather neat, if possible. The Privacy issues are the only thing holding me back from using nyxt, and I would be super happy to use it.

crocket commented 2 years ago

uMatrix is unmaintained, but it still works. Host blocker already takes care of most of privacy issues. uBlock Origin is good enough in most cases.

neophrema commented 2 years ago

I need to frankly disagree @crocket It might be much more convenient to follow a "enable all or nothing" setting, but as a long time user of uMatrix I'm very positive about that its a necessary feature regarding privacy. Ad Blocking is different from privacy settings, they overlap partly.

It appears to me that its rather the majority of sites don't need half of external site loads they establish, to work. This is in fact a huge tracking possibility. What do you think?

crocket commented 2 years ago

Websites track you via browser fingerprint. The more add-ons you add to a web browser, the more unique your browser fingerprint becomes.

If you want privacy, you need to hide your IP address and compartmentalize different web activities to different web browsers. Specifically, you need a separate web browser for google accounts and facebook accounts because google and facebook have global infrastructure to store browser fingerprints and track users on various websites that use functionalities from google and facebook.

uMatrix can help, but uBlock Origin can also block third party domains by default.

It is desirable to block trackers and ads without plugins which make your browser fingerprint more unique.

neophrema commented 2 years ago

Thank you for your explanation!

Thank you, I didn't want to cause troubles, I was just concerned, wanted to have a peek into what direction Nyxt might be heading in these regards!

crocket commented 2 years ago

I think uBlock Origin can block with granularity if you know how to write rules by hand.

ghost commented 2 years ago

There's UI for that for a very long time already https://github.com/gorhill/uBlock/wiki/Dynamic-filtering:-quick-guide so umatrix is redundant, if you're using ublock.

rEnr3n commented 2 years ago

As far as I can see, ublock origin can only block images, scripts and frames. Umatrix can also block these and more. It's shown in the picture provided by @neophrema. Umatrix is not exactly redundant, it is complementary (or supplementary). Both of these tools are made by the same author. Privacy is not the only thing umatrix addresses. I mostly use ublock origin for list-based blocking and umatrix for making webpages less fat.

ghost commented 2 years ago

Yeah and the same author has stopped Umatrix development 2 years ago.

I've used both extensively and now i don't see much point in using umatrix. Cookies aren't such a big deal with first-party isolation, and there are plenty of tools to manage them. Pictures and media can be blocked. XHR are blocked with scripts. Most of "Other" can be blocked by blocking scripts too, and there's an option to block csp reports.

There's no point to have these granular options when you can block first or third party scripts altogether. Otherwise it just gives you an illusion of control.

rEnr3n commented 2 years ago

So I tried to replicate my rules in umatrix to ubo. My ruleset is deny by default (except css/images). In ubo, I blocked 3rd-party scripts and frames. I noticed on this link that several xhr goes through. Videos play through xhr. So blocking 3rd-party scripts is not enough. I could block 3rd-party here but then if I were to unblock, all the elements under that domain will be unblocked (images, scripts, xhr, etc). That's not what I wanted.

While ubo works for "most" people. I am one of those people that don't fall into that category. I could have settled for ubo alone if it was enough for me. But not everyone has the same preferences.

ghost commented 2 years ago

Add this rule to "My rules" tab in ubo settings. twitter.com https://video.twimg.com/ext_tw_video/ xmlhttprequest block You can create it from logger window like that image

Also you can create your own filtering rules with the same syntax used by blocklists and there's UI for that too.

rEnr3n commented 2 years ago

I know I can do that but it doesn't align with my preference which is to deny by default. Twitter is not the only entity on the internet that can do that. I will have to maintain both a whitelist and a blacklist. That looks to be more exhausting than my current setup.

Edit: I probably can do * * xmlhttprequest block but the panel doesn't allow for selective allowing/blocking. I'll have to check the logger later.

ghost commented 2 years ago

If you want to block third party xhr everywhere add this on My filters tab

*$3p,xhr

And these are exceptions for scripts to work

! exceptions
@@||abs.twimg.com/*js|$domain=twitter.com
@@||edgecastcdn.net$domain=twitter.com

Also, you can combine filters and rules, where the latter takes precedence, so exceptions can be set there too, but filters are much more flexible.

You don't have to write filters by hand, because there's a UI for that in logger, but here's a good overview of filtering syntax https://adblockplus.org/filter-cheatsheet and ubo-specific options there https://github.com/gorhill/uBlock/wiki/Dynamic-filtering:-rule-syntax

But then again in case of twitter I would rather use a nitter instance.