Playwright proxy: browser and context configuration

13 min read

Set a Playwright proxy on the browser or a context, pass credentials, confirm HTTPS CONNECT, and fix 407 and certificate errors without turning TLS off.

This guide is for developers who need Playwright traffic to leave through an HTTP or SOCKS5 proxy, either for a whole browser or for one context. The lab used Playwright 1.64.0 against a local origin and a CONNECT-capable dummy proxy. No free keys, and Top Proxy does not sell IPs. A passing local fixture is not a production account or region.

01Set a proxy on the browser versus on a context

Playwright documents one proxy object in two places. Network: HTTP proxy (accessed 14 October 2026) says the proxy can be set globally for the entire browser, or for each browser context. browser.newContext() repeats the same fields: server, optional bypass, optional username, optional password. The Python network guide uses the same shape on chromium.launch(proxy=...) and browser.new_context(proxy=...). This walkthrough executes the Node library. Python is API-similar in those docs, not a second lab.

Put the proxy on chromium.launch when every context in that process should share one exit. Put it on browser.newContext when one process must hold two exits, two cookie jars, or a default plus an override.

  1. Decide whether the job is "one exit for the run" or "two identities in one process".
  2. If the job is one exit for the whole browser process, set proxy on chromium.launch. In Playwright Test, use.proxy in playwright.config.ts is a context fixture: it applies to that test's context and its pages, not as a launch default shared by every context on the browser. See Configuration (use).
  3. If the job is two exits, launch without pinning the second identity, then pass a different proxy into each newContext.
  4. Close each context you created before browser.close(), which is the cleanup note on browser.newContext().

The lab launched Chromium 156.0.8078.4 with a browser-level HTTP proxy to 127.0.0.1 and fetched a local origin. The page returned HTTP 200. The proxy log showed GET http://127.0.0.1:<port>/. After stripping HTTP_PROXY, HTTPS_PROXY, ALL_PROXY, and NO_PROXY from the process, a direct launch with no proxy option hit the same origin with zero proxy events. That is a clean no-proxy baseline. It does not measure what Playwright would do if those variables were still set.

A second browser used the first proxy as the launch default, then opened a context whose proxy.server pointed at a different local forwarder. The context request returned 200. Hits landed on the second forwarder. The first forwarder did not see the context's origin URL. Context proxy replaced the browser default for that context. It did not merge with it.

Playwright Test use.proxy configures the test context and its pages. chromium.launch({ proxy }) is a separate browser default. It is not a per-test rotation API. There is no rotateSession field on launch or newContext in the 1.64.0 API that this lab executed.

02Pass host, port and credentials without leaking them

server is a URL. The Browser API text is explicit: http://myproxy.com:3128 and socks5://myproxy.com:3128 are supported. A short form myproxy.com:3128 is treated as HTTP. If the provider gave a SOCKS5 endpoint, the socks5:// scheme is required. Username and password are documented as credentials for an HTTP proxy that requires authentication. They are not documented as SOCKS5 userpass.

Keep the password in the environment or a secret store. Do not paste it into a committed config. Playwright still has to send Proxy-Authorization on the wire. The lab used dummy user lab-user and a dummy password that includes @, :, /, #, and %. Results logs redacted that value.

Chromium's HTTP proxy auth is chatty. Against a local Basic proxy:

  1. Set server to http://127.0.0.1:<port> with no username. page.goto on the HTTP origin returned status 407. The proxy log recorded authReason: missing. Playwright did not throw. The status on the response object was the proof.
  2. Set username lab-user and a wrong password. Status 407 again. The log showed a first probe with missing credentials, then authReason: wrong.
  3. Set the dummy password correctly. Status 200. The log showed the same missing probe, then authorized: true.

Wrong credentials are not a hanging socket in this Chromium build. They are an HTTP 407 from the proxy, surfaced as a navigation status. If a wrapper later throws, keep the 407 and the exception class. Do not collapse both into "proxy not working".

HTTP Authentication on the same Network page is httpCredentials for the origin, not proxy.username. Mixing them is a common miss: origin 401 and proxy 407 are different hop.

03Confirm HTTPS traffic uses CONNECT through an HTTP proxy

The target URL scheme and the proxy URL scheme are different knobs. An origin https://example.com/ still uses an HTTP proxy on http://127.0.0.1:<port>. The proxy method is CONNECT, target example.com:443. The lab logged that CONNECT, then Chromium completed TLS against the public certificate and page.goto returned 200. That is HTTPS through an HTTP proxy with verification left on.

A local HTTPS origin signed by a lab CA is the other half. Chromium 156.0.8078.4, ignoreHTTPSErrors left at the documented default false, navigated to https://127.0.0.1:<https-port>/ through the same HTTP proxy. The proxy logged CONNECT 127.0.0.1:<https-port>. Then Playwright threw PlaywrightError with net::ERR_CERT_AUTHORITY_INVALID. CONNECT happened. TLS still failed. The target being https:// did not turn the proxy into an "https proxy", and the proxy accepting CONNECT did not make Chromium trust a private CA.

Node https.request to that same origin with rejectUnauthorized: true and no CA failed with unable to verify the first certificate. The same client with the lab CA PEM returned HTTP 200. That is the documented Node trust path. Playwright's clientCertificates option, added in v1.46 on newContext, is a client certificate for a named origin, not a way to install a private CA. The documented Playwright switch that would skip the failure is ignoreHTTPSErrors: true. This article does not use it. Do not set rejectUnauthorized: false either.

If the job is "prove CONNECT", read the proxy log for CONNECT host:port. If the job is "prove the page loaded", you still need a certificate Chromium already trusts, or a CA installed by a process outside this guide. A checker page in a personal browser is that browser's exit, not Playwright's route. Use What is my IP only as a browser-exit helper. Use the proxy checker to see whether a host accepts HTTP or SOCKS5 before you point Playwright at it.

Assertion table from the Playwright 1.64.0 loopback lab on 14 October 2026

The figure is a results table from this run, not a 16:9 cover and not a screenshot of the checker.

04Use SOCKS5 only where the engine actually supports it

The Network guide says pages can load over HTTP(S) proxy or SOCKSv5. Chromium 156.0.8078.4 with server: "socks5://127.0.0.1:<port>" and no username fetched the HTTP origin with status 200. The SOCKS fixture logged CONNECT 127.0.0.1:<origin-port>. Unauthenticated SOCKS5 is in the walkthrough for this pinned Chromium.

Authenticated SOCKS5 is not. chromium.launch, firefox.launch, and webkit.launch in Playwright 1.64.0 all threw PlaywrightError: Browser does not support socks5 proxy authentication. The throw happened at launch, before page.goto. Playwright 1.64.0 downloaded Firefox 157.0 and WebKit 27.2 for those launches. The message matches the long-open product request microsoft/playwright#10567, still Open with label P3-collecting-feedback on 14 October 2026. A 2021 maintainer comment there records that Chromium and Firefox lack SOCKS5 userpass in the engines themselves.

If a provider only offers SOCKS5 with a username, this pinned Playwright build will not send that username. Use an HTTP proxy with username and password, or an unauthenticated SOCKS5 endpoint that the engine actually dialed in a test like the one below. Protocol comparison lives in SOCKS5 vs HTTP proxies. Python Requests is a different client and a different article: Python requests proxy.

05Bypass selected hosts without treating bypass as a universal escape

bypass is a comma-separated list of domains. The API example is ".com, chromium.org, .domain.com". It is not a kill switch for every host, and it is not a privacy feature.

  1. Launch Chromium with proxy.server pointing at the open forwarder and bypass: "127.0.0.1".
  2. Navigate to http://127.0.0.1:<origin>/. The page returned 200. The proxy log for that window was empty. The listed host skipped the proxy.
  3. Launch again with bypass: "example.com" and navigate to the same 127.0.0.1 origin. Status 200, and the proxy logged GET http://127.0.0.1:<origin>/. An unlisted host still used the proxy.

That is the whole promise. bypass does not mean "this proxy cannot see me in general". It means "these hosts, in this context, are not sent to this proxy". Localhost rules in Chromium can surprise you in other builds. Measure the proxy log. Do not assume.

06Isolate two contexts so cookies and exits do not mix

