Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support user-specified adblock filters #2

Closed
csagan5 opened this issue Oct 11, 2017 · 39 comments
Closed

Support user-specified adblock filters #2

csagan5 opened this issue Oct 11, 2017 · 39 comments

Comments

@csagan5
Copy link
Contributor

csagan5 commented Oct 11, 2017

This issue composes of multiple parts:

  • a new tab/UI to manage the adblocking feature will not implement this
  • logic to download the adblock filters and store them
  • logic to parse the adblock filters (or an intermediate format)
  • users can of course customize where the adblock filters come from (URLs)

The projects we could look at are adBlock and uBlock origin and other browsers that implement such functionality.

@hexauni
Copy link

hexauni commented Nov 25, 2017

For me using ublock origin filter syntax seems most preferable. Moreover, uBO supports adguard filters, that, in my opinion, are the best in coverage ads. It would be nice to realize their potential here.

@csagan5
Copy link
Contributor Author

csagan5 commented Nov 25, 2017

I am familiar with uBlock origin; uBO does not enable adguard filters by default but uses EasyList+EasyPrivacy+some others, I am going to try to cover the same lists.

@csagan5
Copy link
Contributor Author

csagan5 commented Nov 25, 2017

Right now the biggest problem I see is that the original NoChromo patch is a very simplified request blocker, it has no support for the rules' options, or for the selectors.

Comparing to SWE (I recently could give a look to their commits), they use WebRefiner there, which is quite advanced.

To complicate further the picture, Google is developing their own in-house adblocking, which makes it somewhat not a good choice to try to add WebRefiner to latest Chromium codebase: it might be better to just mod Google's own safebrowsing-with-adblocking.

So for now I will just maintain the current simple approach to ad blocking, and wait for Google's own adblocker to mature. They'll likely add some external API to check what to block and/or whitelists, which we do not want.

@csagan5 csagan5 changed the title Support download of filters from adblock servers Support download of filters Nov 25, 2017
@csagan5 csagan5 changed the title Support download of filters Support download of adblock filters Dec 16, 2017
@csagan5
Copy link
Contributor Author

csagan5 commented Dec 22, 2017

I have added a wiki page to document adblocking engines used in Chromium browsers: https://github.com/bromite/bromite/wiki/AdBlocking

@csagan5
Copy link
Contributor Author

csagan5 commented Dec 23, 2017

The embedded adblock filters are updated every time Bromite is built for a new Chromium release; since these releases are often enough, I will close this enhancement issue for now.

@csagan5
Copy link
Contributor Author

csagan5 commented Mar 23, 2018

Reopening this issue because I plan to implement download of adblock filters. This would afterwards allow something like #33.

For now I am discarding having a configuration tab, too complex, but we will still have a user preference URL where to fetch the filters from, and baked-in filters as a fallback.

@csagan5 csagan5 reopened this Mar 23, 2018
@sevospl

This comment has been minimized.

@csagan5 csagan5 changed the title Support download of adblock filters Support user-specified adblock filters Oct 19, 2018
@projectextremum
Copy link

Is it possible to implement it as a single text file that can be edited from within bromite. Eg: from a custom URI.

@leedoyle
Copy link

leedoyle commented Dec 2, 2018

Would be cool to also have the ability to disable third party java scripts and media (like in uBlocks "advanced" mode).

@kitkatloyalist
Copy link

kitkatloyalist commented Dec 27, 2018

uBO seems to also hybridize UserScript. Refer to their Experimental filter set. Instead of blocking google analytics it replaces it with neutered version for example.

More power is better.

@Laicure
Copy link

Laicure commented Feb 25, 2019

As it seems now, it works well though as a maintainer of a hosts file for adblocking, I suggest that it must somehow include a "load hosts file" or something to update the adblocking list instead of making it hardcoded.

My scenario hours ago:

  • Use Bromite (latest version as of writing this)
  • Turn off DNS66
  • Navigate to usual site (kissanime.ru)
  • Works well (things being blocked)
  • Tried tapping a link, pop-up shown
  • Tried to check the domain responsible for the pop-up (used Chrome Beta 70 for the net-internals)
  • Found and updated the hosts file
  • Update DNS66 sources
  • Enabled DNS66
  • Tried Bromite again as above
  • Domain blocked, no more pop-ups

@foss-rocks
Copy link

Hi!

Because Bromite ships with hard coded adblock filters, every version is identified by the rules it has. In other words, the User-Agent-anonymize.patch doesn't really work without supporting user-specified filters (this issue), thus differing from the release apk.

I released a public test page that shows your current build, working for the latest v76 versions and some older ones. You can find it at https://foss-rocks.github.io/bromite-version-check/, repository here.

This issue has been previously discussed with @csagan5.

@csagan5
Copy link
Contributor Author

csagan5 commented Aug 23, 2019

Yes, I confirm the above.

@foss-rocks the identification of version will only be mitigated if the feature described in this issue exists and it is configured to auto-update by default

@csagan5
Copy link
Contributor Author

csagan5 commented Sep 16, 2019

With 77.0.3865.81 an URL for the ad filters is being used internally, which we can in future expose in the UI without too much hassle; so this issue should be soon addressed.

@ouzowtf
Copy link

ouzowtf commented Sep 16, 2019

Does Bromite use the API for filtering that Google wants to get rid off in one of the next Chrome (and certainly Chromium) versions?

@csagan5
Copy link
Contributor Author

csagan5 commented Sep 16, 2019

Does Bromite use the API for filtering that Google wants to get rid off in one of the next Chrome (and certainly Chromium) versions?

It was never used in Bromite, it's an API for extensions.

@ouzowtf
Copy link

ouzowtf commented Sep 16, 2019

Sorry, I just have to ask again for me to not misunderstand you: the new v77 way of filtering is a different filtering method than the filtering used by extensions like uBlock and that Google wants to eliminate?

@csagan5
Copy link
Contributor Author

csagan5 commented Sep 16, 2019

@ouzowtf the new way and the old way are C++ patches which modify directly the browser code. So they are both different than how extensions work. Extensions use code written in Javascript, to name the biggest difference, and they do not run inside the browser itself.

@csagan5
Copy link
Contributor Author

csagan5 commented Sep 16, 2019

@ouzowtf on this topic: see my comment here: GrapheneOS/Vanadium#10 (comment)

The retiring of the extensions API used by adblocker is related to the Network Service, but they are both part of a bigger strategy of tracking requests IMO.

@ouzowtf
Copy link

ouzowtf commented Sep 16, 2019

Thanks for this insight! :)

@ghost
Copy link

ghost commented Oct 26, 2019

When will there be an easy way to set our own filters? A lack of solid adblock is the only reason why I am not using this Web browser over e.g. Dolphin. It's bad enough the lack of Chrome extension support but given what I understand this browser's goals are that's okay.

What's really kind of not okay is that from a privacy point, proper adblock and any similar tracking and element blocking isn't implemented or at least a method of being able to do this myself isn't implemented.

We don't need a full tab for customising adblock rules. Just let us set our own filters in an easy to use manner either by allowing us to add/edit our own hosts list or otherwise.

This browser already has more than enough features and it's incredibly stable. Having only the bare minimum super obvious ads "kind of" being removed, and none of the tracking or elements that go with it being blocked, just doesn't cut it though. The only reason I keep this app on my phone and keep updating it is in the hopes I see a customisable adblock feature.

Thanks for understanding.

@csagan5
Copy link
Contributor Author

csagan5 commented Oct 27, 2019

When will there be an easy way to set our own filters?

This is an open source project, you are not entitled to ask "when", sorry.

@sevospl
Copy link

sevospl commented Oct 29, 2019

@githubsucks-usegitlab if you want, use Adguard for a while -- it allows you to use custom filter lists.

@FirstDefolD
Copy link

Will the option "Element selection mode" be added to highlight the unnecessary on the page and block as in the PC version. That is, you choose what to block yourself, because not all ads are deleted and sometimes you need to remove the interfering buttons and callouts on the page.
I give an example below:
68071464-11f88e80-fd94-11e9-8f14-8a45b6c40c04
68071472-23da3180-fd94-11e9-8338-1c1b1c05b1ea
68071480-381e2e80-fd94-11e9-95bb-7f667d28bc17

@Laicure
Copy link

Laicure commented Nov 2, 2019

Will the option "Element selection mode" be added to highlight the unnecessary on the page and block as in the PC version. That is, you choose what to block yourself, because not all ads are deleted and sometimes you need to remove the interfering buttons and callouts on the page.
I give an example below:
68071464-11f88e80-fd94-11e9-8f14-8a45b6c40c04
68071472-23da3180-fd94-11e9-8338-1c1b1c05b1ea
68071480-381e2e80-fd94-11e9-95bb-7f667d28bc17

That's a lot to ask, I think.
Domain/hosts blocking is sufficient.

@FirstDefolD
Copy link

That's a lot to ask, I think.
Domain/hosts blocking is sufficient.

And what's so, I used a browser with the ability to install extensions. You click on the extension and Adblock includes the "Element Selection Mode" and click on the unnecessary and it hides from the page.
image
image

@Laicure
Copy link

Laicure commented Nov 2, 2019

Is that Kiwi?
If that so, I've seen a lot of reported issues regarding extensions on that browser.
That would keep Bromite flooded with bug reports for extensions instead of the important ones.

Anyway, Bromite's main thing is privacy not extensions or customization.
It keeps things simplified and patched.

I would love to see those things in Bromite but nope, seeing it keeping simple means a lot.

@FirstDefolD
Copy link

FirstDefolD commented Nov 2, 2019

Is that Kiwi?

No, this is a Yandex browser. It has extension support. But he is too sophisticated and not very comfortable.

@Laicure
Copy link

Laicure commented Nov 2, 2019

Is that Kiwi?
No, this is a Yandex browser. It has extension support. But he is too sophisticated and not very comfortable.

Oh, I use Samsung Browser with the Adguard Content Blocker long ago.
That thing you pointed was discussed here: #198
It discusses about the ability of Samsung/Yandex to use app extensions such as Adguard Content Blocker.

@FirstDefolD
Copy link

FirstDefolD commented Nov 2, 2019

В нем обсуждается возможность использования Samsung / Yandex расширений приложений, таких как Adguard Content Blocker .

But I want to be on the chrome, but with the ability to install extensions.

@dimqua
Copy link

dimqua commented Nov 2, 2019

Bromite's main thing is privacy not extensions

There are a lot of extensions, that improve privacy. But proprietary browsers, like Kiwi and Yandex, are horrible for privacy.

@ghost

This comment has been minimized.

@csagan5
Copy link
Contributor Author

csagan5 commented Dec 1, 2019

This feature is being tested and should be available on next release; I will also think of a way to help users generate the subresource filters file format that Chromium/Bromite need.

@csagan5
Copy link
Contributor Author

csagan5 commented Dec 9, 2019

Fixed in 78.0.3904.130.

See also: https://www.bromite.org/custom-filters

@csagan5 csagan5 closed this as completed Dec 9, 2019
@dimqua
Copy link

dimqua commented Dec 9, 2019

Well, its not an easy way. Not at all. :(

@sevospl
Copy link

sevospl commented Dec 13, 2019

I need the sources of ruleset_converter, so that I can compile it under FreeBSD. Possible by any chance?

@csagan5
Copy link
Contributor Author

csagan5 commented Dec 15, 2019

@sevospl in the help page linked in previous comment there is a link to Chromium documentation. It explains how to compile the tools; the source is in the Chromium repository since that help page explains how to build and use them.

@sevospl
Copy link

sevospl commented Jan 31, 2020

@sevospl in the help page linked in previous comment there is a link to Chromium documentation. It explains how to compile the tools; the source is in the Chromium repository since that help page explains how to build and use them.

Hey! I've cloned the whole repo, however I'm not familiar with Ninja/GN at all -- I have no idea how to compile this specific tool. Could you help me more excatly, please?

@Ajaja
Copy link

Ajaja commented Apr 3, 2020

macchrome has built ruleset_converter.exe for Windows:
https://github.com/macchrome/winchrome/releases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests