Closed jackjocross closed 6 years ago
@TooTallNate let me know if there are any other changes I should make!
Really good stuff @crosscompile! Thank you.
I'd love to use this, but it doesn't look like it's actually been released. Any chance you could publish this sometime soon @TooTallNate?
Thank you for adding this @crosscompile! <3
Going to be super easy to support http proxies in https://github.com/cdr/code-server now!
If you declare a
new ProxyAgent()
without passing anyopts
, proxy-from-env will be used to determine whether to use a proxy or the defaulthttp.Agent
.In order to support the
NO_PROXY
environment variable, I had to add some logic in theconnect
function to resolve the proxy for each request if initialopts
weren't passed in.I am not very familiar with
http.Agent
, but tried usingagent.addRequest
after reading through the source code. Let me know if you think I should take a different approach to anything in this PR.