Camoufox: C++ Anti-Detect Firefox for Scraping
When building web automation pipelines, QA scrapers, or AI browser agents, standard JavaScript property overrides and CDP-driven Chromium browsers are quickly flagged by modern anti-bot defensesโwhether through modified toString() descriptors, mismatched worker/iframe fingerprints, leaked automation bindings, or artificial canvas noise.
With over 13,400 GitHub stars under the MPL-2.0 license, daijro/camoufox takes a fundamentally deeper approach: it patches Firefox directly in C++, pairs it with Playwright over an isolated Juggler world, and generates coherent real-world device identities so pages see stock-native Firefox behavior.
๐ Architecture & Core Capabilities
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Camoufox Architecture Flow โ
โโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโค
โ Python / TS SDK โ Coherent Identityโ Patched Firefox โ Stealth Layer โ
โ โข fpgen sampler โ โข coherence.py โ โข C++ MaskConfig โ โข Isolated โ
โ โข GeoIP matching โ โข Fonts/GPU/Audioโ โข Native Web API โ Juggler โ
โ โข NewContext() โ โข Zero mismatch โ โข No JS override โ โข myuri input โ
โโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโ
1. Native C++ Fingerprint Spoofing (No JS Overrides)
Instead of monkey-patching globals in page scripts, Camoufox passes the generated identity through CAMOU_CONFIG and answers browser APIs straight from C++ patches (MaskConfig):
- Full-Stack Consistency: Covers Navigator (
User-Agent, platform,hardwareConcurrency, languages), matching HTTP headers, screen/window metrics & CSS media queries, WebGL/WebGL2/WebGPU, CPU vendor arithmetic quirks (Intel/AMD/ARM64), audio hardware properties, bundled OS fonts, real speech voices, and media devices. - Identical Across Workers & Iframes: Values stay consistent across main frames, iframes, and Web Workers with native descriptors and
toString()output. - No Unnecessary Noise: Deliberately leaves stock Firefox traits untouched where artificial perturbation would itself become a tell (e.g., avoiding canvas noise on host-OS GPU setups).
2. Real-World fpgen Identities & Multi-Context Isolation
- Coherence-Checked Fingerprints: Both the Python and TypeScript launchers draw realistic device profiles from
fpgen/fpgen-jsand validate them viacoherence.pyto reject impossible hardware/OS combinations. - Automatic Proxy & GeoIP Alignment: Setting
proxy+geoip=True(powered by GeoIP All-in-One) automatically aligns timezone, locale, geolocation, and WebRTC IPโincluding WebRTC UDP relay support behind SOCKS5 proxies. - Many Identities in One Browser:
NewContext()lets you run multiple isolated contexts inside a single browser instance, each with its own OS profile, fingerprint, and proxy.
3. Invisible Playwright Automation & Humanized Input
- Isolated Juggler Protocol: Playwright drives Firefox via Juggler in an isolated world invisible to page scripts (
navigator.webdriverisfalse, clean call stacks, and zero injected window bindings). - Native Events + Optional Humanization: Sends trusted native browser events (paste, physical wheel notches, drags) and supports driver-side humanization via
humanize=True(powered bymyuri). - Debloated & Batteries Included: Strips Mozilla telemetry at build time, bundles uBlock Origin offline by default (
1.75.4inv159.0-beta.42), and supports Linuxheadless="virtual"(Xvfb) andheadless="virtual-gpu"modes.
๐ ๏ธ Quick Start (Python & TypeScript)
Camoufox returns a standard Playwright Browser or BrowserContext, making migration from existing Playwright code nearly drop-in.
Python
pip install -U "camoufox[geoip]"
camoufox fetch
from camoufox.sync_api import Camoufox, NewContext
# Basic usage with an auto-generated coherent identity
with Camoufox(headless=True) as browser:
page = browser.new_page()
page.goto("https://example.com")
# Multi-identity contexts with proxy + GeoIP alignment and humanized input
with Camoufox(headless=True, geoip=True, humanize=True) as browser:
ctx = NewContext(
browser,
os="windows",
proxy={"server": "http://proxy.example.com:8080", "username": "user", "password": "pass"},
)
page = ctx.new_page()
page.goto("https://example.com")
TypeScript / Node.js (Node.js โฅ 22.15)
npm install camoufox playwright-core
npx camoufox fetch
import { Camoufox } from "camoufox";
const browser = await Camoufox({
headless: true,
proxy: { server: "http://proxy.example.com:8080", username: "user", password: "pass" },
geoip: true,
});
const page = await browser.newPage();
await page.goto("https://example.com");
await browser.close();
โก Fast Downloads for 1.25 GB Releases via GH-Proxy
Because every Camoufox package bundles cross-platform OS font sets alongside the patched Firefox binary, each release archive weighs ~1.24 GB โ 1.27 GB. Use the GH-Proxy portals and direct mirror links below for fast, uninterrupted downloads:
๐ Recommended: 1-Click Release Browser via GH-Proxy
๐ Open Camoufox Latest Release Portal on GH-Proxy
๐ Browsev159.0-beta.42(Firefox 159 Preview) on GH-Proxy
๐ Browsev158.0.1-beta.41(Latest Standard Release) on GH-Proxy
๐ฆ v159.0-beta.42 (Firefox 159) Direct Mirror Links
- Windows (x86_64, 1267.0 MB):
https://gh-proxy.org/https://github.com/daijro/camoufox/releases/download/v159.0-beta.42/camoufox-159.0-beta.42-win.x86_64.zip - macOS Apple Silicon (arm64, 1243.7 MB):
https://gh-proxy.org/https://github.com/daijro/camoufox/releases/download/v159.0-beta.42/camoufox-159.0-beta.42-mac.arm64.zip - macOS Intel (x86_64, 1251.3 MB):
https://gh-proxy.org/https://github.com/daijro/camoufox/releases/download/v159.0-beta.42/camoufox-159.0-beta.42-mac.x86_64.zip - Linux (x86_64, 1252.8 MB):
https://gh-proxy.org/https://github.com/daijro/camoufox/releases/download/v159.0-beta.42/camoufox-159.0-beta.42-lin.x86_64.zip - Linux (arm64, 1245.6 MB):
https://gh-proxy.org/https://github.com/daijro/camoufox/releases/download/v159.0-beta.42/camoufox-159.0-beta.42-lin.arm64.zip
๐ฆ v158.0.1-beta.41 (Latest Standard Release) Mirror Links
- Linux (x86_64, 1243.2 MB):
https://gh-proxy.org/https://github.com/daijro/camoufox/releases/download/v158.0.1-beta.41/camoufox-158.0.1-beta.41-lin.x86_64.zip - Windows (x86_64, 1258.9 MB):
https://gh-proxy.org/https://github.com/daijro/camoufox/releases/download/v158.0.1-beta.41/camoufox-158.0.1-beta.41-win.x86_64.zip - macOS Apple Silicon (arm64, 1237.6 MB):
https://gh-proxy.org/https://github.com/daijro/camoufox/releases/download/v158.0.1-beta.41/camoufox-158.0.1-beta.41-mac.arm64.zip
๐ป Fast Repository Clone
git clone https://gh-proxy.org/https://github.com/daijro/camoufox.git
๐ก Practical Notes
- Active Development: Camoufox tracks upstream Firefox releases closely (
v158/v159) and is under active development. Pin tested browser builds viacamoufox list/camoufox setfor reproducible automation pipelines. - Firefox-Only Engine: Camoufox always presents Firefox/SpiderMonkey identitiesโit does not spoof Chromium.
- Responsible Usage: Always pair automation workflows with compliant practices, respect site terms and
robots.txt, and use Camoufox for authorized testing, research, and legitimate agent workflows.
- Official GitHub Repository: https://github.com/daijro/camoufox
- Official Documentation: https://camoufox.com
- ๐ GH-Proxy 1-Click Release Portal: https://gh-proxy.com/#https://github.com/daijro/camoufox
- GH-Proxy Main Site: https://gh-proxy.com