brave / adblock-rust

Brave's Rust-based adblock engine
Mozilla Public License 2.0
1.41k stars 122 forks source link

unhandled options #1

Open AndriusA opened 5 years ago

AndriusA commented 5 years ago

A few options are not currently handled from easylist and easyprivacy:

AndriusA commented 5 years ago

For network filters, there are still a few rule options that are not supported, wrt https://github.com/brave/ad-block/issues/217

antonok-edm commented 4 years ago

See also - https://github.com/brave/brave-browser/issues/8478

ghost commented 1 year ago

I noticed uBlock have added some new features like $to or a new alias for $domain: $from, and expanded regex support, so I made this quick table to compare uBlock features (from their wiki) Brave doesn't partially or completely support. Most of these incompatibilities are already mentioned here and other issues, but I also added workarounds I use to fix the limitations on my side. Just a reminder of how Brave is doing against uBlock in 2023, 4 years after this issue was opened.

Some of these features might not seem too relevant or used even today, but since Brave uses uBlock lists as default they are important to support, because when you put all the unsupported rules together, they represent an important amount of rules Brave is currently ignoring, which obviously reduce the potential of Brave to reduce tracking and avoid bad popups and all that in many websites.

Feature If Partial, What's currently not supported Examples Workarounds
⚠️ removeparam regex *$removeparam=/^utm_/
⚠️ domain entity $domain=brave.*
from= (alias) $from=brave.com
regex $domain=/img[a-z]{3,7}\\.test/
Note: regex is not limited to $domain, $from or $to, can be used in scriptlet Injection and cosmetics filters as well. /img[a-z]{3,5}\\.buzz/##+js(nowoif)

/example\\.(?!com)/##body > *
to Note: supports both entity and regex *$from=cgpress.org\|cgchannel.*\|/sidefx/
,to=/disqus/\|google.*\|gstatic.com
denyallow Note: supports entity only *$script,3p,denyallow=google.com\|gstatic
.com\|recaptcha.net,domain=domain1.com\|domain2.*
CSP
all \|\|brave.com^$all
popup

popunder
*$popup,domain=jessehakanen.net - Test

*$popunder,domain=ptcong.com - Demo
CSP

Window-Close-if.js

window.open-defuser.js (nowoif)

Other Scriptlet Injections, like 'abort-on-', acis... etc.
method \|\|brave.com^$method=post\|get
strict1p

strict3p
❌⚠️ inline-script

inline-font
Note: it uses CSP to do the job \|\|example.com^$inline-script

\|\|example.com^$inline-font
CSP
❌⚠️ empty

mp4
Note: converted internally to: redirect=empty and redirect=noopmp4-1s \|\|example.com^$empty

\|\|example.com^$mp4
plain and simple $redirect

⚠️= Partial

❌= Not supported

❌⚠️= Rule won't be supported, but they are internally converted to something Brave already supports like $csp and $redirect