Headless browser

Puppeteer proxy setup

Puppeteer passes the proxy as a Chromium launch flag, then authenticates the page. Two lines and your headless Chrome exits from residential IPs — the standard setup for scraping single-page apps and login flows.

Get 1 GB of residential data — freeon your first $10+ top-upClaim it

Connection details

proxmint · gateway
Host : Port (HTTP)gw.proxmint.com:823
Host : Port (SOCKS5)gw.proxmint.com:824
UsernamePROXY_USER
PasswordPROXY_PASS

Swap PROXY_USER / PROXY_PASS for the credentials on your dashboard. New here? Create an account to generate a key.

Puppeteer proxy example

javascript
import puppeteer from "puppeteer";

const browser = await puppeteer.launch({
  args: ["--proxy-server=http://gw.proxmint.com:823"],
});

const page = await browser.newPage();
await page.authenticate({
  username: "PROXY_USER", // add __cr.us to target a country
  password: "PROXY_PASS",
});

await page.goto("https://api.ipify.org");
console.log(await page.evaluate(() => document.body.innerText));
await browser.close();

Steer the exit IP from the username

append to your username
CountryPROXY_USER__cr.us
Country + cityPROXY_USER__cr.us;city.newyork
Sticky IP (30 min)PROXY_USER__sessid.abc123;sessttl.30

Tips & gotchas

  • The proxy goes in the launch args; the credentials go in page.authenticate.
  • Use puppeteer-extra with the stealth plugin against aggressive anti-bot targets.

Puppeteer, answered

Why do I get a 407 in Puppeteer?

A 407 means the proxy needs authentication that was not supplied. Call page.authenticate with your username and password before page.goto — Chromium cannot read credentials from the proxy URL.

How do I target a country in Puppeteer?

Add the targeting to the username in page.authenticate, e.g. PROXY_USER__cr.fr for France. The launch flag stays as the plain host:port.

Ready to route Puppeteer through residential IPs?

Create an account, paste the code above, and we'll add your first 1 GB of residential free on your first top-up. Pay by the GB after that — no subscription.