brave / brave-browser

Brave browser for Android, iOS, Linux, macOS, Windows.
https://brave.com
Mozilla Public License 2.0
17.81k stars 2.33k forks source link

Move the query string filter to a proper list #10188

Open fmarier opened 4 years ago

fmarier commented 4 years ago

The following query parameters will require extra functionality in the query string filter:

We should design a list format that will support all of these use cases.

In addition, instead of being hard-coded in code, the list should ideally be shipped via the component updater and be hosted in a public repo for others to contribute to.

fmarier commented 4 years ago

8975 doesn't require a list format change and is therefore not blocked on the current issue.

Since #9018 is the only tracking parameter that requires a list format change, let's wait until we have a few more examples before we migrate to a more flexible system.

Th3l5D commented 4 years ago

Hello @fmarier

Is there any news for this feature? I would like to know if there is any plan to integrate this kind of feature globally, in order to have something like https://gitlab.com/KevinRoebert/ClearUrls/ which have a nice query filter ( https://gitlab.com/KevinRoebert/ClearUrls/blob/master/data/data.min.json )

fmarier commented 4 years ago

@Th3l5D Thanks for the link. It is one of the extensions I looked at while putting together our own list.

The goal of our feature is to block cross-site tracking (see https://github.com/brave/brave-browser/wiki/Query-String-Filter) and so our list format wouldn't have to be as comprehensive what ClearUrls has, which aims at cleaning URLs of all unnecessary bits.

Work is progressing on our filter. It's alreay in release, we've recently added new trackers, and have identified a few more that need to be looked at or blocked.

fmarier commented 3 years ago

Unassigning since we're not actively working on this at the moment.

antonok-edm commented 1 year ago

Note that $removeparam support is coming in https://github.com/brave/brave-core/pull/15943

fmarier commented 2 weeks ago

@ShivanKaul and I were just discussing this.

As a first step, I suggested using the same list format as https://github.com/brave/adblock-lists/blob/master/brave-lists/clean-urls.json which would allow us to move these two hard-coded lists to a new https://github.com/brave/adblock-lists/blob/master/brave-lists/query-filter.json list:

and we can leave the smallest block hard-coded for now since it's only three entries: https://github.com/brave/brave-core/blob/cdfe99bd6b9d7c8f6b7eb0b05b3db795ec7e4ca2/components/query_filter/utils.cc#L125-L132