The pinned model files were dated 2100-01-01 so fpgen's five-week refresh
never replaces them. AWS Lambda keeps file times as signed 32-bit seconds and
reads that date back as 1963, so every launch tried to re-date the files,
Lambda's read-only filesystem raised EROFS, and the launch failed. Had the
error been ignored, fpgen would have seen a 1963 file as stale and fetched
its own model over the pin.
The files are now dated 2038-01-01, which a 32-bit filesystem stores as is.
A file that cannot be re-dated for any reason, not only a permission error,
is also left alone while fpgen still considers it current, so a read-only
image built with the earlier date keeps working. A stale file that cannot be
re-dated still fails the launch.
Fixes#854.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
launch_options/launchOptions filled the caller's config, prefs, args and
addons in place. A config reused for a second launch then carried the first
identity's webGl:vendor in, which read as a GPU the caller named: the second
launch covered its canvas while claiming the host's GPU. The TypeScript
end-to-end test caught it through its Python probe, which calls
launch_options before Camoufox with the same kwargs. Both launchers now work
on copies.
Firefox's baseline fingerprinting protection reports the available screen as
the screen less a fixed taskbar for the claimed OS (48px Windows, 76px macOS,
none on Linux) and collapses more than one touch point to 5, and the browser
applies that to the spoofed values. The launchers still claimed fpgen's
recorded avail rect, adjusted by fix_screen_no_taskbar, so a Linux identity's
config said availHeight 1053 while the page read 1080. follow_baseline_protection
/ followBaselineProtection replaces it and claims what the browser reports.
The end-to-end test now compares a covered canvas by being covered (its
readback is random on every read, so its size was too), launches the
NewContext scenario with canvas_noise, since an uncovered browser binds its
contexts to the host, and checks a headful launch against its own config,
because Xvfb can render on another device than headless.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- One helper, RoverfoxStorageManager::UserContextId(), reads the user
context from a principal, node or window. Every per-context lookup used
the browsing context instead, which a document from
createHTMLDocument() or DOMParser does not have, so a canvas there read
context 0, which held whichever context set its values last: a page
could see two GPUs (#839) or another context's font list. The setters
no longer copy their values into context 0.
- UNMASKED_RENDERER_WEBGL and UNMASKED_VENDOR_WEBGL apply stock's
fingerprinting-protection checks before the spoofed value, as RENDERER
does, so the two never disagree.
- system-ui, the CSS2 system fonts and WebRTC's fabricated port use the
context's own OS (NavigatorManager::GetSpoofedOS), not the launch's, so
a macOS context of a Windows launch no longer resolves Segoe UI.
- CamoufoxWindow sizes only windows the driver opens; a page's popup keeps
the size it asked for.
- camoufox.cfg applies CAMOU_PREFS through the default branch and quits
with the reason on stderr when a pref cannot be applied, instead of
starting without it.
- Delete commented-out prefs; shorten the setter-seal comments into a
tribal rule; mark the unread navigator.buildID key removed.
- Refresh five patches that only applied with fuzz; the patched tree is
byte-identical.
- Guards: webgl-renderer-pair covers data and DOMParser documents, two
contexts and the unmasked vendor; new context-os-system-font and
popup-window-size; startup-prefs covers the loader's failures.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gen-fonts-json.py and verify-fonts.py read the groups listed in groups.json
through _font_bundle.read_groups(). Neither falls back to the per-OS layout
the group layout replaced any more: a bundle without groups.json is an error.
test_salt_of_equal_objects_is_equal had slipped inside another test's body
and never ran; it is back in TestPinnedIdentityIsStable and passes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Values both launchers hard-coded (marker fonts, the Windows 11 fonts, the
Apple Silicon and Intel Mac core and panel tables, plausible DPR and core
counts, the macOS MacinTalk/Eloquence voices, the cache prefs) now live in
python/src/camoufox/launcher-constants.json, which the TypeScript package
ships as a data file. gen-fonts-json.py and verify-fonts.py read the same
file, so the drifted PingFang marker copy is gone (fonts.json regenerates
byte-identical) and verify-fonts no longer ast-parses fingerprints.py.
- Drop the duplicate fpgen model pin under browser/scripts/data; the TS
test checks the fpgen package's MODEL_PIN against the Python copy.
- Move pin-fpgen-model.py and clean-fingerprint-data.py to python/scripts.
- Delete the font licence report (font-metrics/licences.py and its saved
output, open-fonts.txt): the bundle ships as built, so the report checks
nothing.
- Delete unreferenced files: cleanfonts.sh, python/examples,
typescript/renovate.json.
- Delete dead code: classify_installs, remove_mmdb, write_upstream_sh,
bump_release, unused test constants and fixture helpers, the
_virtual_display attribute writes, package.py's pre-groups font copy (a
missing groups.json now fails).
- Share require_bundle, zip_entries, gh_headers and parse_shard instead of
keeping copies; fold GitHubDownloader into CamoufoxFetcher in both
launchers.
- TS raises ValueError where Python does, and `camoufox version` prints the
fpgen package version as Python does.
- Python tests get src/ from pytest's pythonpath instead of sys.path
inserts; skips that hid untested paths now assert or test the behaviour.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A named executable's application.ini is found beside it, or in
Contents/Resources of a macOS app bundle (pkgman.build_file / buildFile),
and a named executable without one raises instead of borrowing the paired
build's version. browser= on macOS no longer raises CamoufoxNotInstalled
or claims the wrong Firefox major.
- browser= together with executable_path or CAMOUFOX_EXECUTABLE_PATH raises
ValueError instead of silently dropping browser=.
- One function per launcher (plan_rendering / planRendering) decides whether
the identity claims the host's GPU or the canvas is covered, for the launch
and for the host identity its contexts keep. A GPU named by webgl_config or
a preset, or a host GPU fpgen never recorded, now covers the canvas by
default, and such a browser binds no context to the host.
- setWebgpu keeps a caller pref set to null, as Python's setdefault does.
- stock-gpu-parity verifies SHA256SUMS.asc against Mozilla's release key and
uses camoufox.webgl.recorded_devices instead of private helpers.
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>