* Let a launch leave Web Audio output unmodified
The launchers seed Web Audio noise per identity so a returning identity
reproduces its audio hash. A caller who wanted stock audio output had to
pass audio:seed in config, and NewContext contexts still drew their own
seed.
audio_noise (default True, as before) set to False sends seed 0, which
audio-fingerprint-manager.patch reads as no noise, and NewBrowser
records it so NewContext gives its contexts seed 0 as well. An
audio:seed the caller sets wins either way. Python and TypeScript take
the option the same way, the launch goldens gain an audio_noise_false
scenario, and both package READMEs list it.
On v158.0-beta.40 an OfflineAudioContext probe renders the same with
audio_noise=False across launches, in the page and in a NewContext,
and matches a launch with audio:seed 0; default launches differ.
Split out of #890, without its gpu_passthrough option.
Co-Authored-By: coffeegrind123 <103264516+coffeegrind123@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Let a context turn its Web Audio noise off
A context without an audio seed of its own takes the launch's audio:seed,
so a per-context seed of 0 means "the launch's seed", not "no noise". On a
browser launched with noise, no context could render stock audio.
setAudioFingerprintNoise(false) stores that choice for the calling
context, and AudioFingerprintManager::GetSeed returns 0 for it whatever
the launch seed. The setter has its own gate and is sealed with the
others; the build tester and the setter-seal guard list it.
The context-audio-off guard renders an OfflineAudioContext with the
noise off at launch as the reference, then on a noised launch requires a
context that called the setter to match it, also after a navigation,
while a plain context and a NewContext context stay noised. It fails on
v158.0-beta.40, which has no such setter.
Both patches were regenerated from a tree of the files the series
touches, and the whole series applies to vanilla 158 without fuzz.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Replace audio_noise with fingerprint_options
The launchers take one option for the noise Camoufox adds on top of an
identity, in Python and TypeScript alike:
fingerprint_options={"audio": {"noise": False}} # stock Web Audio
fingerprint_options={"audio": {"seed": 1000433}} # fixed audio seed
fingerprint_options={"canvas": {"randomize": True}}
Without an audio entry the seed still follows the identity; without a
canvas entry randomization is still on for another OS or GPU. Any other
surface or key raises InvalidFingerprintOptions, naming the tribal rules
that keep canvas pixels and glyph spacing unnoised, as do a seed outside
1 to 2**32-1 and noise off together with a seed. fingerprint= stays the
fpgen identity.
canvas_noise= and config={"audio:seed": N} keep working with a
FutureWarning, as a deprecated GeoIP source does; either one together
with the matching fingerprint_options entry raises.
NewContext takes the audio entry per context. Without one a context
follows the browser, read from the audio:seed the launch sent, so
launch_options() and from_options launches behave the same: no noise if
the launch sent 0, otherwise a fresh seed of its own. A context never
takes the browser's seed, fixed or not, since two devices sharing an
audio hash are linked; a per-context seed reproduces a context instead.
A context with its noise off calls setAudioFingerprintNoise(false). On a
noised browser that needs a build with the setter: NewContext asks the
browser once, from an init script in a throwaway context, and raises on
an older build rather than leave the context noised. canvas in a context
raises: randomization belongs to the browser.
audio_noise, context_audio(browser) and _camoufox_audio_noise are gone.
The launch goldens replace audio_noise_false with audio and canvas
scenarios, the init-script golden gains a seed-0 case, and the READMEs,
AGENTS.md and docs/per-context-patches.md describe the option; repo
callers of canvas_noise use the new form.
On v158.0-beta.40, an OfflineAudioContext probe renders the same with
{"audio": {"noise": False}} in the page, in a NewContext and with
config audio:seed 0; default launches differ; seed 1000433 and a
context seed reproduce across launches; a context turning its noise off
on a noised browser raises.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Audio renders as stock: remove the noise, the seed and fingerprint_options
Stock Firefox has one audio fingerprint per CPU architecture. 103 runs of
Firefox 152-158 on 12 CPUs gave 35.749972093850374 on every x86-64 machine
and 35.74996626004577 on every ARM64 one, whatever the OS, sound device,
sample rate or version. The per-identity noise put every Camoufox identity
on a value no real machine renders.
Browser: audio-fingerprint-manager.patch is gone, with
setAudioFingerprintSeed and setAudioFingerprintNoise; font-list-spoofing,
webrtc-ip-spoofing and window-setter-seal are regenerated without its
context (the series applies cleanly to vanilla 158). audio:seed is marked
removed in properties.json.
Library (py and ts): no seed is derived or drawn, and config or
config_overrides carrying audio:seed raise InvalidPropertyType pointing at
the new tribal rule. fingerprint_options, never released, is reverted;
canvas_noise stays as released.
Tests: tribal rule audio-is-not-noised with its test; the
audio-matches-stock guard replaces context-audio-off and
audio-frequency-noise, holding the fpjs buffer, AnalyserNode, biquad and
sine renders to the recorded stock values in several contexts and two
launches while sending the seed released libraries send. build-tester
counts the audio hash as must-match and fails its noise trap.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* A removed audio:seed warns and is dropped; the rule lists each machine
Passing audio:seed in config (or a NewContext config_overrides) no longer
raises. Both launchers drop the key and emit one FutureWarning from
warnings.yml (audio_seed_removed): the option was removed and audio is
rendered exactly as stock Firefox renders it. The caller's dict is left
as it was. Tests on both sides check the single warning and a normal
launch; the launch golden records the warning in order.
audio-is-not-noised now lists the evidence per machine and architecture,
including the Raspberry Pi 4 runs (106 runs: 45 ARM64, 61 x86-64), the
device swap, fpgen's share and what the noise produced.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: coffeegrind123 <103264516+coffeegrind123@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The test docstring claimed every value was measured on stock Windows; four
behaviour prefs were, and the rest are Firefox 158's Windows defaults from its
pref files. windows-keyboard.patch's tables, text bindings and AltGr are GTK
code, so on a macOS host only the editor caret style changes. The test UAs
claim 158.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The CRT math, keyboard, behaviour prefs and scrollbars a Windows identity
gets on another host are prefs and launch config, so they follow the OS the
browser was launched with. NewContext does not refuse a context of another
OS: a launch without os draws its OS, and the refusal would come and go with
the draw.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`camoufox fetch <repo>/<version>-<build>`, and the plain `fetch` of a
release's paired build, synced every repository in repos.yml before looking
the build up: one GitHub API call per source, plus a manifest download per
listed release. On shared CI runners that exhausted the unauthenticated API
quota. The sync also reads only the newest page of releases, so a pinned
build older than the 30 newest could not be found.
Both now read the build's own release, GET /releases/tags/v<version>-<build>,
and apply the same asset, version-range and interface checks as the sync,
which now share release_versions(). A build published under another tag
(early alphas such as v146-hardware) still resolves through the sync.
Every path where fetch installs nothing now exits 1: an unknown or
incompatible build, a failed API call or download, and a prerelease prompt
that is declined or meets end of input. Previously each printed an error and
exited 0, so CI failed later at launch.
Fixes#919
headless="virtual" started Xvfb in its own session and stopped it only on
the browser's close path. A launcher ended by a signal (timeout, a
supervisor, a cancelled CI job) never reaches that path, so its Xvfb ran
forever, together with the session bus and desktop helpers Firefox
autolaunched on that display.
Both packages now exec Xvfb through `setpriv --pdeathsig TERM`, so the
kernel signals it when its launcher dies, even by SIGKILL. SIGTERM lets
Xvfb remove its own lock and socket, and the autolaunched bus exits when
it loses its X connection. setpriv comes from util-linux.
The leak suite missed this because every crash test keeps the launcher
alive to tear down, and leak_check follows only our descendants, which an
orphan no longer is. test_launcher_sigkill_leaves_nothing_on_its_display
kills the launcher and looks machine-wide.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Behave as on an IPv4-only network when the host's IPv6 disagrees with geoip (#849)
With geoip and an IPv4 address, both launchers set network.dns.disableIPv6.
That stops AAAA lookups only, so IPv6-only sites failed with
NS_ERROR_UNKNOWN_HOST (#849), while a URL with an IPv6 literal still connected
and WebRTC still gathered IPv6 candidates. A page could read the host's IPv6
address, and no real network resolves names to IPv4 only while IPv6 literals
connect.
Without a proxy, sites see this host's own addresses, and the identity comes
from its IPv4 address. The launcher now looks up the host's public IPv6
address too. When it geolocates to the identity's timezone and region, IPv6
stays on, as on any dual-stack network. Otherwise, or when the host has no
IPv6 route, it sets the new network:ipv4Only config key, with a LeakWarning
when an IPv6 address was found elsewhere. Behind a proxy nothing changes: the
browser reaches sites only through it.
network:ipv4Only makes the browser behave as a host with no IPv6 route:
lookups return IPv4 addresses only, TCP connections to a routable IPv6
address fail with PR_NETWORK_UNREACHABLE_ERROR as the kernel's would, HTTP/3
refuses IPv6 peers, and ICE gathers no routable IPv6 address. Loopback,
link-local and IPv4-mapped addresses keep working, as they do on such a host.
NetAddr::IsUnreachableOnIPv4OnlyNetwork is the one definition all of these
use.
ipv4-only-network.py checks it in a network namespace with a dual-stack
interface: with the key off every IPv6 path works, with it on IPv6 literals
and AAAA-only names fail at once, dual-stack names use IPv4, and WebRTC
offers no IPv6 candidate.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Allow user namespaces for the IPv4-only network guard in CI
Ubuntu 24.04's AppArmor denies unprivileged user namespaces to programs
without a profile, so the guard's `unshare -rnm` failed on the runner.
The spoofing leg now lifts that restriction on the throwaway runner, and
the guard says which setting to change when it is denied locally.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
- The skiplist audit runs each entry in its own pytest process without
upstream's reruns. test_browsercontext_proxy.py shares one browser, and
HTTPS-First's per-host exception means only its first proxied navigation
fails, so every navigating test there is listed and each is audited from
a fresh browser. Record HTTPS-First staying on in ci/tribal-rules.yml.
- Drop the test_worker locale entry and its overlay test: upstream v1.62.0
asserts the same ru-RU behaviour, so the entry passed the audit.
- browser/bundle/fontconfig ships in every package, so it is now a browser
input (BROWSER_DIRS and the resolve grep), with a test that every
--includes path is one.
- Revert the binary-config-keys allowance: a driver-only PR tests the release
paired by source digest, which covers properties.json.
- Playwright guards use helpers.resolve_binary and a new helpers.launch_kwargs
instead of per-file copies.
- Docs: absolute links in the PyPI/npm READMEs, a Python development section,
repository-root markers in the patch guide, Playwright porting merged into
it, fpgen-js, the moved fpgen pin and font-constant files, and the
canvas-noise and browser/executable_path launcher changes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Canvas, WebGL and WebGPU output come from the real OS, driver and GPU. On the
host's OS the identity now claims the GPU Firefox actually renders with; on
another OS canvas and WebGL readback use privacy.resistFingerprinting's canvas
placeholder (canvas_noise, on by default only for another OS, with a LeakWarning).
WebGPU follows the claimed device: navigator.gpu only where Firefox exposes it
(Windows, Apple Silicon), and the host's adapter only when the identity claims
the host's hardware GPU. Otherwise gfx.blacklist.webgpu marks the device
blocked, so requestAdapter() resolves to null as it does for real users on a
blocked or software GPU. The pref is read at startup, so it goes through
CAMOU_PREFS.
Spoofed avail-screen and touch values now pass through stock baseline
fingerprinting protection for the claimed platform (screen-spoofing,
touchscreen-fingerprint-spoofing).
fpgen's records are mostly Firefox 146, and two WebGL values are decided by
the browser rather than the device: Windows extension lists now include
EXT_depth_clamp (ANGLE's D3D11 backend reports it on every feature level in
156), and WebGL1's ALIASED_LINE_WIDTH_RANGE takes the device's WebGL2 value
(Firefox 156 no longer forces a compatibility profile for WebGL1 on Linux).
A new parity guard, stock-gpu-parity, compares stock Firefox at the build's
version, stock Firefox at the release fpgen recorded, and Camoufox claiming the
host's GPU, and fails when Camoufox differs from stock on a value the two stock
releases disagree on. Decisions are recorded in ci/tribal-rules.yml
(cross-os-canvas-is-the-rfp-placeholder, webgpu-follows-the-claimed-device,
webgl-browser-owned-values-follow-firefox).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>