October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk5 min

Browser Proxy Setup: Fix Traffic Routing in Selenium, Playwright, Puppeteer

A practical guide to proxy scope, protocols, credentials, bypass rules, browser downloads, and troubleshooting in Selenium, Puppeteer, and Playwright.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To send automated page traffic through a proxy, configure the proxy where the browser or browser context is created; do not confuse that with proxy settings used only to download browser binaries. Selenium 4 exposes proxy settings through browser options, Playwright supports browser-wide and context-level proxies, and Puppeteer’s documented proxy environment variables cover browser download and running configuration but are not a complete runtime recipe for every setup.

First distinguish browser traffic from browser downloads

A proxy can serve two different jobs in an automation project. A runtime proxy routes requests made by pages in the launched browser. A download proxy helps the framework fetch its browser binary during installation. A setting that fixes one path does not necessarily configure the other.

As an Amazon Associate I earn from qualifying purchases.

This distinction matters most when diagnosing failures: if the browser cannot be installed, investigate the framework’s download settings; if the browser launches but a page cannot reach its target, investigate the runtime proxy and the browser’s network configuration.

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

Configure a proxy in Selenium 4

Selenium’s WebDriver options documentation says Selenium 4 uses browser options classes, and a remote session’s options instance determines which browser is used. Its example creates a Proxy, assigns an HTTP proxy address in HOST:PORT form, and adds it to ChromeOptions as the proxy capability. Follow the same options-based pattern for the browser and language binding you actually use; exact behavior depends on the selected driver and its supported capabilities. Selenium WebDriver options documentation.

#1 Best Overall
Master Vpn - Free Unlimited VPN Proxy Server
  • Unlimited bandwidth, unlimited data.
  • Super-fast VPN and one tap connect.
  • Free worldwide multiple servers.
  • Works with all type of data carries. (Wi-Fi, 4G, LTE, 3G).
  • No registration, sign up needed.
Proxy proxy = new Proxy();
proxy.setHttpProxy("proxy.example.net:8080");

ChromeOptions options = new ChromeOptions();
options.setCapability("proxy", proxy);

WebDriver driver = new ChromeDriver(options);

The hostname and port above are illustrative, not a working proxy endpoint. Selenium’s documentation identifies use cases including capturing network traffic, mocking backend calls made by a website, and reaching a site through complex network topology or strict corporate network policies. Treat those as testing and authorized-access scenarios, and confirm that the chosen driver supports the proxy capability you need.

Configure a proxy in Playwright

Playwright documents HTTP, HTTPS, and SOCKSv5 proxy support. You can apply a proxy to the browser or to an individual browser context. Use browser-wide configuration when all contexts should share one proxy policy; use context-level configuration when separate test contexts need distinct settings. Context-level configuration is supplied when creating the context, rather than retroactively changing an already-created one. For HTTP(S), Playwright documents optional username/password credentials and bypass hosts. Playwright network documentation.

Browser-wide configuration

const browser = await chromium.launch({
  proxy: {
    server: 'http://proxy.example.net:8080',
    username: 'user',
    password: 'password',
    bypass: '.internal.example.net'
  }
});

Context-level configuration

const context = await browser.newContext({
  proxy: {
    server: 'socks5://proxy.example.net:1080'
  }
});

The addresses and credentials are examples only. Use the protocol and authentication scheme supplied by your network administrator or proxy service, and avoid committing real credentials to source control.

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

Configure Puppeteer carefully

Puppeteer’s configuration guide documents HTTP_PROXY, HTTPS_PROXY, and NO_PROXY as environment-only configuration for downloading and running the browser. It also says configuration files and environment variables are ignored by puppeteer-core. For browser downloads through a proxy, the guide specifies the optional proxy-agent peer dependency. These notes should not be mistaken for a complete, universal recipe for routing every page request through a proxy; runtime behavior depends on how Puppeteer launches Chrome and the configuration used for that browser. Puppeteer configuration documentation.

For example, environment variables can be set for a process that uses the full Puppeteer package:

HTTPS_PROXY=http://proxy.example.net:8080 
HTTP_PROXY=http://proxy.example.net:8080 
NO_PROXY=localhost,127.0.0.1 
node app.js

