Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

Use the proxy at the browser session’s control point, not as a page-level setting. With a hosted service such as Browserless, pass an authenticated proxy in the connection URL with externalProxyServer. With native Playwright, set proxy on browser.newContext(). With CDP, put the proxy in the launch URL and use the default context when you need that launch setting. In a self-hosted Browserless container, pass Chromium’s --proxy-server flag for each session.

The correct scope matters: a proxy configured for one context does not automatically apply to another, and a proxy used by your local machine to download or launch a browser is different from the proxy used for pages inside that browser.

Choose the proxy and configuration scope first

Decide what traffic must leave through the proxy, what location you need, and whether the setting should apply to one context or the entire browser session.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Requirement Setting What to expect
Use the host machine’s normal public IP Omit the proxy setting The browser connects directly from the Browserless host or your own server.
Use a third-party proxy with Browserless Cloud externalProxyServer=http(s)://[username:password@]host:port Browserless routes page traffic through the supplied proxy. Browserless documents this for paid cloud-unit plans; free plans reject third-party proxy use with HTTP 401.
Set different proxies for separate Playwright contexts Native Playwright browser.newContext({ proxy: ... }) Each context can have its own proxy credentials and server.
Apply one launch proxy in CDP mode Connection query parameter or Chromium launch flag Use the default CDP context. A newly created context may not inherit launch-level proxy settings.
Route through a residential network Browserless residential routing Browserless lists 6 units/MB in its current documentation and describes residential traffic as harder to detect.
Route through a datacenter network Browserless datacenter routing Browserless lists 2 units/MB and says datacenter traffic is more easily detected.
Keep the same proxy IP where possible proxySticky=true Browserless normally chooses a random proxy node for REST and WebSocket requests; sticky mode asks it to keep the same IP where possible.
Target a country or city proxyCountry and proxyCity Country values use ISO codes. City targeting requires a Scale plan with at least 500,000 units according to Browserless documentation.
Match browser language to proxy location proxyLocaleMatch=true Browserless aligns language and formatting with the proxy location.

Residential, datacenter, sticky, country, city and locale options are provider controls, not universal proxy standards. Check the plan and network policy that apply to your Browserless account.

Browserless Cloud: pass an authenticated proxy in the connection URL

Browserless documents externalProxyServer as an external proxy URL. Put the complete URL in the WebSocket query string and percent-encode credentials before inserting them.

Connection URL

wss://production-sfo.browserless.io?token=YOUR_TOKEN&externalProxyServer=http%3A%2F%2Fuser%3Apass%40proxy.example.com%3A8080

The decoded proxy value is http://user:pass@proxy.example.com:8080. Encode reserved characters in usernames and passwords: an @ becomes %40, a colon becomes %3A, and a slash becomes %2F. Do not paste an unencoded password containing @, :, ? or # into a URL.

Keep the token and proxy credentials in environment variables or a secret manager. Avoid logging the final WebSocket URL, because it contains both credentials and your Browserless token. Browserless states that free plans reject third-party proxy use with a 401 response; use a paid cloud-unit plan for this feature.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Adding location and session options

When your Browserless plan supports them, append options such as proxyCountry=DE, proxyCity=berlin, proxySticky=true and proxyLocaleMatch=true to the same connection URL. URL-encode any value that contains spaces or reserved characters. City-level routing has the documented Scale-plan requirement of 500,000 or more units.

Playwright: choose native context proxy or CDP launch proxy

Native Playwright connection with a context-level proxy

Native Playwright is the right model when you need multiple independent contexts with different egress settings. Set the proxy when creating each context:

import { chromium } from 'playwright-core';

const browser = await chromium.connect(PLAYWRIGHT_WS_ENDPOINT);
const context = await browser.newContext({
  proxy: {
    server: 'http://proxy.example.com:8080',
    username: 'username',
    password: 'password'
  }
});
const page = await context.newPage();
await page.goto('https://example.com', { waitUntil: 'networkidle' });
console.log(await page.title());
await browser.close();

The server value includes the scheme and port. Keep credentials in environment variables in real code. A context created without the proxy object uses the default network path; it does not inherit another context’s proxy.

Playwright over CDP

CDP is Chromium-only and exposes one default context carrying launch-level settings. If the proxy is in the Browserless connection URL, use that default context:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
import { chromium } from 'playwright-core';

const browser = await chromium.connectOverCDP(
  'wss://production-sfo.browserless.io?token=YOUR_TOKEN&externalProxyServer=http%3A%2F%2Fuser%3Apass%40proxy.example.com%3A8080'
);
const context = browser.contexts()[0];
const page = await context.newPage();
await page.goto('https://example.com', { waitUntil: 'networkidle' });
console.log(await page.title());
await browser.close();

Browserless’s feature matrix distinguishes the two modes: context proxy configuration is supported for native Playwright connections, while query-parameter proxying works in both modes. In CDP mode, a newly created context may bypass launch-level proxy settings, so browser.contexts()[0] is the safe choice when you configured the proxy in the launch URL.

Puppeteer: configure the connection, not the page

For Puppeteer, include the external proxy in the Browserless connection URL or provide Chromium’s proxy launch argument in a self-hosted deployment.

Rank #2
import puppeteer from 'puppeteer-core';

const browser = await puppeteer.connect({
  browserWSEndpoint:
    'wss://production-sfo.browserless.io?token=YOUR_TOKEN&externalProxyServer=http%3A%2F%2Fuser%3Apass%40proxy.example.com%3A8080'
});
const page = await browser.newPage();
await page.goto('https://example.com', { waitUntil: 'networkidle2' });
console.log(await page.title());
await browser.close();

Puppeteer’s official configuration guidance also documents HTTP_PROXY, HTTPS_PROXY and NO_PROXY for downloading and running the browser. Those environment variables are not a substitute for a page-session proxy, and puppeteer-core ignores Puppeteer configuration files and environment variables. Configure the connection or launch arguments explicitly when using puppeteer-core.

Self-hosted Browserless Docker: pass Chromium’s proxy flag

The open-source Browserless deployment does not bundle a proxy server. Supply your own proxy and pass Chromium’s --proxy-server flag for the session.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
const browser = await puppeteer.connect({
  browserWSEndpoint:
    'ws://localhost:3000?token=YOUR_TOKEN&--proxy-server=http://proxy.example.com:8080'
});

const page = await browser.newPage();
await page.goto('https://example.com', { waitUntil: 'networkidle2' });
await browser.close();

The same --proxy-server query pattern is available when connecting to a self-hosted Browserless instance with Playwright over CDP. If the proxy itself requires authentication, use a proxy URL format your Chromium build accepts, or handle authentication in the browser session according to your proxy provider’s instructions. Do not add arbitrary Chromium flags casually: Playwright warns that unsupported custom arguments can break browser functionality.

Verify that requests really use the proxy

  1. Start a session with the proxy configured and open an IP-inspection page from inside that browser.
  2. Record the reported public IP, country and city. Compare them with the proxy provider’s assigned endpoint, not with the IP of your laptop.
  3. Only after the egress check succeeds, navigate to the target site. This separates proxy failures from target-site blocks.
  4. Test an authenticated target and a normal public target. A proxy can be reachable while its credentials are rejected by a particular site.
  5. Run the same check in every context you create. A context-level proxy and a launch-level proxy have different inheritance rules.

Use a real page navigation for the check; inspecting a local variable or the WebSocket URL cannot prove where page traffic exits.

Credential, geography and session design

Keep credentials out of URLs when possible

Connection URLs are convenient but easy to leak through debug logs, exception messages, CI output and browser telemetry. Prefer secret variables, construct the URL at runtime, and redact it before logging. If a proxy password changes, rotate it without changing application code.

Choose residential or datacenter routing deliberately

Browserless describes residential routing as harder to detect but prices it at 6 units per MB in its current documentation. Datacenter routing is listed at 2 units per MB and is more easily detected. These are Browserless provider figures, not an independent performance or block-rate study. Use datacenter routing for ordinary automation when its reputation is acceptable; reserve residential capacity for targets that require it and budget for the higher unit rate.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Stability versus rotation

Random proxy nodes can distribute requests but may change the apparent IP between navigations. Set proxySticky=true when a workflow benefits from a stable address, such as a multi-step login or checkout. Sticky routing is best-effort (“keep the same IP where possible”), so design your workflow to tolerate a change.

Locale consistency

Country-level egress without matching browser language, number formatting and timezone can look inconsistent to a target. Browserless’s proxyLocaleMatch option aligns language and formatting with the proxy location. Treat this as a coherence aid, not a guarantee that a site will accept the session.

Troubleshooting common failures

401 when using an external proxy

Cause: Browserless documents third-party proxy use as a paid cloud-unit feature, and free plans reject it.

Fix: Confirm the account plan, token and URL spelling. If the plan is eligible, inspect the response without printing the full credential-bearing URL.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Proxy URL is rejected or the browser cannot connect

Cause: Missing scheme, wrong port, malformed credentials or unencoded reserved characters.

Fix: Validate the URL as http://host:port or http://username:password@host:port, percent-encode credentials, and test the proxy independently before adding Browserless.

One Playwright context uses the proxy and another does not

Cause: Proxy settings are context-scoped in native Playwright.

Fix: Pass the proxy object to every context that needs it, or centralize context creation in a helper that applies the setting consistently.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

CDP context ignores the launch proxy

Cause: A newly created CDP context may not inherit launch-level settings.

Fix: Use browser.contexts()[0] for the default context, or switch to a native Playwright connection when you require independently configured contexts.

Proxy works for one site but not another

Cause: The destination may block the proxy ASN, require a different location, or reject the proxy’s authentication method.

Fix: Verify egress first, try the required country or network type, and inspect the target’s response separately from the browser connection.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Environment variables appear to do nothing

Cause: puppeteer-core ignores Puppeteer configuration files and environment variables.

Fix: Put the proxy in the Browserless endpoint or Chromium launch arguments. Use HTTP_PROXY, HTTPS_PROXY and NO_PROXY only for the tooling and browser-download behavior they are intended to control.

Custom flags cause unstable sessions

Cause: Unsupported Chromium arguments can conflict with Playwright or Browserless.

Fix: Remove nonessential flags, reproduce with only the documented proxy argument, and add options back one at a time.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Performance, reliability and cost considerations

Proxy traffic adds a network hop. Measure navigation time, DNS/TLS failures, redirects and response sizes from the same region and target you automate; do not assume that a faster browser host is faster through a distant proxy. Reuse a browser connection when your workload permits, but isolate workflows that require different proxy identities into separate contexts or sessions.

Budget by transferred data when using Browserless proxy routing. The provider’s current documentation lists 6 units per MB for residential routing and 2 units per MB for datacenter routing. Large images, video, repeated retries and full-page applications consume more data than a small HTML request. Block unnecessary resource types only when the target workflow allows it, and retain enough assets for the page behavior you must test.

For reliability, set explicit navigation and overall job timeouts, retry only transient connection failures, and avoid retrying authentication errors with the same credentials. Log a request identifier, selected country or city, context mode and outcome, but never the proxy password or complete token-bearing URL.

Or skip the browser setup

If your actual requirement is a clean website screenshot or PDF rather than interactive browser automation, ScreenshotNeo is the first screenshot API to try: it removes consent banners, newsletter popups and chat widgets before capture, bills only clean shots, and has the lowest paid entry plan.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

ScreenshotNeo is a website screenshot API and MCP server. One GET request returns PNG, JPEG, WebP or PDF, while options cover full-page capture with lazy images loaded, CSS-selector element capture, dark mode, device presets or custom viewports, retina scale, PDF paper size and margins, custom CSS and JavaScript, pre-capture clicks, hidden selectors, selector or delay waits, network-idle waits, request and resource blocking, custom headers and cookies, user agents, Authorization, timezone and geolocation, transparent backgrounds, resizing, configurable caching, signed image links, asynchronous webhooks, bulk capture of up to 100 URLs per call and a usage API. It also provides an MCP server with take_screenshot, get_page_info and capture_pdf for Claude, Cursor and other MCP clients.

Clean shots are the only billed requests. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads and cache hits cost nothing, and each response identifies the result with X-Page-Verdict and X-Billed headers.

cURL

See the ScreenshotNeo documentation for all parameters.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

Python

import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)

Node.js

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

Every feature is included on every plan: Free provides 1,000 screenshots per month with no card, Starter is $5 for 3,000, Growth $15 for 15,000, Pro $39 for 60,000, Scale $99 for 250,000, and Business $249 for 1,000,000. Yearly billing gives two months free. An MCP server lets AI agents take screenshots without you wiring a browser connection. Sign up for the free plan with 1,000 screenshots a month and no card.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.