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

Create a userscript for rewriting URLs #3

Open
ameshkov opened this issue Jan 19, 2016 · 3 comments
Open

Create a userscript for rewriting URLs #3

ameshkov opened this issue Jan 19, 2016 · 3 comments

Comments

@ameshkov
Copy link
Member

Source request:
http://forum.adguard.com/showthread.php?8695-HowTo-rewrite-a-URL

@TPS
Copy link

TPS commented Jun 10, 2024

Recently, I ran into ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/readme.txt while reading about the recent PHP vuln, but it turns out the major browsers dropped FTP capability around the time they integrated HTTPS-by-default everywhere. If this userscript is ever published, the best fallback would be to convert

  • [s]ftp[s]:// → https://
  • ftp:// → http:// (which the browsers would then try https://, but would allow fallback to http:// with (justified) warning

@ameshkov
Copy link
Member Author

In theory the new $urltransform modifier: AdguardTeam/CoreLibs#1364

@TPS
Copy link

TPS commented Jun 12, 2024

I've read the $urltransform sections of the docs several times, but regex always confuses me. This seems simple, but I hesitate b/c of that. What would be the correct rule to attempt?

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

No branches or pull requests

2 participants