browser.newContext() creates a jar that does not share cookies with other contexts. Combine that with per-context proxy when two tests must not leak a session onto the wrong exit.

  1. Launch Chromium with no browser-level proxy.
  2. Open context A with proxy A, context B with proxy B.
  3. Navigate both to the same origin that sets a lab cookie.
  4. Read context.cookies().

The lab got cookie t-origin-a-67a984 in context A and t-origin-a-ff4919 in context B. The jars were not equal. Both navigations returned 200. Isolation here is Playwright context isolation plus two proxy servers. It is not provider sticky-session marketing, and it is not a claim that a residential pool will keep the same IP.

Close the contexts you opened. A leaked context keeps cookies and proxy credentials alive until the browser dies.

07Diagnose refused connections, 407 and certificate failures without disabling TLS

When Playwright "does not work", name the hop that failed.

WhereProtocolWhat the 1.64.0 lab observedEngine limit
Direct chromium.launch()noneHTTP origin 200, zero proxy eventsnone
Browser-level proxy.server HTTPHTTP GET200, proxy log shows absolute-form GETnone
Context proxy overriding launchHTTP GET200 on the context proxy, not the launch proxynone
HTTP proxy, missing or wrong BasicHTTP 407page.goto status 407, no thrownone
HTTP proxy, correct BasicHTTP GET200 after Chromium's missing-auth probenone
HTTP proxy, HTTPS origin with public CACONNECT then TLSCONNECT example.com:443, page 200none
HTTP proxy, HTTPS origin with lab CACONNECT then TLSCONNECT logged, then net::ERR_CERT_AUTHORITY_INVALIDno context CA-file API
SOCKS5, no usernameSOCKS CONNECTChromium 200, fixture CONNECTauth not involved
SOCKS5 plus usernamerejected at launchBrowser does not support socks5 proxy authentication on Chromium, Firefox, WebKitPlaywright 1.64.0 + engines
proxy.server http://127.0.0.1:1TCPnet::ERR_PROXY_CONNECTION_FAILEDnone
bypass: "127.0.0.1"skiporigin 200, zero proxy eventslist is exact, not global

Refused proxy: Chromium still launched. page.goto then threw PlaywrightError with net::ERR_PROXY_CONNECTION_FAILED. The default navigation timeout in the lab was 8000 ms. The refused case failed faster than that timeout. Keep the class name PlaywrightError and the net:: code. Do not rename it to a generic timeout.

Certificate failure: keep TLS on. The local CA path that succeeded was Node https with ca set. The Playwright browser path that succeeded was https://example.com/ through CONNECT, which already has a public CA. The Playwright browser path that failed was the lab origin. ignoreHTTPSErrors stays false.

How to check a route, in order:

  1. Confirm the proxy port accepts a connection. A refused port is ERR_PROXY_CONNECTION_FAILED, not a bad password.
  2. For HTTP proxies, look at 407 versus 200. Missing and wrong passwords were 407 in this Chromium.
  3. For HTTPS targets, look for CONNECT in the proxy log, then look at TLS. CONNECT plus ERR_CERT_AUTHORITY_INVALID means the tunnel worked and the certificate did not.
  4. For SOCKS5 with a username, expect a launch error in 1.64.0 rather than a page error.
  5. Only then look at the origin body.

The public lab below is the reader-visible fixture. It owns the origin, the CONNECT proxy, and the Chromium process, and it closes them in finally, including on constructor and start failures. Save it as public_lab.mjs.

npm install playwright@1.64.0
npx playwright install chromium
node public_lab.mjs
#!/usr/bin/env node
/**
 * Self-contained loopback lab for Playwright 1.64.0 (Node).
 * Dummy credentials only. Local origin and CONNECT proxy. Does not call a paid provider.
 *
 *   npm install playwright@1.64.0
 *   npx playwright install chromium
 *   node public_lab.mjs
 *
 * TLS stays verified. This script never sets ignoreHTTPSErrors.
 */
import { spawnSync } from "node:child_process";
import fs from "node:fs";
import http from "node:http";
import https from "node:https";
import net from "node:net";
import os from "node:os";
import path from "node:path";
import { fileURLToPath } from "node:url";
import { chromium } from "playwright";

const USER = "lab-user";
const PASSWORD = "p@ss:/#%";
const REDACT = "***";
const TIMEOUT_MS = 8000;
const SHUTDOWN_MS = 4000;
const STRIP = [
  "HTTP_PROXY",
  "HTTPS_PROXY",
  "ALL_PROXY",
  "NO_PROXY",
  "http_proxy",
  "https_proxy",
  "all_proxy",
  "no_proxy",
];

function redact(s) {
  return String(s)
    .split(PASSWORD)
    .join(REDACT)
    .split(Buffer.from(`${USER}:${PASSWORD}`).toString("base64"))
    .join(REDACT);
}

function isolateEnv() {
  for (const k of STRIP) delete process.env[k];
}

function basic() {
  return "Basic " + Buffer.from(`${USER}:${PASSWORD}`, "utf8").toString("base64");
}

function listen(server, sockets) {
  server._nativeClose = server.close.bind(server);
  server.on("connection", (s) => {
    sockets.push(s);
    s.on("error", () => {});
  });
  return new Promise((resolve, reject) => {
    server.once("error", reject);
    server.listen(0, "127.0.0.1", () => resolve(server.address().port));
  });
}

function closeServer(server) {
  const native = server._nativeClose || server.close.bind(server);
  const attempt = (fn) =>
    new Promise((resolve, reject) => {
      let settled = false;
      const done = (err) => {
        if (settled) return;
        settled = true;
        clearTimeout(t);
        if (err) reject(err);
        else resolve();
      };
      const t = setTimeout(() => done(new Error("server-close-timeout")), SHUTDOWN_MS);
      try {
        fn((err) => done(err || null));
      } catch (e) {
        done(e);
      }
    });
  return (async () => {
    try {
      if (typeof server.closeAllConnections === "function") server.closeAllConnections();
    } catch {}
    let lastErr = null;
    try {
      await attempt((cb) => server.close(cb));
    } catch (e) {
      lastErr = e;
      try {
        if (typeof server.closeAllConnections === "function") server.closeAllConnections();
      } catch {}
      try {
        await attempt((cb) => native(cb));
        lastErr = lastErr;
      } catch (e2) {
        lastErr = e2;
      }
    }
    if (server.listening) throw lastErr || new Error("server-still-listening");
    if (lastErr) throw lastErr;
  })();
}

async function guarded(name, fn, errors) {
  try {
    await Promise.race([
      fn(),
      new Promise((_, reject) => setTimeout(() => reject(new Error(`${name}-shutdown-bound`)), SHUTDOWN_MS)),
    ]);
  } catch (e) {
    errors.push(`${name}: ${e && e.message ? e.message : e}`);
  }
}

function makeCerts(tmp) {
  const caKey = path.join(tmp, "ca.key");
  const caPem = path.join(tmp, "ca.pem");
  const originKey = path.join(tmp, "origin.key");
  const originCsr = path.join(tmp, "origin.csr");
  const originPem = path.join(tmp, "origin.pem");
  const ext = path.join(tmp, "ext.cnf");
  fs.writeFileSync(ext, "subjectAltName=IP:127.0.0.1,DNS:localhost\nbasicConstraints=CA:FALSE\n");
  const run = (args) => {
    const r = spawnSync("openssl", args, { encoding: "utf8" });
    if (r.status !== 0) throw new Error(r.stderr || r.stdout);
  };
  run(["req", "-x509", "-newkey", "rsa:2048", "-keyout", caKey, "-out", caPem, "-days", "1", "-nodes", "-subj", "/CN=pw-public-lab-ca"]);
  run(["req", "-newkey", "rsa:2048", "-keyout", originKey, "-out", originCsr, "-nodes", "-subj", "/CN=127.0.0.1"]);
  run(["x509", "-req", "-in", originCsr, "-CA", caPem, "-CAkey", caKey, "-CAcreateserial", "-out", originPem, "-days", "1", "-extfile", ext]);
  return {
    caPem: fs.readFileSync(caPem, "utf8"),
    originKey: fs.readFileSync(originKey),
    originPem: fs.readFileSync(originPem),
  };
}

function startHttpOrigin(sockets) {
  const server = http.createServer((req, res) => {
    res.setHeader("Content-Type", "application/json");
    res.end(JSON.stringify({ ok: true, path: req.url, via: "http-origin" }));
  });
  return listen(server, sockets).then((port) => ({ server, port }));
}

function startHttpsOrigin(certs, sockets) {
  const server = https.createServer(
    { key: certs.originKey, cert: certs.originPem, minVersion: "TLSv1.2" },
    (req, res) => {
      res.setHeader("Content-Type", "application/json");
      res.end(JSON.stringify({ ok: true, path: req.url, via: "https-origin" }));
    },
  );
  return listen(server, sockets).then((port) => ({ server, port }));
}

function startConnectProxy(sockets) {
  const events = [];
  const server = net.createServer((socket) => {
    let buf = Buffer.alloc(0);
    const onData = (chunk) => {
      buf = Buffer.concat([buf, chunk]);
      const text = buf.toString("latin1");
      const split = text.indexOf("\r\n\r\n");
      if (split < 0) return;
      socket.removeListener("data", onData);
      const head = text.slice(0, split);
      const lines = head.split("\r\n");
      const [method, target] = lines[0].split(" ");
      const headers = {};
      for (const line of lines.slice(1)) {
        const c = line.indexOf(":");
        if (c >= 0) headers[line.slice(0, c).trim().toLowerCase()] = line.slice(c + 1).trim();
      }
      const rec = { method, target, auth: headers["proxy-authorization"] === basic() };
      events.push(rec);
      if (!rec.auth) {
        socket.end("HTTP/1.1 407 Proxy Authentication Required\r\nProxy-Authenticate: Basic realm=\"lab\"\r\nContent-Length: 0\r\n\r\n");
        return;
      }
      if (method === "CONNECT") {
        const [host, portStr] = target.split(":");
        const dest = net.connect(Number(portStr), host, () => {
          socket.write("HTTP/1.1 200 Connection Established\r\n\r\n");
          socket.pipe(dest);
          dest.pipe(socket);
        });
        sockets.push(dest);
        dest.on("error", () => socket.destroy());
        return;
      }
      let url;
      try {
        url = new URL(target);
      } catch {
        socket.end("HTTP/1.1 400 Bad Request\r\nContent-Length: 0\r\n\r\n");
        return;
      }
      const req = http.request(
        {
          hostname: url.hostname,
          port: url.port || 80,
          path: url.pathname + url.search,
          method,
          headers: { host: url.host },
        },
        (res) => {
          socket.write(`HTTP/1.1 ${res.statusCode} ${res.statusMessage}\r\n`);
          for (const [k, v] of Object.entries(res.headers)) socket.write(`${k}: ${v}\r\n`);
          socket.write("\r\n");
          res.pipe(socket);
        },
      );
      req.on("error", () => socket.destroy());
      req.end();
    };
    socket.on("data", onData);
    socket.on("error", () => {});
  });
  return listen(server, sockets).then((port) => ({ server, port, events }));
}

function nodeHttpsWithCa(port, caPem, timeoutMs = TIMEOUT_MS) {
  return new Promise((resolve, reject) => {
    let settled = false;
    let deadline;
    const finish = (fn, arg) => {
      if (settled) return;
      settled = true;
      clearTimeout(deadline);
      fn(arg);
    };
    const failTimeout = () => {
      const err = new Error("node-https-timeout");
      err.name = "NodeHttpsTimeoutError";
      try {
        req.destroy(err);
      } catch {}
      finish(reject, err);
    };
    const req = https.request(
      {
        hostname: "localhost",
        port,
        path: "/",
        method: "GET",
        ca: caPem,
        rejectUnauthorized: true,
        timeout: timeoutMs,
      },
      (res) => {
        const chunks = [];
        res.on("data", (c) => chunks.push(c));
        res.on("end", () => finish(resolve, { status: res.statusCode, body: Buffer.concat(chunks).toString("utf8") }));
        res.on("error", (e) => finish(reject, e));
      },
    );
    req.on("timeout", failTimeout);
    req.on("error", (e) => finish(reject, e));
    deadline = setTimeout(failTimeout, timeoutMs);
    req.end();
  });
}

async function main() {
  isolateEnv();
  const owned = [];
  const sockets = [];
  const tmp = fs.mkdtempSync(path.join(os.tmpdir(), "pw-public-lab-"));
  let browser;
  const result = { ok: false, ignoreHTTPSErrors: false, cases: [] };
  const wipeTmp = () => {
    if (!tmp || !fs.existsSync(tmp)) return;
    for (const f of fs.readdirSync(tmp)) {
      if (f.endsWith(".key") || f.endsWith(".pem") || f.endsWith(".csr") || f.endsWith(".srl") || f.endsWith(".cnf")) {
        fs.rmSync(path.join(tmp, f), { force: true });
      }
    }
    fs.rmSync(tmp, { recursive: true, force: true });
  };
  try {
    const certs = makeCerts(tmp);
    const httpOrigin = await startHttpOrigin(sockets);
    owned.push(httpOrigin.server);
    const httpsOrigin = await startHttpsOrigin(certs, sockets);
    owned.push(httpsOrigin.server);
    const proxy = await startConnectProxy(sockets);
    owned.push(proxy.server);

    browser = await chromium.launch({
      proxy: {
        server: `http://127.0.0.1:${proxy.port}`,
        username: USER,
        password: PASSWORD,
      },
      timeout: 30000,
    });
    const context = await browser.newContext();
    const page = await context.newPage();
    page.setDefaultTimeout(TIMEOUT_MS);

    const httpRes = await page.goto(`http://127.0.0.1:${httpOrigin.port}/`);
    const httpBody = await page.textContent("body");
    result.cases.push({
      name: "browser-http-via-proxy",
      status: httpRes.status(),
      body: httpBody,
      proxyEvents: proxy.events.filter((e) => e.method === "GET").map((e) => ({ method: e.method, target: e.target })),
    });

    let tlsErr = null;
    try {
      await page.goto(`https://127.0.0.1:${httpsOrigin.port}/`);
    } catch (e) {
      tlsErr = { name: e.name, message: redact(e.message) };
    }
    result.cases.push({
      name: "browser-https-untrusted-ca",
      error: tlsErr,
      connectEvents: proxy.events.filter((e) => e.method === "CONNECT"),
    });

    const trusted = await nodeHttpsWithCa(httpsOrigin.port, certs.caPem);
    result.cases.push({
      name: "node-https-with-lab-ca",
      status: trusted.status,
      body: trusted.body,
    });

    await context.close();
    result.ok =
      result.cases[0].status === 200 &&
      tlsErr != null &&
      trusted.status === 200 &&
      result.cases[1].connectEvents.length >= 1;
    result.httpOrigin = httpOrigin.port;
    result.httpsOrigin = httpsOrigin.port;
    result.proxyPort = proxy.port;
  } finally {
    const errors = [];
    try {
      await guarded(
        "browser",
        async () => {
          if (browser) await browser.close();
        },
        errors,
      );
      await guarded(
        "sockets",
        async () => {
          for (const s of sockets.splice(0)) {
            try {
              s.destroy();
            } catch {}
          }
        },
        errors,
      );
      await guarded(
        "servers",
        async () => {
          const leftover = [];
          for (const s of owned) {
            try {
              await closeServer(s);
            } catch (e) {
              errors.push(`server: ${e && e.message ? e.message : e}`);
            }
            if (s.listening) leftover.push(s.address() && s.address().port);
          }
          if (leftover.length) throw new Error(`servers-still-listening:${leftover.join(",")}`);
        },
        errors,
      );
    } finally {
      await guarded("temp-keys", async () => wipeTmp(), errors);
    }
    if (errors.length) result.cleanupErrors = errors;
    result.serversLeftover = owned.filter((s) => s.listening).map((s) => s.address() && s.address().port);
  }
  console.log(JSON.stringify(result, null, 2));
  if (!result.ok || (result.serversLeftover && result.serversLeftover.length) || (result.cleanupErrors && result.cleanupErrors.some((e) => String(e).includes("still-listening")))) {
    process.exitCode = 1;
  }
}

export { nodeHttpsWithCa, TIMEOUT_MS, makeCerts, SHUTDOWN_MS, closeServer };

