尝试在 Node.js / Puppeteer 中使用代理服务器时出错
Getting error when attempting to use proxy server in Node.js / Puppeteer
我正在尝试在我的 Node.js / Puppeteer 应用程序中使用代理并收到错误消息。
如果我删除代理代码,应用程序 运行 将按预期运行。
const browser = await puppeteer.launch({args: ['--proxy-server=socks5://127.0.0.1:9050'], headless: false});
我希望应用程序像往常一样 运行,但 IP 不同。
收到错误:ERR_PROXY_CONNECTION_FAILED
要么您的代理不工作,要么 puppeteer 拒绝它,因为它很可能使用 self-signed 证书。要解决证书问题,请添加以下参数。
args: [
'--proxy-server=socks5://127.0.0.1:9050'
'--ignore-certificate-errors',
'--ignore-certificate-errors-spki-list '
]
我正在尝试在我的 Node.js / Puppeteer 应用程序中使用代理并收到错误消息。
如果我删除代理代码,应用程序 运行 将按预期运行。
const browser = await puppeteer.launch({args: ['--proxy-server=socks5://127.0.0.1:9050'], headless: false});
我希望应用程序像往常一样 运行,但 IP 不同。
收到错误:ERR_PROXY_CONNECTION_FAILED
要么您的代理不工作,要么 puppeteer 拒绝它,因为它很可能使用 self-signed 证书。要解决证书问题,请添加以下参数。
args: [
'--proxy-server=socks5://127.0.0.1:9050'
'--ignore-certificate-errors',
'--ignore-certificate-errors-spki-list '
]