Route traffic through a proxy
set_proxySet the browser to route traffic through a specific proxy, with optional username/password for authentication, and restart to apply the change.
Instructions
Send this browser's traffic through a proxy, with credentials if it wants them.
The proxy itself is a launch flag, so it needs a browser restart — which on an ephemeral profile also drops its cookies. Authentication is handled live: an authenticating proxy stops Chrome at a native dialog that no page and no other CDP command can dismiss, so the page just never loads and nothing says why.
Answering it means enabling the Fetch domain, which pauses every request for a round trip, so that only happens when a username is actually set. A proxy that does not ask for credentials costs nothing extra.
Call with no arguments to see what is configured. The password is never echoed back. Values set here override the NODRIVER_PROXY environment variable.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bypass | No | Hosts to reach directly, Chrome's own syntax, e.g. "localhost;127.0.0.1;*.internal". Empty string sends everything through the proxy. | |
| server | No | Proxy to route through, e.g. "http://198.51.100.7:8080" or "socks5://198.51.100.7:1080". A bare "host:port" is treated as http. Pass "" to remove the proxy; omit it to leave the current one alone. | |
| browser | No | Which browser to act on. Each name is an independent Chrome, created on first use. Omit for the shared default; parallel agents each need their own name. | default |
| restart | No | Restart Chrome now so the proxy takes effect, closing all open pages. Default true; false defers it to the next browser start. | |
| password | No | Password that goes with `username`. | |
| username | No | Username, for a proxy that demands authentication. Chrome ignores credentials embedded in the proxy URL, so they have to be given here. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |