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

feat: generate redirect aliases mapping based on the backend #19

Merged
merged 4 commits into from
Oct 15, 2024

Conversation

seia-soto
Copy link
Member

@seia-soto seia-soto commented Oct 7, 2024

  • Generate redirect aliases mapping based on the backend
  • Fixes the conversion problem by replacing the slash value prior to the dnr conversion (adguard converter limitation)

TODO

  • Generate redirect alias mapping regarding the backend
  • Integrate adguard aliases
  • Try to pre-process aliases (remove slashes)
  • Post-process aliases (adguard output to ubo)

@seia-soto seia-soto self-assigned this Oct 7, 2024
@seia-soto seia-soto requested a review from chrmod October 7, 2024 05:44
@seia-soto seia-soto changed the title feat: depend on adblocker-filters feat: generate redirect aliases mapping based on adblocker-filters Oct 9, 2024
@seia-soto seia-soto changed the title feat: generate redirect aliases mapping based on adblocker-filters feat: generate redirect aliases mapping based on the backend Oct 9, 2024
@seia-soto seia-soto marked this pull request as ready for review October 9, 2024 06:12
@seia-soto seia-soto marked this pull request as draft October 9, 2024 06:22
Adguard dnr converter doesn't allow you to convert redirect filters with slash value to dnr. This PR solves the problem by replacing the slash value prior to the dnr conversion.
@seia-soto seia-soto added the enhancement New feature or request label Oct 14, 2024
@seia-soto seia-soto marked this pull request as ready for review October 14, 2024 14:57
@seia-soto seia-soto marked this pull request as draft October 14, 2024 15:02
@seia-soto
Copy link
Member Author

After the conversion time from the dnr converter, the adguard aliases are not handled correctly.

@seia-soto seia-soto marked this pull request as ready for review October 15, 2024 04:28
@seia-soto
Copy link
Member Author

Processing steps for ||test$redirect=google-analytics.com/analytics.js


  1. Preprocess google-analytics.com/analytics.js as adguard converter cannot handle aliases with slash value
  2. Run ag converter after normalisation
  3. Postprocess the extensionPath of /rule_resources/redirects/google-analytics.js to be /rule_resources/redirects/google-analytics_analytics.js

@chrmod chrmod merged commit a574de9 into main Oct 15, 2024
2 checks passed
@chrmod chrmod deleted the update-redirect-alias-generation branch October 15, 2024 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants