New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to set proxy auth ? #676
Comments
+1 |
1 similar comment
+1 |
+1. I still can't find a way to authenticate proxy using puppeteer. I tried to do auth like this: const browser = await puppeteer.launch({
args: ['--proxy-server=IP:LOGIN:PASSWORD']
}); but then chromium just crashes and nothing happens. |
Dupe of #426 |
can you put it into example folder ? i add proxy-Auth.... header , not work , many people care about this question @aslushnikov |
+1 |
Definitely +1. |
@androidfanatic @WG-Com @tmpace |
Not sure, const browser = await puppeteer.launch({
ignoreHTTPSErrors: true,
args: ['--proxy-server=example.com:8080']
});
const page = await browser.newPage();
await page.setExtraHTTPHeaders({
'Proxy-Authorization': 'Basic ' + Buffer.from('user:pass').toString('base64'),
}); |
@adarmanto This will only work for HTTP websites, but not HTTPS. Here's a blog post describing a workaround - https://medium.com/@jancurn/how-to-make-headless-chrome-and-puppeteer-use-a-proxy-server-with-authentication-249a21a79212 |
@jancurn Awesome! But I forgot to mention about |
@adarmanto I added ignoreHTTPSErrors in args ,but also not work. |
@aslushnikov |
This actually works like a charm to me. const browser = await puppeteer.launch({ After Pupperteer Launch use following parameters to authenticate. await page.authenticate({ |
global how to set?like page1,page2,page3.. |
my proxy server has authentication
The text was updated successfully, but these errors were encountered: