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

Use non-compliant URL from 'url' for socks urls #242

Merged
merged 1 commit into from
Sep 4, 2023

Commits on Aug 29, 2023

  1. Use non-compliant URL from 'url' for socks urls

    `new URL('socks://host:port')` gives different results in browser and
    Node.js because `socks` is not among the "special schemes" specified by
    WHATWG and thus the hostname is treated as an opaque value (without
    parsing the port). Node.js implementation, however, parses the `port`.
    
    Since `proxy-agent` can be used in Electron, unless `URL` is imported
    directly from the Node's `url` module - it is going to use the Browser's
    version of it which won't work with socks urls.
    indutny-signal committed Aug 29, 2023
    Configuration menu
    Copy the full SHA
    d51474a View commit details
    Browse the repository at this point in the history