cdpfleet Docs GitHub Dashboard

Anti-detect Firefox

Camoufox

Camoufox is a Firefox build that spoofs a complete, consistent fingerprint at the engine level. Set its identity with launch options (below) rather than with client-side newContext settings, which would fight the injected identity. A proxy is required, and by default the identity is matched to the proxy's location. POST /session is an alias for this browser.

Launch
POST https://starter.cdpfleet.com/camoufox/session
Connect
firefox.connect(wsUrl, { headers: { 'x-api-key': KEY } })
Playwright client
1.60.x
Versions now
stable152.0.4 pinned150
Required
proxy

Example

// npm install [email protected]
// Browsers run on cdpfleet, so no `npx playwright install` is needed.
import { firefox } from 'playwright';

const KEY = process.env.CDPFLEET_API_KEY;

// 1. Launch the browser
const res = await fetch('https://starter.cdpfleet.com/camoufox/session', {
  method: 'POST',
  headers: { 'x-api-key': KEY, 'content-type': 'application/json' },
  body: JSON.stringify({
    proxy: 'http://user:[email protected]:8080',
    headless: false,
  }),
});
if (!res.ok) throw new Error(`launch failed: ${res.status} ${await res.text()}`);
const { wsUrl } = await res.json();

// 2. Connect and drive it
const browser = await firefox.connect(wsUrl, { headers: { 'x-api-key': KEY } });
const page = await browser.newPage();
await page.goto('https://example.com');
console.log(await page.title());
await browser.close(); // ends the session and stops billing

Want different options or a specific version? Open this browser in the code builder.

Launch options

Send these as the JSON body of the launch request. Everything is optional except proxy; unknown fields are ignored. Context options such as viewport, user agent or cookies are set client-side after connecting (browser.newContext({...})) — but for Camoufox prefer the fingerprint options below.

OptionTypeDefaultWhat it does
proxystring | object | arraynone — required

A proxy URL (http://user:pass@host:port, https://…, socks5://user:pass@host:port; no scheme means http://), an object { "server": "http://host:port", "username": "…", "password": "…" }, or a list of proxies used round-robin as a pool. SOCKS5 with authentication works on every browser.

Required for every session: a launch without a proxy returns 400 proxy_required, so your sessions never browse from our servers' own IPs. An unparseable proxy returns 400.

Example: "http://user:[email protected]:8080"
proxy_rulesarraynone

A list of { "name": "…", "hosts": [...], "proxy": "…" | [...] } rules. Requests to a host matching a rule use that rule's proxy (round-robin when it is a list); every other host uses proxy. Host patterns support * wildcards, e.g. *.cdn.example.com or static.*. The optional name (up to 64 characters) labels the rule's traffic on your dashboard's Proxy traffic page and in its CSV export.

Needs proxy to be set as the default route. Rules route through a proxy only; routing a host with no proxy (direct from our servers) is not available. The first matching rule wins — keep rules from overlapping so traffic is attributed to the right one.

Example: [{"name":"dc-assets","hosts":["*.cloudfront.net","static.example.com"],"proxy":["http://u:[email protected]:4444","http://u:[email protected]:4444"]}]
inactivity_timeoutnumber | string60s

The timer resets on any protocol traffic in either direction. A number of seconds (90, 1.5) or a string with a unit: 500ms, 45s, 10m, 2h (digits only, no spaces or decimals). Clamped to 1 s – 24 h. An unparseable value silently falls back to the default.

A slow page load through a proxy can produce no traffic for a while, so keep it at 60 s or more. Shared threads can lower it but not raise it above 60 s; dedicated threads can set up to 24 h. Never longer than the session's overall timeout.

Example: "2m"
overall_timeoutnumber | stringyour plan's maximum session length (24 h)

A number of seconds (90, 1.5) or a string with a unit: 500ms, 45s, 10m, 2h (digits only, no spaces or decimals). Clamped to 1 s – 24 h. An unparseable value silently falls back to the default. cdpfleet also caps it at your plan's maximum session length (24 h) and, for shared threads, at your remaining daily minutes.

Example: "30m"
headlessboolean | "virtual"false (headful, on a virtual display)

Any truthy value runs headless — including the strings "false" and "0", so send a real boolean. false, "virtual" or omitting it runs headful on a virtual display, which Camoufox recommends for stealth (billed as 2 threads; headless is 1).

Example: false
versionstringnone (latest stable)

Request a retained previous major, e.g. "152". The majors available right now are listed on the browser's page. A major the fleet doesn't have returns 503 {"error": "version_unavailable", "available": [...]} rather than silently running a different version.

Previous majors rotate out automatically: Chrome keeps its two most recent previous majors and drops the oldest within about a day of a new stable release; Camoufox keeps recent majors plus long-term ones. Read the live list rather than hard-coding a number. Send either version or a pre-release channel, not both: together they return 400 (channel: "stable" with a version is fine).

Example: "152"
os"windows" | "macos" | "linux" | arrayrandom among windows / macos / linux

The OS the spoofed fingerprint claims to run on. A list picks one at random per session.

Required when webgl_config is set. Any other value returns 400.

Example: "windows"
localestring | arrayderived from the proxy's exit IP

The first locale drives navigator.language and the Intl API, e.g. "en-US", or a list / comma-separated string of several. Leave it unset to match the proxy's country automatically (with geoip).

An unknown locale fails the launch.

Example: "en-US"
geoipbooleantrue

At launch the browser looks up its public IP through your proxy and aligns its identity with that location. Set false to skip the lookup (faster start, but the location won't match the IP).

If the proxy can't reach the IP lookup services, the launch fails.

Example: false
humanizeboolean | numbertrue

Moves the cursor along natural paths. A number sets the maximum movement duration in seconds. Set false to disable.

Example: 1.5
block_imagesbooleanfalse

Saves bandwidth and time on image-heavy pages.

Blocked images are themselves a detectable signal.

Example: true
block_webrtcbooleanfalse

When left enabled (with geoip on), WebRTC reports the proxy's exit IP instead of the real one.

Example: true
block_webglbooleanfalse

Turns WebGL off. Overrides webgl_config.

A missing WebGL is itself a fingerprint signal.

Example: false
disable_coopbooleanfalse

Lets you click elements inside cross-origin iframes, such as some CAPTCHA widgets.

Detectable.

Example: true
screenobjectnone

Bounds for the generated screen: { "minWidth", "maxWidth", "minHeight", "maxHeight" } in pixels.

Ignored when fingerprint is given.

Example: {"minWidth":1280,"maxWidth":1920,"minHeight":720,"maxHeight":1080}
window[width, height]random

Use this window size instead of a random one, e.g. [1280, 720].

Ignored when fingerprint is given.

Example: [1280,720]
fingerprintobjectgenerated

Supply a full Firefox fingerprint object instead of a generated one. It must include navigator.userAgent for Firefox. For targeted changes, prefer config.

A non-Firefox fingerprint returns 400.

Example: {"navigator":{"userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:135.0) Gecko/20100101 Firefox/135.0"},"screen":{}}
configobjectnone

A map of Camoufox fingerprint properties to values, e.g. navigator.userAgent, navigator.hardwareConcurrency, navigator.maxTouchPoints, screen.width, timezone, webGl:vendor. Your values win over generated ones. Use this — not client-side newContext options — to change the user agent.

Strictly validated: an unknown property (e.g. Chromium-only navigator.deviceMemory) or a wrong value type returns 400. Keep overrides consistent with os (for example, touch points stay 0 on a desktop OS).

Example: {"navigator.hardwareConcurrency":8,"navigator.maxTouchPoints":0}
fontsarraythe target OS's fonts

Font family names to expose in addition to the OS defaults.

Example: ["Arial","Helvetica"]
custom_fonts_onlybooleanfalse

Drop the target OS's default font list and expose only the families listed in fonts.

Requires fonts.

Example: true
webgl_config[vendor, renderer]generated

Pick a WebGL identity from Camoufox's database, e.g. ["Intel", "Intel(R) HD Graphics, or similar"].

Requires os, and the pair must be valid for that OS or the launch fails. Ignored with block_webgl.

Example: ["Intel","Intel(R) HD Graphics, or similar"]
ff_versionnumberthe real Firefox major

Changes the version the fingerprint reports (user agent etc.), not the actual browser build. To run an older build, use version.

A reported version that differs from the real engine is detectable.

Example: 135
main_world_evalbooleanfalse

Enables page.evaluate("mw:" + script) to run in the page's own JavaScript world instead of an isolated one.

Main-world scripts are visible to the page.

Example: true