Is it Possible to Pass Proxy Settings in Puppeteer?

This topic was automatically generated from Slack. You can find the original thread here.

Hello, first I would like to thank you for the availability of Puppeteer!
Is it possible to pass the Proxy settings? example:
const browser = await puppeteer.launch({
args: [
'--proxy-server=your-proxy-server-ip:your-proxy-server-port',
'--proxy-auth=username:password'
]
});
thank you very much !

Yes, the puppeteer.browser(opts ={}) method accepts arguments that are passed directly to puppeteer.launch(opts)

Here’s the source code for this method:

I would recommend adding the other args arguments listed in the defaults, just so you keep the same settings we know work now.

perfect, thanks a lot Pierce !

Sure thing :slightly_smiling_face: