Rob--W / proxy-from-env

A Node.js library to get the proxy URL for a given URL based on standard environment variables (http_proxy, no_proxy, ...).
MIT License
51 stars 19 forks source link

Support socks5 proxies? #10

Open petterreinholdtsen opened 4 years ago

petterreinholdtsen commented 4 years ago

Hi. Is there a way to use this library with socks5 proxies?

Rob--W commented 4 years ago

This library does not offer any proxy functionality, it only reads proxy information from environment variables in a standard way, to offer the desired proxy to the library user (which can then in turn use the returned configuration to do the actual proxying).

Whether SOCKS proxies are supported depends on the application that consumes the variables. For example, in curl, one can set the value to socks5://username:password@hostname:port to request the use of a SOCKS5 proxy.