I would like to use this library, but I need to access the Internet through a socks4 proxy.
Requests can be proxies through a socks proxy using the "agent" option of the http or https modules.
E.g.
import https from 'https'
import SocksProxyAgent from 'socks-proxy-agent'
const proxyAgent = new SocksProxyAgent("socks4://1.2.3.4:35618")
https.get('https://ifconfig.io', {agent: proxyAgent}, (res) => {
console.log(res.headers)
res.pipe(process.stdout)
})
Is there any chance we can add an option to allow people to specify a custom agent?
And if so, do you have any thoughts on how you would like to see this implemented?
Edit:
Being able to set the lookup option as well would be nice because this would allow using a custom DNS server, which in some environments is necessary.
Maybe it would make sense to allow passing any option you like to this library.
I would like to use this library, but I need to access the Internet through a socks4 proxy. Requests can be proxies through a socks proxy using the "agent" option of the http or https modules. E.g.
Is there any chance we can add an option to allow people to specify a custom agent? And if so, do you have any thoughts on how you would like to see this implemented?
Edit: Being able to set the
lookup
option as well would be nice because this would allow using a custom DNS server, which in some environments is necessary.Maybe it would make sense to allow passing any option you like to this library.