Skip to content

update DAT generation for part 1 of redirect/important fixes #135

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

Merged
merged 1 commit into from
Sep 12, 2020

Conversation

antonok-edm
Copy link
Collaborator

Provides the necessary server-side fixes for #131.

Overall strategy is to map any $important,redirect rules at serverside DAT creation into two separate filters: one placed into the importants list, the other one placed into the redirects list without the important option. This mirrors uBlock Origin's redirect-splitting behavior. Then, later, the client will be updated to check redirects regardless of whether or not an important filter was found. This will allow redirects to work even when a separate important rule exists.

Technically, the redirect option should not exist on the rule in the importants list. However, it's left in place not to break older clients.

This way, older clients will check for importants, find the $important,redirect rule, and use both options from it.
Newer clients will check importants and redirects independently, find one in each, and use the corresponding options from each.

The client-side code can be updated much later to correctly split $redirect rules into one with an internal redirect flag, and one blocking rule, giving us trivial support for the $redirect-rule option as well.

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

Successfully merging this pull request may close these issues.

1 participant