Leak Debugging
Both browsers are debugged the same way in outline: start from the stock browser, which the site does not flag, and add the patches back until it does. Every Camouwolf patch falls through to Chromium's own code when its config key is absent, so an unconfigured Camouwolf binary is Chromium; every Camoufox change can be applied or reversed one patch at a time. The tools differ.
This is a flow chart demonstrating my process for determining leaks without deobfuscating WAF Javascript. The method incrementally reintroduces Camoufox's features into Firefox's source code until the testing site flags.
This process requires a Linux system and assumes you have Firefox build tools installed (see Building in CLI).
Flowchart
flowchart TD
A[Start] --> B[Does website flag in the<br>official Firefox?]
B -->|Yes| C[Likely bad IP/rate-<br>limiting. If the website<br>fails on both headless and<br>headful mode on the official<br>Firefox distribution, the<br>issue is not with the browser.]
B -->|No| D["Run make ff-dbg(1) and<br>build(2) a clean<br>distribution of Firefox.<br>Does the website flag in<br>Firefox **headless** mode(4)?"]
D -->|Yes| E["Does the website flag in<br>headful mode(3) AND<br>headless mode(4)?"]
D -->|No| F["Apply config.patch(5),<br>then rebuild(2). Does the<br>website still flag(3)?"]
E -->|No| G["Enable privacy.resistFingerprinting<br>in the config(6). Does the<br>website still flag(3)?"]
E -->|Yes| C
G -->|No| H["In the config(6), enable<br>FPP and start omitting<br>overrides until you find<br>the one that fixed the leak."]
G -->|Yes| I[If you get to this point,<br>you may need to deobfuscate<br>the Javascript behind the website<br>to identify what it's testing.]
F -->|Yes| K["Apply the playwright<br>patch(5), then<br>rebuild. Does it still flag?"]
F -->|No| J["Omit options from<br>camoufox.cfg(6) and<br>rerun(3) until you find the<br>one causing the leak."]
K -->|No| M[Juggler needs to be<br>debugged to locate the leak.]
K -->|Yes| L[The issue has nothing to do<br>with Playwright. Apply the<br>rest of the Camoufox patches<br>one by one until the one<br>causing the leak is found.]
M --> I
Cited Commands
| # | Command | Description |
|---|---|---|
| (1) | make ff-dbg |
Setup vanilla Firefox with minimal patches. |
| (2) | make build |
Build the source code. |
| (3) | make run |
Runs the built browser. |
| (4) | make run args="--headless https://test.com" |
Run a URL in headless mode. All redirects will be printed to the console to determine if the test passed. |
| (5) | make patch ./patches/<name>.patch |
Apply one patch (make unpatch reverses it). The Playwright patch is ./patches/playwright/0-playwright.patch. |
| (6) | make edit-cfg |
Edit camoufox.cfg in the default system editor. |
Camouwolf has its own test pipeline that compares what a page reads with what the launcher claimed. Run it against a built browser before going to a live site: a failure names the surface that leaks. Each stage runs from the root of the repository, the same way locally as in CI:
pip install -r ci/requirements.txt ./python
export CAMOUWOLF_BINARY=/path/to/camouwolf| Command | Description |
|---|---|
python3 -m ci.run_build_tester |
Loads tests/build-tester's page over several drawn identities and locales, and checks what it reads against the claim: automation traces, values that are not native, and each fingerprint surface. |
python3 -m ci.run_native --subset browser |
Launch behaviour: no process or profile outlives a launch, canvas readback is stable, WebRTC stays off UDP when blocked, a SOCKS5 proxy carries page and WebRTC traffic. |
python3 -m ci.run_playwright --only tests/async/test_click.py |
The upstream Playwright suite, launched through the launcher. Drop --only for the whole suite (about 10 minutes). |
python3 -m ci.run_patch_guards |
The patch series against the pinned tag; needs no browser. |
If a site flags Camouwolf but the pipeline passes, first check whether it flags stock Chromium of the same version. If it doesn't, bisect over the series: each patch changes one surface and can be left out on its own, so comment patches out of browser/patches/series and rebuild with bash scripts/build-camouwolf-incremental.sh until the one that leaks is found. The stages are described in ci/README.md.