Skip to content
中文

Fixed-exit proxy

Available once your organization is opened for it.

Some sites (LinkedIn, BOSS Zhipin) refuse datacenter addresses, or flag an account that signs in from a different address every time. Pass proxies when creating a session and the browser runs in its own container with all web traffic leaving through the HTTP proxy you give. You can also pick the container yourself with source.type; see Choosing the backend.

Before you start

  • Your organization is opened for this capability. Until then a create request with a proxy returns 501 PROVIDER_UNSUPPORTED; sessions without a proxy are unaffected.
  • A publicly reachable HTTP proxy: host:port or http://host:port.
  • If the proxy needs a password, store it in the vault first and note the vault_id and the secret ID.

Create a session

Add proxies to the body of POST /browser/v1/sessions, with exactly one object in the array. The following is a request body, not a recorded result.

{
"proxies": [
{
"type": "external",
"server": "isp.example.net:8003",
"username": "u1",
"password_secret": { "vault_id": "vlt_1", "secret": "vsec_1" }
}
]
}
FieldRequiredMeaning
typeYesAlways external. none means no proxy.
serverYeshost:port or http://host:port; port 1-65535; every field is at most 512 characters.
usernamePaired with a passwordProxy user name.
password_secretPaired with the user name (recommended)A vault reference { "vault_id": "...", "secret": "..." }; secret is the secret ID in the vault. When the session is created the platform redeems the password from the vault for the proxy’s host.
passwordPaired with the user namePlain password, accepted only for Browserbase compatibility. It is used for this one start and is never written to the session, an event, a response, a log or an error.

Rules:

  • username and a password are given together or not at all; a proxy without authentication takes neither.
  • password and password_secret cannot be sent together.
  • Only HTTP proxies run. socks5:// and other schemes, other proxy types (including Browserbase’s own browserbase), several entries and true return 501 PROVIDER_UNSUPPORTED.
  • Omitting proxies, false or [{"type":"none"}] uses the default exit, as before.
  • Loopback, private and link-local hosts are rejected with 400 INVALID_PARAMS: localhost, *.localhost, *.internal, *.local, and the IPv4 ranges 0.*, 10.*, 127.*, 169.254.*, 172.16-31.*, 192.168.*, 100.64-127.*. IPv6 literal addresses are not accepted.
  • The password is redeemed once, at creation. If the vault denies the redemption or does not answer, the session fails; it never falls back to a direct exit and no container is started.
  • The Browserbase-compatible entry (/browserbase) takes the same proxies shape; password_secret is defined only on the own interface (/browser/v1).

Bind a default proxy to a login state

Bind a proxy to a login state (context) and any session that uses it without writing proxies goes through that proxy, so one account always leaves from one address. A session’s own proxies win.

Send proxy when creating or updating a login state. It has the shape of one proxies entry above, but accepts only password_secret; a plain password returns 400 INVALID_PARAMS. Send proxy: null on update to unbind. Only the reference is stored, never a password. While your organization is not opened for this capability, binding returns 501 PROVIDER_UNSUPPORTED, so nothing is bound that cannot run.

{
"name": "acct-1",
"proxy": {
"type": "external",
"server": "isp.example.net:8003",
"username": "u1",
"password_secret": { "vault_id": "vlt_1", "secret": "vsec_1" }
}
}

Exit address event

When the session starts, the container reads its real exit address through the proxy and the platform publishes cloudBrowser.session.egressObserved (best-effort delivery; a failed publish does not fail the session).

FieldMeaning
organizationIdOrganization that owns the session.
sessionIdSession ID.
ipExit IP observed through the proxy.
proxyHostProxy host name only; no credential, vault reference or port.

Billing

A session created with proxies runs in a container and is billed for the traffic it moves through the proxy as well as for time: the bytes the browser sends and receives, both directions added, are the session’s proxyBytes. The session is priced once when it ends, and the one usage record carries two meters: browser_ms (milliseconds) and browser_proxy_bytes (bytes). Traffic is priced: Metered by use(See the live price), with no free allowance.

A container session without a proxy is billed for traffic the same way. A Browser Run session and a bring-your-own browser (BYOB) session have no traffic charge, and their proxyBytes is always 0. While a session runs, proxyBytes is refreshed every few minutes and holds its final value once the session ends.

Relation to BYOB

proxies cannot be used with a user-owned browser (source of type byob): that browser’s exit is the user’s own network. Sending both returns 400 INVALID_PARAMS (message proxies cannot be used with a BYOB browser).

Errors

codeHTTPMeaningWhat to do
PROVIDER_UNSUPPORTED501Your organization is not opened for this capability, or the proxy type, protocol (such as socks5) or entry count is not supported.Ask us to open it; use a single external HTTP proxy.
INVALID_PARAMS400server is not a public host:port; user name and password not paired; password and password_secret sent together; password_secret missing vault_id or secret; an undefined field; used with BYOB; the vault refused to redeem that secret for this proxy host.Fix the request as the message says; confirm the secret belongs to your organization and is usable for this proxy host.
PROVIDER_FAILED502The vault did not answer; the proxy is unreachable or refused its credentials; the container could not guarantee its exit address; the container failed to start. Retryable.Check the proxy address and credentials from elsewhere, then retry.
PROVIDER_CAPACITY429The container backend is rolling out or has no capacity right now. Retryable.Retry shortly.

Next