-
Is it possible to exploit got.js with socks5 (4, 4a) proxies? In request one could pass a custom With http2 there is a similar method |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
You can pass a custom agent to Got too. It's in the docs. |
Beta Was this translation helpful? Give feedback.
-
Got it working with http(s). import { SocksProxyAgent } from 'socks-proxy-agent'
await got.get('https://example.com', {
http2: false,
agent: {
http: new SocksProxyAgent('socks://127.0.0.1:8080'),
https: new SocksProxyAgent('socks://127.0.0.1:8080'),
// http2: new SocksProxyAgent('socks://127.0.0.1:8080'),
}
}) |
Beta Was this translation helpful? Give feedback.
Got it working with http(s).