Commit Graph
3 Commits
Author SHA1 Message Date
Jake WriterandClaude Opus 5.5 0bb4f14b74 Keep the caller's launch inputs unchanged, and claim the avail screen and touch points baseline protection reports
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>
2026-10-09 13:39:02 -06:00
Jake WriterandClaude Opus 5.5 5c1fd578ad Read a build's version from its own bundle, refuse browser= with a binary, and cover the canvas whenever the GPU is not the host's
- 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>
2026-10-09 13:38:46 -06:00
Jake Writer 658806eb23 chore: major code cleanup/refactor 2026-10-06 19:10:22 -06:00