# Set up proxies in Playwright, Puppeteer, and Selenium

Selecting the proxy and authentication gateways by automation tool, distinguishing between dynamic accounts, static instances and Selenium access restrictions.

The browser automated proxy configuration is controlled by the execution process, and a successful setup in the ordinary browser does not mean that the script has been used. The following lists the methods of access and authentication by tool.

## Step 1: Get ZZHTTP Proxy Information

- ** Rotating residential proxies **: Go to "Rotating Residential → Proxy setup → Endpoint generator", get `us.zzhttp.com` Port `7878`(a) the full generated agent username and password for the corresponding sub-account. The protocol is selected by tool, HTTP or SOCKS5 TCP. First, confirm the real name, interests, shared traffic, and sub-account status.
- **Static residential proxies**: Go to "Static residential proxies Network → IP Management" and copy the actual IP, port and independent agent accounts of delivered, available and unexpired instances. Static purchases do not require identity verification and do not use dynamic gateways, sub-accounts or customer IP allowlists.

See the detailed steps for access.[Username & password](/en/help/network/account-auth) and [First connection of static residential](/en/help/getting-started/static-residential-quickstart). The proxy password is not the console login password.

## Step 2: Configuring proxies and authentication by tool

| Tools | Endpoint entrance | Authentication access and precautions |
| --- | --- | --- |
| Playwright | When you start the browser or create a context `proxy.server` | HTTP `proxy.username`, `proxy.password`; See for details.[Existing examples](/en/developers/examples/playwright) |
| Puppeteer | Launch argument `--proxy-server=http://HOST:PORT` | Call `page.authenticate({username, password})` before navigating. Pass credentials through this method. |
| Selenium + Chromium | Browser proxy capability or `--proxy-server` Set endpoints only | The general proxy endpoints configuration does not automatically resolve username and password authentication. Existing instances use dynamic API extraction with source whitelisting, not directly for static instances |

The HTTP accounts for Playwright and Puppeteer are filled with either dynamic full username/subaccount passwords or static instance-independent credentials. Chromium's SOCKS5 username password authentication restriction does not disappear with the use of the automated framework, and HTTP accounts are preferred.

Selenium static users must first select and validate a driver access scheme that supports HTTP proxy authentication. Without authentication processing, it is not possible to complete the configuration by port alone. You can first authenticate the instance using Playwright's HTTP accounting method.[Selenium Existing Examples](/en/developers/examples/selenium) Belongs to the dynamic API extract process, which does not allow static users to create dynamic whitelists.

## Step Three: Save the configuration and start the task

1. Inject endpoints and credentials from private configurations at runtime, not write to the code store or output log.
2. Complete proxy and authentication setup before sending the first request. Playwright creates a new browser or context after modifying the proxy. Puppeteer completes authentication before page navigation.
3. Each task explicitly uses the corresponding context/user data directory, limits concurrency, and closes pages and processes at completion. Multiple contexts using the same instance do not automatically get different IPs.

## Step 4: Verify exports

Run the smallest task with only the detection page first, read `https://ipinfo.io/json` The response to the 2008-2009 budget was positive. The detection must occur in the context of the newly started automation, without using the terminal direct result to replace the browser result.

## Verify that the proxy is valid

From the environment that runs the task, open `https://ipinfo.io/json`. Compare `ip`, `country`, and `region` with the results from the same environment before enabling the proxy. For rotating proxies, the gateway and exit IP are separate. For static proxies, compare the detected exit IP with the one assigned to your instance. Geolocation databases may disagree. Then open an HTTPS page you are authorized to test to confirm the connection.

## Frequently Asked Questions

- **Connection failed or timeout**: Check endpoints, ports, protocols and execution environment networks, see [Connection Failure Debug](/en/help/troubleshooting/connection-failed).
- **Authentication failed**: dynamic check of full user name, sub-account number, interest and actual connection source. The current credentials and validity periods of static check instances cannot be resolved by filling dynamic whitelists. See [407 Not Found](/en/help/troubleshooting/proxy-auth-407).
- **Still show original export**: Confirms that the agent is bound to the actual device or task, excluding bypass lists, other agent overrides, and legacy configurations.
- **Successful detection but target failure**: If the target returns `403` or `429`, check its response separately from the proxy connection. Reduce concurrency and review the target site’s limits before retrying.

Static instances are used when the same export needs to be maintained over a long period of time. Dynamics [Sticky sessions](/en/help/network/sticky-session) Only maintained for the configured session cycle and not equivalent to a permanent fixed IP. Multiple devices using the same instance can still share exports. Do not expose full credentials in screenshots, logs, and task exports.

Authentication entry reference [Playwright Official HTTP Proxy Notes](https://playwright.dev/docs/network#http-proxy) and [Puppeteer authenticate documentation](https://pptr.dev/api/puppeteer.page.authenticate).
