textbrowser / dooble

Dooble is a scientific browser. Minimal, cute, unusually stable, and available almost everyware. Completed?
https://textbrowser.github.io/dooble/
Other
472 stars 37 forks source link

Does this browser support content blocking? #70

Closed ghost closed 2 years ago

ghost commented 3 years ago

I mean Ad-blocking. Either as a built-in feature (like Otter Browser) or via extensions (Chrome, Firefox,...). A browser can't claim to be secure if it lacks content blocking.

textbrowser commented 3 years ago

Indeed. There are many, many possible enhancements that are beyond mere content blocking. Another good suggestion.

dooble_1

textbrowser commented 3 years ago

So yes it does support content blocking and it's very, very, very fast. It does not require an extension to do so.

ghost commented 3 years ago

So yes it does support content blocking and it's very, very, very fast. It does not require an extension to do so.

What is your definition of content blocking? Are you using it the wide definition? My definition is much narrowed. Content blocking means Ad-blocking. Does your browser able to import EasyList and block Ads according to the rules specified on this list or not? It's the problem. What you currently demo to me is more about what extension like BlockSite on Firefox and Chrome does, it has nothing to do with Content blocking since it's Domain blocking!

textbrowser commented 3 years ago

Some documentation first: https://doc.qt.io/qt-5/qwebengineurlrequestinterceptor.html.

Dooble intercepts all requests that arrive to it. If a request's domain exists in dooble_accepted_or_blocked_domains.txt, the request is rejected. The request may be anything. New domains may also be added in Dooble. The file is a good starting point.

Dooble also rejects 3rd-party cookies and records these events for advanced operators.

I regularly revise the list and include it in a release. From Data/README: The file dooble_accepted_or_blocked_domains.txt was generated via https://pgl.yoyo.org/adservers/serverlist.php?hostformat=nohtml&showintro=0&mimetype=plaintext. The list is easily imported.. The domains can also be edited. New domains can be added. Both activities can be performed through the file or through Dooble.

textbrowser commented 3 years ago

More clarification. A request may be rejected if the specific domain is Blocked and if the mode is set to Block Mode. Dooble includes an Accept Mode as well. This allows only specific domains to be visited. Anything else would be blocked. For example, if I'm trying to visit mit.edu and mit.edu is not in the list while in Accept Mode, the request will be rejected.

ghost commented 3 years ago

Go to this site: https://voz.vn/

Do you see Ads? Otter Browser with EasyList on I don't see any Ads. Doodle meanwhile displayed all of the Ads. Maybe making your browser able to use EasyList filter is much easier than writing your own filter. Adblock' filter format is much powerful than your domain list, it's able to block any elements on the site by rules, not just preventing them to load by locking the server domain. Nowadays the Ads company already workaround this domain blocking approach, it's no longer work. The only way to fight Ads is like this.

https://easylist.to/

textbrowser commented 3 years ago

Without content blocking.

test_1

With content blocking.

test_2

I do not see ads in the second image.

textbrowser commented 3 years ago

All URL requests which arrive are inspected before they reach the networking stack of the Web engine.

A request includes a resource type. Valid types: https://doc.qt.io/qt-5/qwebengineurlrequestinfo.html#ResourceType-enum.

textbrowser commented 3 years ago

You gave me an idea. There are additional URLs in newer versions of Qt. Dooble can be more conservative by blocking all of the requests if they meet the correct criteria.

textbrowser commented 3 years ago

https://github.com/textbrowser/dooble/commit/1cf2f8a82513a8d0e2e2280eadafb6cc5bc88902

Thanks! :)

textbrowser commented 2 years ago

Completed. A future version may make it more elaborate.