A context sets its own user agent and platform, but appVersion came only
from the launch config, so a macOS context in a Windows launch reported
"5.0 (Windows)" beside a Macintosh user agent, in the page and in its
workers.
navigator-spoofing.patch adds setNavigatorAppVersion, stored, guarded and
removed the way setNavigatorPlatform and setNavigatorUserAgent are, and
read by Navigator::GetAppVersion and WorkerNavigator::GetAppVersion before
the launch config. window-setter-seal.patch seals it with the others, and
is regenerated against Firefox 158 with every patch before it applied.
The launchers' per-context init script calls it with the appVersion
_app_version_from_user_agent already derives for the context's config,
in Python and TypeScript alike, so the rule stays in one place. The
context-app-version guard compares the page against that same function
instead of a copy of its own; the init script golden covers the setter.
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>