Why Camoufox exists
Modern anti-bots have a simple trick: they run Function.prototype.toString.call(fn) on browser functions to read the source code behind them. A genuine built-in function returns [native code]. If it returns anything else, the function has been tampered with — and the tampering itself becomes the bot signal. This breaks playwright-stealth completely: every value it overrides (navigator.webdriver, WebGLRenderingContext.prototype.getParameter, etc.) leaves a visible JavaScript source signature that toString exposes.
Camoufox changes the same things — canvas hash, WebGL renderer, AudioContext output, navigator quirks — but does it in C++ when the browser is built. The functions still return [native code] because they genuinely are native code. With no JavaScript injected, there is nothing for runtime inspection to catch.
The geoip flag
Anti-bots check whether five identity clues all agree: the IP's country, the WebRTC ICE candidate (the network address the browser reveals when setting up peer connections), the DNS resolver's location, the timezone, and the Accept-Language header. If a US proxy is paired with a Pakistani DNS resolver, the request fails this coherence check before the browser fingerprint even gets looked at.
Camoufox's geoip=True automatically lines up all five clues with the proxy's exit country. It looks up the proxy IP, finds its country, and configures the browser to match — no manual setup. This one feature covers the detection layer that scrapers most often forget.
Trade-offs vs alternatives
vs playwright-stealth: Camoufox defends at a layer that JavaScript patches simply cannot reach. playwright-stealth is largely broken against modern anti-bots in 2026.
vs CloakBrowser (Chromium): Camoufox is built on Firefox; CloakBrowser is built on Chromium. Chromium has roughly 65% of the browser market versus Firefox's ~3%, so for sites that weigh browser popularity, CloakBrowser blends in better. CloakBrowser also passes a major anti-bot's 60-extension probe by loading real extensions — something Camoufox does not handle as natively.
vs real Chrome: a real Chrome on real hardware is the gold standard, but it cannot scale to thousands of parallel sessions. Camoufox is the best headless option that still looks like a real browser.
What Camoufox patches at the C++ level
Camoufox goes far beyond hiding navigator.webdriver. Because everything is compiled into the binary, each of these returns a native value with no JavaScript source signature to inspect:
- Navigator — device, OS, hardware concurrency, platform, vendor, and the full UA string
- Screen & viewport — resolution, available dimensions, color depth, device pixel ratio
- Canvas & WebGL — canvas hash, WebGL renderer/vendor, supported extensions, context attributes, and shader precision values
- Audio — AudioContext output and speech playback-rate parameters
- Fonts — the installed-font list, spoofed to match the target OS profile
- Geolocation & Intl — latitude/longitude, timezone, locale, and
Intlformatting - WebRTC — local and public ICE candidate IPs, spoofed at the protocol level rather than blocked
Fingerprint injection and rotation
Camoufox does not hand out a single hard-coded fingerprint to every session. It uses BrowserForge, which samples how device characteristics are actually distributed in the real world, so every generated profile holds together and looks plausible: the screen size fits the device class, the WebGL renderer fits the platform, the fonts fit the OS. You can let it auto-generate a profile, pin a specific one so a session keeps the same identity, or supply your own through the fingerprint argument. The PyPI package wires up the injection for you, so rotating identity across thousands of sessions is a config change rather than a rebuild.
Built for AI agents
Camoufox bills itself as an open-source browser built for AI agents, and the build shows it. It is a debloated Firefox — telemetry and background services stripped out — that runs headless-first and is tuned for a cleaner DOM, with no CSS-animation or telemetry noise. A cleaner page is cheaper for an LLM (large language model) to read and reason over. Add the sub-200 MB footprint and you can run many parallel agent sessions on modest hardware. The project stays in sync with the latest Firefox releases, and its source has been public since the v146.0.1-beta.25 release in January 2026.
