WebX Docs
← Catalog Raw Markdown Open console

WebX Managed Proxies

WebX can lease an upstream proxy for a session by geography instead of the caller supplying credentials — and, uniquely, records the observed exit country so the session receipt proves where the browser actually egressed, not merely where it was asked to.

What it adds over an external proxy

WebX already accepts an external --proxy-server and answers authenticated 407 challenges. The managed layer adds, on top of that:

Credentials live only in the pool config (a secret) and the leased launch args — never in logs, session metadata, or the receipt (which exposes a hashed leaseHash, never the username/password).

Enabling it

Managed proxies are opt-in and advertised only when a pool is configured; otherwise a managed request fails honestly (400 managed_proxy_unavailable).

Env varPurpose
WEBX_PROXY_POOLInline JSON array of pool entries (legacy static pool).
WEBX_PROXY_POOL_FILEPath to the same JSON (legacy static pool).
WEBX_PROXY_INVENTORY_FILEOperator-managed JSON inventory file that can refresh without restart.
WEBX_PROXY_INVENTORY_URLSComma-separated signed HTTPS inventory endpoints.
WEBX_PROXY_INVENTORY_SIGNING_SECRETHMAC secret used to verify signed HTTPS inventory payloads.
WEBX_PROXY_GEO_CHECK_URLIP-geo endpoint used to verify the observed exit country (e.g. https://ipinfo.io/json). Unset → observedCountry is honestly null.

A pool/inventory entry:

[
  {
    "server": "http://gateway.vendor:8080",
    "username": "u", "password": "p",
    "country": "US", "state": "CA", "city": "SAN_FRANCISCO",
    "provider": "vendor-a",
    "pool": "residential-login",
    "region": "us-east-1",
    "healthCheckUrl": "https://inventory.vendor.example/health",
    "credentialVersion": "2026-08-03"
  }
]

Requesting a managed proxy

Use the Browserbase-compatible proxies field on session create. true leases any managed egress; an object selects a geography:

// POST /v1/sessions
{
  "proxies": [
    {
      "type": "webx",
      "geolocation": { "country": "US", "state": "CA", "city": "SAN_FRANCISCO" },
      "rotation": "per_session",   // per_session (default) | per_request | on_failure
      "stickyKey": "login-flow-7"  // optional: stable egress for this caller
    }
  ]
}

An external proxy is still supported and applied verbatim:

{ "proxies": [{ "type": "external", "server": "http://host:8080",
                "username": "u", "password": "p" }] }

The proxy receipt

The create/get response carries a proxy object (present only for a managed lease):

{
  "proxyBytes": 148223,
  "proxy": {
    "provider": "vendor-a",
    "requestedGeo": "US-CA",
    "observedCountry": "US",   // verified THROUGH the proxy; null if unverified
    "leaseHash": "1654bddb4ea2f043",
    "bytes": 148223,
    "rotations": 0,
    "rotationPolicy": "per_session"
  }
}

observedCountry is the evidence: WebX fetched an IP-geo endpoint through the leased proxy and recorded the real exit country. It is never fabricated — a failed or unconfigured check leaves it null rather than echoing the request.

Behavior & limits (MVP)

Session identity coherence

Browser fingerprint, managed lease, geography, DNS mode, and persistence policy compose into a single SessionIdentity (WEBX_IDENTITY_POLICY=permissive|coherent|strict). Default is permissive (backward compatible). Coherent/strict fail closed on high-value contradictions (timezone vs country, mobile proxy + desktop UA, context country jumps, Chrome major vs Browser.getVersion when observed). Persistent contexts store a secret-free webx-network-identity.json so reuse rebinds a compatible network family beside cookies.