Closed indutny-signal closed 9 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Updated (UTC) |
---|---|---|---|
proxy-agents | ✅ Ready (Inspect) | Visit Preview | Aug 29, 2023 7:14pm |
Latest commit: d51474a99bdf0a333404c7a185aa8d7d2746be61
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
Makes sense. Thank you!
Yay, thanks for merging this!
It might be helpful to use a lint rule for this as well to keep it from possibly regressing.
I think no-restricted-globals
should do the trick:
{
"rules": {
"no-restricted-globals": ["error", { "name": "URL", "message": "Use url.URL instead" }]
}
}
@lukekarrys would be happy to accept a PR!
would be happy to accept a PR!
Done 😄! #246
new URL('socks://host:port')
gives different results in browser and Node.js becausesocks
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 theport
.Since
proxy-agent
can be used in Electron, unlessURL
is imported directly from the Node'surl
module - it is going to use the Browser's version of it which won't work with socks urls.