Closed shesek closed 1 year ago
Ping? :)
Code LGTM. Would it be possible to add a test case?
Perhaps I could add a unit test that tries to use superagent-proxy
?
This simple example currently fails: let req=require("superagent"); require("superagent-proxy")(req); req.get("https://encrypted.google.com/").proxy().end(console.log)
. Running it with ALL_PROXY
/HTTPS_PROXY
ignores the proxy.
This code in this repository has been moved to the proxy-agents
monorepo, so I am closing this pull request. If you feel that this change is still necessary as of the latest release, feel free to open a new pull request over there.
Without this, proxy-from-env gets called with an object that doesn't have a
protocol
property set, which causes it to exit early and do nothing.This is what the
opts
object passed toconnect
normally looks like: