Install
Node.js 18 or newer. The package downloads a matching browser on install.
npm i puppeteerRotating residential
--proxy-server takes a host and port only; credentials in it are ignored. Call authenticate before the first navigation.
import puppeteer from "puppeteer";
const browser = await puppeteer.launch({
args: ["--proxy-server=http://resi.proxymonkey.io:8000"],
});
const page = await browser.newPage();
await page.authenticate({ username: "USER", password: "PASS" });
await page.goto("https://httpbin.org/ip");
console.log(await page.evaluate(() => document.body.innerText));
await browser.close();A static datacenter or ISP IP
To run several IPs from one browser, give each browser context its own proxyServer. Older Puppeteer versions call this createIncognitoBrowserContext. For an ISP order, use the host and port from your dashboard.
import puppeteer from "puppeteer";
const browser = await puppeteer.launch();
const context = await browser.createBrowserContext({
proxyServer: "http://IP:PORT",
});
const page = await context.newPage();
await page.authenticate({ username: "USER", password: "PASS" });
await page.goto("https://httpbin.org/ip");
console.log(await page.evaluate(() => document.body.innerText));
await browser.close();Keeping one identity
A browser context keeps its own cookies and storage, so one context per static IP gives you separate identities that stay separate. On the rotating gateway, the requests behind a single page load can leave from different addresses; for logins and checkouts use a static IP or a residential sticky session, whose setting for your account is in the dashboard.