delvedor / hpagent

A ready to use http and https agent for working with proxies that keeps connections alive!
MIT License
181 stars 37 forks source link

Allow http_proxy, https_proxy and no_proxy env variables #35

Closed javi11 closed 2 years ago

javi11 commented 2 years ago

What do you think on allowing on this module the standard proxy environment variables of http_proxy, https_proxy, HTTP_PROXY, HTTPS_PROXY and no_proxy.

I can do a pull request if you feel that is useful for the module :)

mbargiel commented 2 years ago

Did you take a look at proxy-from-env to implement this in your own code? It's pretty straightforward to use.

I think it would be preferable if this simple, lightweight library remained just that way - a simple, lightweight library. I could definitely see another package wrapping this with some factory functionality that supports env-var based proxy resolution then instantiates the right agent class for a given target URL.

delvedor commented 2 years ago

Closed in https://github.com/delvedor/hpagent/pull/36#pullrequestreview-970391689.