Blog / ยท GH-Proxy Team

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-js and validate them via coherence.py to 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.webdriver is false, 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 by myuri).
  • Debloated & Batteries Included: Strips Mozilla telemetry at build time, bundles uBlock Origin offline by default (1.75.4 in v159.0-beta.42), and supports Linux headless="virtual" (Xvfb) and headless="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
๐Ÿ‘‰ Browse v159.0-beta.42 (Firefox 159 Preview) on GH-Proxy
๐Ÿ‘‰ Browse v158.0.1-beta.41 (Latest Standard Release) on GH-Proxy

  • 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
    
  • 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

  1. Active Development: Camoufox tracks upstream Firefox releases closely (v158 / v159) and is under active development. Pin tested browser builds via camoufox list / camoufox set for reproducible automation pipelines.
  2. Firefox-Only Engine: Camoufox always presents Firefox/SpiderMonkey identitiesโ€”it does not spoof Chromium.
  3. 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.

๐Ÿ’ฌ Comments & Discussion

Scroll down to load comments
(or click here to load immediately)