You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With proxy-agent@5.0.0, the following code worked (example taken from here):
// index.mjsimport*ashttpfrom'http'importProxyAgentfrom'proxy-agent'// The correct proxy `Agent` implementation to use will be determined// via the `http_proxy` / `https_proxy` / `no_proxy` / etc. env varsconstagent=newProxyAgent()// The rest works just like any other normal HTTP requesthttp.get('http://jsonip.com',{agent},(res)=>{console.log(res.statusCode,res.headers)res.pipe(process.stdout)})
With
proxy-agent@5.0.0
, the following code worked (example taken from here):Test command line (this uses a PAC file which only returns
"DIRECT"
):After upgrading to
proxy-agent@6.2.1
(and doing this little change:)Then it fails with this:
I think that's because
isValidProtocol()
proxy-agents/packages/proxy-agent/src/index.ts
Lines 133 to 135 in 08487f0
uses those protocols:
proxy-agents/packages/pac-proxy-agent/src/index.ts
Lines 58 to 64 in 08487f0
The text was updated successfully, but these errors were encountered: