Proxies
Every session requires a proxy — cdpfleet never browses from its own IPs. Set it at launch; it applies to all of the browser's traffic. A launch without one returns 400 proxy_required.
Formats
"proxy": "http://user:pass@host:8080" // HTTP or HTTPS proxy
"proxy": "socks5://user:pass@host:1080" // SOCKS5, with or without auth
"proxy": "host:8080" // no scheme = http://
"proxy": { "server": "http://host:8080", "username": "user", "password": "pass" }
SOCKS5 — including authenticated SOCKS5 — works on every browser.
Pools
Pass a list and requests are spread across it round-robin:
"proxy": ["http://u:[email protected]:8080", "http://u:[email protected]:8080", "socks5://u:[email protected]:1080"]
Per-host rules
Route specific destination hosts through specific proxies with proxy_rules; everything else uses proxy. Hosts support * wildcards. Rules are a good way to send heavy static assets through a cheaper pool:
{
"proxy": "http://u:[email protected]:8080",
"proxy_rules": [
{
"hosts": [
"*.cloudfront.net",
"static.*"
],
"proxy": [
"http://u:[email protected]:4444",
"http://u:[email protected]:4444"
]
},
{
"hosts": [
"api.example.com"
],
"proxy": "http://u:[email protected]:8080"
}
]
}
A few IP-lookup services — api.ipify.org, checkip.amazonaws.com, ipinfo.io, icanhazip.com, ifconfig.co, ipecho.net — always go through the default proxy when rules are set (Camoufox uses them to match its location), so a rule can't redirect them. To check a rule's exit IP, use another echo service, e.g. https://ident.me.
Swapping the proxy live
You can change a running session's proxy without restarting the browser — handy for rotating IPs mid-session. Every session is swappable — no launch option needed. Send the new configuration to the same host as your wsUrl:
POST https://router01.cdpfleet.com/admin/session/proxy
x-api-key: cdpf_...
content-type: application/json
{ "session_id": "46903d7c-…", "proxy": "http://u:[email protected]:8080" }
- The update replaces the whole route. Always send both
proxyand the completeproxy_rulesyou want; sending onlyproxydrops your rules. - New connections use the new proxy immediately; already-open connections finish on the old one.
- Responses:
200updated ·404no such session of yours ·409the session wasn't launched as swappable ·403your plan doesn't include live swap. - Use the host of the session's
wsUrl(for examplerouter01.cdpfleet.com).
Node.js example
const host = new URL(wsUrl).host; // e.g. router01.cdpfleet.com
const r = await fetch(`https://${host}/admin/session/proxy`, {
method: 'POST',
headers: { 'x-api-key': KEY, 'content-type': 'application/json' },
body: JSON.stringify({ session_id: sessionId, proxy: 'http://u:[email protected]:8080' }),
});
if (!r.ok) throw new Error(`swap failed: ${r.status} ${await r.text()}`);
The swap applies to new connections; see the live proxy swap case for moving open ones over. Get the full launch code in the code builder.