Integrations / Browser automation

Use Proxys with Puppeteer

Run Puppeteer through Proxys.

Steps

  1. Pass --proxy-server when launching.
  2. Call page.authenticate with the sub-user's credentials.
JavaScript
const browser = await puppeteer.launch({ args: ["--proxy-server=http://gw.proxys.co:8000"] });
const page = await browser.newPage();
await page.authenticate({ username: "USERNAME-country-us", password: "PASSWORD" });
await page.goto("https://ipinfo.io/json");

Before you start

Replace USERNAME and PASSWORD with a sub-user's credentials from the dashboard. Change -country-us to the country you need, or remove it for a random location. See targeting options for city, ASN and sticky sessions.

Try 1 GB for $1