-
Notifications
You must be signed in to change notification settings - Fork 132
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
redirect-url
filter option
#184
Conversation
48a2cca
to
0a73f20
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Custom filter list subscriptions is merged in brave-core
now, so there's no way this can make it to the browser unless there's some way to ensure redirect-url
rule support can be disabled when parsing a list. I'd recommend adding some kind of ParseOptions
struct in src/lists.rs
, which can be passed as an argument to a new method on FilterSet
, something like add_filter_list_with_opts
and a similar add_filters_with_opts
. The existing FilterFormat
arg can be part of the options struct, as well as a new option to disable any redirect-url
rules.
One last consideration that doesn't require any immediate action - I am working in parallel on redirect-rule
support, which can provide a redirection for a matching request without causing it to be blocked (i.e. it will only be blocked+redirected if it also matches a separate blocking rule). For now it looks like redirect-url
will have to have the same behavior as redirect
, implementation-wise, but we should move forward with list-building as if it has the behavior of redirect-rule
. redirect
is kind of the old way of doing it; the separation of concerns is better with redirect-rule
semantics and it also keeps us from having to support something like redirect-url-rule
.
Edit: I've posted my redirect-rule
implementation plan/progress here.
b2c2039
to
30ac8b7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, we are almost there.
I can take it from here; I'm going to rebase this on top of #186 and add a few minor tweaks to make the API a little less crufty (i.e. consolidating the buildup of existing constructors and options where possible) since it looks like we're going to have to make a minor version bump with breaking changes anyways.
2c3a8c6
to
8a18d61
Compare
@antonok-edm addressed nits and removed mask setting in |
I asked uBO folks what their thoughts were on |
Yep, sounds about right. I imagine it'd also be harder for them to use such a thing without any server infrastructure.
Correct, that's exactly why I wanted the option added! |
8a18d61
to
9de5f0f
Compare
@antonok-edm No, because of security/performance issues(amoung others issue/s) raised here - uBlockOrigin/uBlock-issues#46 (comment) ABP also implemented it and once these issues came to light in the public, they immediately moved forward to remove it. |
@uBlock-user I appreciate the context. Our We plan on using this for very similar use-cases to |
9de5f0f
to
b854c94
Compare
Move parse URL logic to network filter instead of blocker
b854c94
to
5d33993
Compare
Add a new filter option to
adblock
calledredirect-url
(similar toredirect=
) that allows loading of replacement resources via a URL instead of having to bundle all replacement resources in the client.