searchclipboardfor.middleclick is browser chrome, clipboard.autocopy only fills
the X primary selection, middlemouse.openNewWindow is overridden by the
browser's own link handling, and select popups are drawn in the parent
process. use-system-size is read only by Windows' own LookAndFeel.
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>
The launcher's comments cited Firefox 156 and 152.0.4 as the source of
what they describe. Every Windows behaviour default was checked again
on 158's all.js, firefox.js and StaticPrefList.yaml and still differs
between the Windows and GTK builds; 158's Windows scrollbar default is
still 17 px. The comments now say so without pinning a past release.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Windows Firefox has PlayReady behind EME; a Linux build cannot supply
it, so turning media.eme.enabled on claimed more than the build
delivers. The pref is no longer among the Windows behaviour defaults,
and the Python and TypeScript tests now require that it is left alone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When a download failed, maybe_download_addons removed the addon directory
unconditionally. If another process had finished installing the addon in the
meantime, that deleted its good copy, possibly while its browser was loading
it. The handler now removes the directory only when it has no manifest.json,
in both the Python and TypeScript launchers, each with a regression test.
One window remains: two processes that both find a stale, non-empty partial
directory can still interleave its removal and their renames.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The atomic extraction removed the target before renaming into it. With two
processes downloading at once, the second could delete the first's finished
addon while its browser was loading it. If the first renamed in between, the
second's rename failed on the non-empty directory, and its error handler then
deleted the good copy, so it launched without uBlock Origin.
Rename first. If the target is not empty and already holds a manifest.json,
keep it and drop the temp dir; only an incomplete target is replaced. The
TypeScript port mirrors this and gains the atomic-extraction test, and both
gain a regression test for an addon installed during extraction.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A cold first Xvfb on a fresh host took 0.6-8.4 s to write its display
number down the -displayfd pipe, close enough to the ten-second bound
that launches failed with "Xvfb did not report a display" though they
would have succeeded. The bound only exists so a hung Xvfb fails rather
than blocking forever; thirty seconds still does that. Both launchers
move together, and the pdeathsig wrapper is unchanged.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* Pin Firefox 157.0
Camoufox beta.33 is built on Firefox 157.0 (was 156.0.1).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* e2e: expect exactly the identity's input kinds from enumerateDevices()
The probe asserted a non-empty pre-grant device list. Stock Firefox lists one
entry per input kind the machine has and no outputs, so a speaker-only identity
(about 6% of Windows draws) correctly lists nothing. Firefox 157.0's UA bump
re-seeded the Windows preset onto such a machine, and 156.0.1 returns the same
empty list for it.
Compare against the kinds the config claims instead: it still fails on an
empty list for a mic/camera identity, and it now also catches a wrong or
missing kind, a host device leaking through, or an enumerateDevices() error.
Gate-Change: Firefox 157.0's version in the UA re-seeds the Windows preset's media-device draw (pythonlib fingerprints.py from_preset -> identity_seed); verified the same empty list on 156.0.1-beta.32 and 157.0 for the no-mic/no-camera identity.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Keep independent window placement with the WM, which Firefox 157 stopped doing
Firefox 157 landed bug 2070008, which deleted the Unix special case in
AppWindow::SizeShell():
bool positionSet = !mIgnoreXULPosition;
#if defined(XP_UNIX) && !defined(XP_MACOSX)
// don't override WM placement on unix for independent, top-level windows
if (!parentWindow) positionSet = false;
#endif
so a top-level window now takes the position persisted in the profile's XUL
store instead of leaving placement to the window manager.
That makes window.screenX/screenY a function of leftover profile state, and a
page can read it. Measured on this branch before the fix, same identity, same
Xvfb:
throwaway profile screenX 4 screenY 4
persistent profile screenX 26 screenY 0
v156.0.1-beta.32 reports 0/0 for both, so the two session types were
indistinguishable and are no longer. fingerprint-injection.patch only answers
GetScreenX/GetScreenY from the config when window.screenX is set, and the
launcher does not draw it for every identity, so the real position shows
through whenever it is absent. A position that varies with profile type
correlates a user's fresh and persistent sessions, and it moves the browser
rect MouseDispatch.js measures (docs/input-dispatch.md).
Nobody places an automation browser's window by hand, so there is no UX here
to gain and determinism to lose. Restores the guard for independent windows
only; dependent windows are still placed relative to their parent, as upstream
intended before and after. Both profile types report 0/0 again.
Caught by typescript/tests/e2e.test.ts:506 in CI, which asserts a persistent
profile presents the same device as a throwaway one.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* Pin Firefox 157.0.1
Camoufox beta.33 is built on Firefox 157.0.1 (was 157.0).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Pin Firefox 158.0
Camoufox beta.33 is built on Firefox 158.0 (was 157.0.1).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Port the Playwright bootstrap patch to Firefox 158
Firefox 158 moved the code under six hunks:
- Bug 2072511 replaced HeadlessWidget::mCompositorWidget with a generic
CompositorWidgetDelegate so the compositor can live in the GPU process.
The screencast snapshot listener now reaches the in-process
HeadlessCompositorWidget through AsHeadlessCompositorWidget().
- Bug 2071024 added movementX/movementY to SynthesizeMouseEventData and
changed the mMovement coalescing check; jugglerEventId and the drag
event synthesis sit beside the new code.
- Bug 1688932 took bit 25 of nsIWebBrowserChrome's chrome flags for
CHROME_MEDIA_PIP. JUGGLER_WINDOW_EXPLICIT_SIZE keeps bit 26, the last
free one.
- Bug 2070965 made UserAgentOverride an nsCString, which moved the
context of the BrowsingContext field-namespace hunk.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Refresh camoufox-window-module.patch context for Firefox 158
Bug 2070772 removed PartnerLinkAttribution.sys.mjs from browser/modules,
so the module list hunk applied only with fuzz. The change is the same.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Port config.patch to Firefox 158's top-level moz.build
Bug 2070828 appended the SBOM GeneratedFile block to the end of the
top-level moz.build, where config.patch adds the lw directory. The lw
directory is still appended last.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Port the worker userAgent override to Firefox 158's nsCString
Bug 2070965 made WorkerNavigator::GetUserAgent take an nsCString, so the
navigator.userAgent override assigns the UTF-8 config value directly
instead of converting it to UTF-16.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Port font-hijacker.patch to Firefox 158's gfx/thebes/moz.build
Bug 2070824 appended license declarations to gfx/thebes/moz.build after
the line the camoucfg include followed. The include is still appended
at the end of the file.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Port the network geolocation override to Firefox 158
Bug 2060572 moved the request's logging into the try block and made it
throw first when geo.provider.network.url is unset. The CAMOU_CONFIG
coordinates are now chosen before that check, so a configured location
is reported without depending on the provider URL, as on Firefox 156.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Port the per-context userAgent to Firefox 158's nsACString getters
Bug 2070965 made Navigator::GetUserAgent and WorkerNavigator::GetUserAgent
return UTF-8 and collapsed the window's custom user agent lookup. The
per-context value is still checked first in both getters and is
converted from the UTF-16 it is stored as.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Refresh screen-spoofing.patch context for Firefox 158
nsRFPService::GetSpoofedStorageLimit, next to the declaration the patch
changes, now returns int64_t, so the hunk applied only with fuzz. The
change is the same.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Refresh sessionstore-popup-close-crash.patch context for Firefox 158
Firefox 158 documented SessionStore.maybeDontRestoreTabs with a JSDoc
block, so the guard applied only with fuzz. The guard is unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Port webrtc-ip-spoofing.patch's include to Firefox 158
Bug 2072208 removed NS_PRINTING and the nsIPrintSettings.h include that
followed xpcpublic.h in nsGlobalWindowInner.cpp. WebRTCIPManager.h is
still included after xpcpublic.h.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Qualify webgl-spoofing's dom names in ClientWebGLContext.cpp
ClientWebGLContext.cpp declares no 'using namespace mozilla::dom'. It
compiled on Firefox 157 only because CanvasImageCache.cpp, earlier in the
same unified dom/canvas chunk, did. Bug 2048943 removed that directive
ahead of renaming nsRange to dom::Range, so the patch now names
RoverfoxStorageManager, WorkerPrivate and WebGLParamsManager with their
dom:: namespace.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Record Firefox 158.0's content-accessible files and chrome names
The contentaccessible-parity guard compares a build against what stock
Firefox of the same version exposes to pages, and refuses a manifest
recorded from another release. Regenerated with
scripts/gen-contentaccessible-manifest.py from the official 158.0 Linux
x86_64 build (BuildID 20261007201254). Among the changes, Firefox 158 no
longer registers the extra-themes-previews resource host (bug 1990883
removed colorways).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Claim EXT_polygon_offset_clamp where Firefox 158 exposes it
Bug 1854003 added EXT_polygon_offset_clamp to WebGL1 and WebGL2 wherever
the GL backend clamps polygon offsets (GLFeature::polygon_offset_clamp:
GL 4.6, ARB_ or EXT_polygon_offset_clamp). fpgen's records come from
Firefox 146, so no identity claimed it, and stock-gpu-parity found stock
158.0 exposing it on this Linux host where Camoufox did not.
- Windows: ANGLE's D3D11 backend sets polygonOffsetClampEXT from feature
level 10_0 (renderer11_utils.cpp), which WebGL2 needs, so devices with
WebGL2 claim it.
- Linux: Mesa (radeonsi, llvmpipe on this host, in GL and GLES contexts)
and NVIDIA's GL 4.6 driver expose it. Recordings from a desktop GL
profile, marked by EXT_depth_clamp (96.6% of Linux records), claim it;
the GLES-only records keep what the device reported.
- macOS: release builds keep webgl.disable-angle and run WebGL on CGL's
GL 4.1, which lacks it. Metal ANGLE is Nightly-only (bug 2072535).
Both launchers place it in Firefox's alphabetical extension order.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Expect EXT_polygon_offset_clamp from the backends Firefox 158 adds it on
The converter and draft-extension tests hard-coded Firefox 156's backend
extensions. The GTX 980 Linux fixture's expected lists now include
EXT_polygon_offset_clamp in Firefox's order, and the Windows device with
WebGL2 expects it beside EXT_depth_clamp; every other assertion is
unchanged. A new test derives the expectation for 100 draws per OS from
each draw itself: Windows devices with WebGL2, Linux desktop GL
recordings, never macOS.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Gate-Change: Firefox 158 (bug 1854003) exposes EXT_polygon_offset_clamp where GLFeature::polygon_offset_clamp holds, and ANGLE D3D11 sets it from feature level 10_0; verified in the 158.0 source (dom/canvas/WebGLExtensions.cpp, gfx/gl/GLContextFeatures.cpp, third_party/angle renderer11_utils.cpp) and by stock-gpu-parity against stock 158.0 on this host
* Follow Firefox 158's WebSocket frame callbacks in Juggler
Bug 1719394 added the HTTP channel ID to
nsIWebSocketEventListener.frameReceived and frameSent, ahead of the
frame. Juggler's listener still took (serialID, frame), so it read the
channel ID as the frame, found no opCode and dropped every frame:
Playwright's framereceived and framesent events never fired
(test_websocket.py::test_should_emit_frame_events and
test_should_reject_wait_for_event_on_close_and_error failed on 158 and
pass on 156.0.1). The listener now takes the new argument.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Key Juggler's pending promises by their Debugger.Object
Bug 2044184 removed Debugger.Object.promiseID in Firefox 158. Juggler
keyed the promises it awaits by it, so every pending promise shared the
key undefined: a second awaited evaluate overwrote the first, which then
never resolved. Playwright waits that poll in the page (waitForElementState,
selectText waiting for visibility) hung whenever another evaluate
returning a promise ran meanwhile. The Debugger.Object is unique per
promise within the debugger and serves as the key instead.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Keep the environment out of forked children's command lines
Firefox's setproctitle() marks the end of the old argv space so the
kernel shows only the new title, then copies the environment strings
right after the title, inside that space. When an environment string's
null lands on the marker, the kernel shows the whole space: the title
followed by the environment. Whether it does depends only on the length
of the install path and of the environment, so it is rare in stock
Firefox. The Firefox 158 package at the parity harness's path hit it on
the RDD process, whose /proc/PID/cmdline then ended in the launching
shell's environment instead of 'rdd'. The marker is set again after the
copy; it lies outside /proc/PID/environ, which is unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The launcher pins overlay versus classic scrollbars per identity, but
the scrollbars were still drawn by the host build's theme. On a Linux
host a Windows 10 identity's classic gutter measured 12 px (GTK's);
stock Firefox on Windows measures 17. For a Windows identity on a
non-Windows host the launchers now select Windows' non-native
scrollbar style (Windows 10 or 11, following ui.useOverlayScrollbars),
at Windows' own size rather than the host's system metric. A Linux or
macOS identity, and any identity on a Windows host, is left as before.
viewport-no-rdm.py now runs for a Linux and a Windows identity: the
Linux one must show the host theme's non-zero gutter, the Windows one
stock Windows' 17 px. The skiplist's 12 px entries stay right: the
Playwright suite launches the bare binary, which claims no OS.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
A Linux build claiming Windows kept Linux's defaults for prefs a page
or the user can observe: EME was off ("EME has been preffed off" is a
Linux-only message), middle click pasted the X11 primary selection,
double-click left out the trailing space, fullscreen was instant,
<select> popups ignored page styling, and scrollbar track clicks
followed GTK.
The launchers now set Firefox's Windows defaults for these
(windowsBehaviourPrefs in launcher-constants.json, shared by the
Python and TypeScript launchers) when a Windows identity runs on a
non-Windows host, where upstream did nothing. Caller-supplied values
still win. Each one was checked against 156.0.1's all.js, firefox.js
and StaticPrefList.yaml and still differs between the Windows and GTK
builds, the fullscreen transition included: GTK builds default to
"0 0" there, so it is not redundant now that camoufox.cfg no longer
sets it.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
A Linux build claiming Windows edited text the GTK way, which both the
user and the page could tell: Alt+Backspace did not undo, Shift+Delete
with nothing selected did nothing, Ctrl+Up in a textarea moved up a line
instead of to its start, Ctrl+/ selected all, Ctrl+Backspace on a rich
text selection deleted only the selection, and AltGr reported keyCode
225 where Windows reports 18.
windows-keyboard.patch switches on config input:windowsKeyboard, which
the launcher sets for Windows identities on a non-Windows host, where
upstream did nothing. The shortcut tables are Windows' own, built from
the same definitions file with the Windows platform macros; GTK's
native text bindings are skipped, including the emulated ones that
synthesized (Playwright) key events get from GetEditCommandsForTests;
AltGr reports Alt and HTML editors take Windows' caret style. Without
the key, or with it false, behaviour is unchanged. The key is
launch-wide: the shortcut tables and GTK's key handling are
process-level. The patch relies on touchscreen-fingerprint-spoofing
for /camoucfg in dom/events and was re-derived on 156.
The windows-keyboard guard checks each behaviour for a Windows and a
Linux identity, with real X11 keys where only a native event exercises
the code, so the parity leg installs xdotool and setxkbmap.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The last bit of these differs between glibc (or fdlibm) and the
Windows CRT, so one call told a page that a build claiming Windows ran
on Linux: against stock 152.0.4 on Windows, sin differed on 22, cos on
26 and tan on 30 of 1,670 inputs, pow on 45 of 1,410.
windows-crt-math.patch adds javascript.options.use_ucrt_math, which
routes them to ports of ucrtbase.dll's FMA3 code path
(browser/additions/js/src/builtin/UcrtMath*.c), keeping SpiderMonkey's
own pow fast paths. On 156 the pow hook sits in pow_libm_or_fdlibm, the
one place both callers already reach the platform pow. It is built
only for 64-bit non-Windows targets, without FP contraction. The
launcher turns it on for Windows identities on a non-Windows host,
where upstream did nothing; the TypeScript launcher does the same.
browser/tests/ucrt-math checks the C alone against ucrtbase.dll on
~127,000 results in the static job. The windows-crt-math guard checks
the browser against stock Windows Firefox cold, JIT-hot and constant
folded, with a pref-off control that must differ; a missing result
counts as a difference.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
With headless="virtual", NewBrowser and AsyncNewBrowser start Xvfb
first, and only sync/async_attach_vd ties its kill() to closing the
browser. Anything that raised in between -- launch_options() on a bad
proxy or unsatisfiable constraints, the Playwright launch on a missing
binary -- left one Xvfb and its /tmp/.X<n> lock behind per failed
launch. Both now kill the display on any exception before re-raising,
as the TypeScript launcher already does.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
public_ip() probed each IP service with a 5 s timeout whether or not
it went through a proxy, and proxy_exit_geo() used 10 s. A proxied
probe adds a hop and a TLS handshake behind it, so a proxy that routes
the long way round timed out on every URL and failed the whole launch.
Lookups through a proxy now get 15 s; direct ones keep 5 s. The
TypeScript launcher sizes its per-proxy clients the same way.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
add_default_addons() took `with Lock():` on a multiprocessing.Lock made
fresh for each call, which guarded nothing: two launches in one process
both found no manifest.json and both downloaded and extracted uBO into
the same directory. The lock is now one threading.Lock for the module.
A launch in another process does not see that lock, and it trusts any
addon directory holding a manifest.json. Extraction now goes into a
sibling temp directory that is renamed into place last, so the manifest
never appears before the rest of the addon.
The TypeScript launcher serializes the same check-then-extract on one
promise chain and extracts the same way.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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>
In both Python and TypeScript launchers, IP validation used loose regular
expressions that allowed octets above 255 for IPv4 (e.g. 999.999.999.999)
and malformed colon sequences for IPv6 (e.g. :, :::, 1::2::3).
Downstream, these invalid addresses reached WebRTC init script generation
and MaxMind DB lookups, causing broken script calls or unhandled errors
instead of rejecting them early with InvalidIP.
Replaced the regex checks with ipaddress in Python and node:net in
TypeScript, and added test cases covering the boundary strings.
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>
Both launchers hard-coded Firefox 156's GetSpoofedScreenAvailSize offsets
(48 Windows, 76 macOS, 0 Linux) and the collapsed touch-point count. They now
read them from the shared constants file, as the other values both launchers
use already do.
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>
- 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>
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>