[codex] Normalize IDN proxy hosts#340
Draft
ifer47 wants to merge 1 commit into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Fixes #316.
This normalizes internationalized proxy hostnames to ASCII/Punycode at the browser/proxy output boundary while keeping the user's saved profile values unchanged.
Covered paths:
omega-pacfixed_serversproxy rulesProxyInfoobjectsWhy
Chrome and Firefox proxy APIs expect proxy server hostnames in an ASCII-compatible form. When a user configures an IDN proxy hostname such as
\u30b7.\u30b7, passing the Unicode form through can cause Chrome to fail the mandatory proxy configuration and Firefox to delay/fail proxy resolution. Converting only at the output boundary preserves the UI/configuration while making the emitted proxy configuration compatible with browser APIs.Validation
coffeelint.cmd src/profiles.coffee test/profiles.coffeefromomega-paccoffeelint.cmd src/module/proxy/proxy_impl_settings.coffee src/module/proxy/proxy_impl_listener.coffee src/module/proxy/proxy_impl_firefox.coffee src/module/proxy/proxy_auth.coffee test/proxy_hosts.coffeefromomega-target-chromium-extensionomega-pacprofile tests via Mocha withFORCEFIXEXPORTSCRIPTFORSOCKS=true: 34 passingomega-target-chromium-extension/test/proxy_hosts.coffee: 3 passing