This illustrates the documented variable names, not a guarantee that a specific runtime proxy will be applied in every Puppeteer/Chrome arrangement. If you use puppeteer-core, its documentation says these Puppeteer configuration and environment settings are ignored; configure the browser through the appropriate launch mechanism for your environment instead. Puppeteer normally downloads and uses a specific Chrome version; its guide says a different Chrome or Chromium binary can be selected with executablePath.

Rank #4
Super VIP VPN - Vpn Super Free Proxy Servers
  • Super VIP VPN Free is really easy to use no login required, protect your data and give unlimited servers that connect by one click show you anonymous gives access to unblock different sites, it gives good service with good speed.

Proxy settings for browser installation

Install-time network access is separate from page traffic. Playwright downloads browsers from Microsoft’s CDN by default. Its browser installation guide documents HTTPS_PROXY for installing behind a corporate proxy. If TLS interception causes a self-signed certificate-chain error, the guide describes setting NODE_EXTRA_CA_CERTS to the custom root certificate before installation. For slow downloads, it documents PLAYWRIGHT_DOWNLOAD_CONNECTION_TIMEOUT to increase the connection timeout. Playwright browser installation documentation.

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

For Puppeteer, the configuration guide documents the proxy environment variables and the optional proxy-agent peer dependency for browser downloads. Do not assume that adding an install-time proxy also routes pages after launch.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Compare the integration points

Framework Runtime configuration scope Protocol and controls stated in the docs Browser download considerations
Selenium 4 Proxy capability set through a browser options class; behavior can depend on browser driver support. The options page demonstrates an HTTP proxy address. Identical protocol features across drivers are not established by that page. The cited options documentation concerns WebDriver options; it does not establish a browser-download proxy procedure.
Playwright Browser-wide or per browser context. HTTP(S) and SOCKSv5; optional username/password for HTTP(S), plus bypass hosts. HTTPS_PROXY for installation; NODE_EXTRA_CA_CERTS for intercepted certificate chains and PLAYWRIGHT_DOWNLOAD_CONNECTION_TIMEOUT for a longer download connection timeout.
Puppeteer The configuration guide lists HTTP_PROXY, HTTPS_PROXY, and NO_PROXY for downloading and running the browser, but it is not a complete runtime recipe for every setup. The cited configuration guide does not specify a universal runtime protocol, authentication, or bypass-control recipe. The optional proxy-agent peer dependency is required for browser downloads through a proxy. puppeteer-core ignores Puppeteer configuration and environment variables.

Troubleshoot by failure point

  1. Identify which network request fails. If installation cannot fetch a browser, use the framework’s browser-download guidance. If the browser launches but a page fails, inspect runtime proxy configuration.
  2. Check the proxy endpoint. Verify the hostname, port, and scheme with the network administrator or service documentation. Do not copy a download proxy setting into runtime configuration unless that is the intended route.
  3. Check scope. In Playwright, confirm whether the proxy is browser-wide or belongs to the context being used. In Selenium, check that proxy capability is on the options instance passed to the session and supported by that driver.
  4. Check credentials and bypass rules. Playwright’s documented HTTP(S) settings can include credentials and bypass hosts. Confirm that the target host is not unintentionally excluded and that the credential format matches the proxy’s requirements.
  5. Check TLS interception during installation. If a Playwright browser download reports a self-signed certificate-chain error behind corporate inspection, configure the trusted root with NODE_EXTRA_CA_CERTS as its browser installation documentation describes.
  6. Check Puppeteer package choice. If using puppeteer-core, do not expect Puppeteer configuration files or environment variables to be read. For a proxy download, ensure the documented optional proxy-agent dependency is present.

Use proxies within authorized test boundaries

Choose configuration based on the test objective: corporate-network access, traffic inspection or backend mocking, or validation from an approved network location. Confirm that the target site, test account, and network policy permit the traffic. The framework documentation establishes configuration mechanisms, not a guarantee that a proxy will make a site reachable or that a particular network location is available.

Quick Recap

Bestseller No. 1
Master Vpn - Free Unlimited VPN Proxy Server
Master Vpn - Free Unlimited VPN Proxy Server
Unlimited bandwidth, unlimited data.; Super-fast VPN and one tap connect.; Free worldwide multiple servers.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

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

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.