const isMain =
  process.argv[1] && fileURLToPath(import.meta.url) === path.resolve(process.argv[1]);
if (isMain) {
  main().catch((e) => {
    console.error(redact(e && e.stack ? e.stack : e));
    process.exit(1);
  });
}

On 14 October 2026 that script returned ok: true, HTTP 200 through the proxy, CONNECT to the local HTTPS port, net::ERR_CERT_AUTHORITY_INVALID in Chromium, and HTTP 200 from Node with the lab CA. Dummy credentials only. openssl must be on PATH.

If you need a provider after the client works, the English catalog pages for Bright Data, Oxylabs, SOAX, and Decodo (Smartproxy) returned HTTP 200 on 14 October 2026 and mention HTTP and SOCKS5. Those pages were not the lab exit. Catalog fit is published protocol text, not a Playwright login through that vendor.

Bright Data — residential and datacenter proxies
Bright Data — residential and datacenter proxies4.41452

Bright Data is a large proxy network for data collection: residential, mobile, ISP and datacenter IPs in about 195 countries. Residential traffic can be paid as you go with no subscription, and datacenter and ISP addresses come in packs from 10 IPs. Residential and mobile access requires identity verification.

10 countries
$5.00
per 1 GB
Oxylabs — residential and datacenter proxies
Oxylabs — residential and datacenter proxies3.9779

Oxylabs sells residential, mobile, ISP and datacenter proxies under one monthly subscription from $30. Buyer payments: cards, wire transfer, AliPay, PayPal.

10 countries
$0.45
per 1 GB
SOAX — residential and mobile proxies
SOAX — residential and mobile proxies3.8218

SOAX sells rotating residential and mobile proxies on a shared credit pool, with datacenter and ISP in the same plans. Builder starts at $200/mo + VAT (200 credits); Tier 1 traffic is $3/GB on Builder.

85 countries
$3.00
per 1 GB
Visit site
Decodo (Smartproxy) — residential and datacenter proxies
Decodo (Smartproxy) — residential and datacenter proxies4.22603

Decodo (formerly Smartproxy) sells residential and datacenter proxies. Residential: $4/GB without a monthly plan, or monthly packs from $3.75/GB for 3 GB. Payments: cards, PayPal, Alipay, Google/Apple Pay, crypto (with limits).

83 countries
$0.38
per 1 GB

For a pre-check of host, port, and protocol before you wire Playwright, use the proxy checker. For a deeper "does this proxy leak" pass, see How to check if a proxy works.

Should the proxy sit on the browser or on a context?

Browser-level proxy covers every context in that browser. Context-level proxy applies to one jar and can replace the browser default. The lab saw a context proxy send traffic to a second forwarder while the launch proxy stayed quiet.

Does Playwright send HTTPS through an HTTP proxy?

Yes. The proxy URL stays http://host:port. Chromium then issues CONNECT to host:443. The lab logged CONNECT example.com:443 and received HTTP 200 with TLS verification on.

How do I pass proxy authentication?

Set username and password on the proxy object for HTTP proxies. Missing or wrong Basic auth returned HTTP 407 in Chromium 156.0.8078.4. Origin httpCredentials are not proxy credentials.

Can Chromium, Firefox, and WebKit use SOCKS5 with a username?

Playwright 1.64.0 rejected SOCKS5 authentication at launch for chromium, firefox, and webkit with Browser does not support socks5 proxy authentication. Unauthenticated socks5:// worked on Chromium in the lab.

Should I set ignoreHTTPSErrors to make a lab CA pass?

No. Untrusted local TLS failed with net::ERR_CERT_AUTHORITY_INVALID after CONNECT. Node https with the lab CA verified. ignoreHTTPSErrors stays false in this guide.

Does bypass mean the proxy is never used?

No. bypass is a host list. 127.0.0.1 listed in bypass skipped the proxy. The same origin still used the proxy when bypass was only example.com.

Does a checker or my-ip page prove the Playwright route?

No. The checker tests whether an endpoint answers. A browser my-ip page is that browser's exit. Playwright proof is the proxy CONNECT or GET log plus the page result from the Playwright process.