Answer the question
In order to leave comments, you need to log in
How to make puppeteer work through socks5 proxy?
Good afternoon. I bought a proxy server, version socsk5. On the Internet, the same example is everywhere
const browser = await puppeteer.launch({
headless: true,
ignoreHTTPSErrors: true,
defaultViewport: {...winSize},
args: [
'--proxy-server=socks5://proxyhost:8000',
'--host-resolver-rules="MAP * ~NOTFOUND , EXCLUDE proxyhost"',
],
})
'--proxy-server=socks5://user:[email protected]:8000',
then it gives an error Answer the question
In order to leave comments, you need to log in
Set a local proxy that will not require authorization and forward to the parent, for example, in the 3proxy configuration something like
auth iponly
fakeresolve
internal 127.0.0.1
allow *
parent socks5+ proxyhost 8080 user password
socks -p1080
and use 127.0.0.1 1080 in the browser.
PS but in general it is better to use http/https proxies in browsers, they have a shorter handshake.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question