Skip to main content
Working examples for the four major automation tools. Tabs sync across the page: your library choice carries through every section.

Basic setup

Playwright has the cleanest proxy API.
const { chromium } = require('playwright');

const browser = await chromium.launch({
  proxy: {
    server: 'http://HOST:PORT',
    username: 'USER',
    password: 'PASS',
  },
});
const page = await browser.newPage();
await page.goto('https://api.ipify.org');
console.log(await page.textContent('body'));
await browser.close();
Per-context proxy (multiple proxies in one browser):
const context = await browser.newContext({
  proxy: { server: 'http://HOST:PORT', username: 'U', password: 'P' },
});

Common issues

Use stealth plugins (puppeteer-extra-plugin-stealth, playwright-extra) or undetected-chromedriver for Selenium.
Use stealth plugins or set browser flags to disable WebRTC.
Use unique user-data-dir per instance.
Connection reuse. Force a new session ID per request or use a fresh browser context.