Commit Graph
7 Commits
Author SHA1 Message Date
Jake Writer f30f6e8368 Merge pull request #912 from JWriter20/feat/virtual-gpu-display
Add headless="virtual-gpu": render on a named GPU with no monitor attached
2026-10-19 01:51:33 +00:00
Jake WriterandClaude Opus 5.5 9f94b0ea46 Stop Xvfb when the process that launched it dies (#868)
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>
2026-10-16 13:31:03 -06:00
Jake WriterandClaude Opus 5.5 813d9bb199 Behave as on an IPv4-only network when the host's IPv6 disagrees with geoip (#857)
* 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>
2026-10-15 20:41:50 +00:00
Jake WriterandClaude Opus 5.5 ee9e3185f2 Fix CI review findings: deterministic proxy skips, shipped fontconfig as a browser input, doc links and paths
- 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>
2026-10-09 13:39:02 -06:00
Jake Writer d9fa53e96b fix: ensuring documentation matches behavior for pinning 2026-10-08 19:59:50 -06:00
Jake WriterandClaude Opus 5.5 159aebedac Claim the host's GPU on its own OS, cover canvas and WebGPU on another, and follow Firefox 156 for browser-owned GPU values
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>
2026-10-08 19:08:30 -06:00
Jake Writer 658806eb23 chore: major code cleanup/refactor 2026-10-06 19:10:22 -06:00