proxy-from-env icon indicating copy to clipboard operation
proxy-from-env copied to clipboard

Support for mixed protocol proxies and urls

Open heathdbrown opened this issue 2 years ago • 0 comments

An environment may have a 'plain' http://proxy.example:80 only and need to send a https://example.com url through.

We hit this when attempting to use puppeteer which utilizes this library to gather the proxy.

The 'shouldProxy' function looks to take into account that both ports match up to set the proxy which results in non proxied traffic and a failure http status code 400 to occur. Proxies expect a 'CONNECT' for the https traffic.

heathdbrown avatar Apr 26 '23 17:04 heathdbrown