TooTallNate / proxy-agents

Node.js HTTP Proxy Agents Monorepo
https://proxy-agents.n8.io
873 stars 228 forks source link

[proxy-agent] Support for `getProxyForUrl` option #160

Closed mceIdo closed 1 year ago

mceIdo commented 1 year ago

This is a recreation of this PR from the original repo. This PR adds the option to provide a getProxyForUrl(url: string) => string function as an option to the ProxyAgent constructor. We found it useful in places where proxy address is different for different hosts (and pac is not an option).

changeset-bot[bot] commented 1 year ago

🦋 Changeset detected

Latest commit: 00e6b0bd28cb2f2bd7d74f93c218bd285abbac7c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ----------- | ----- | | proxy-agent | Minor |

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

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
proxy-agents ✅ Ready (Inspect) Visit Preview May 9, 2023 8:50am
mceIdo commented 1 year ago

Cool, changes are done - I did see the E2E test failed due to NORDVPN_USERNAME env var missing - is this something I'm missing?

TooTallNate commented 1 year ago

No you're not missing anything. GitHub Secrets aren't exposed to 3rd party pull requests, so I've disabled the E2E tests here: https://github.com/TooTallNate/proxy-agents/commit/f173f80dd50ed18375925713ccf9a6fcda95b1b1

mceIdo commented 1 year ago

Great, thanks :)