mirror of
https://github.com/daijro/camoufox.git
synced 2026-11-19 00:07:28 +00:00
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>
13 lines
473 B
Python
13 lines
473 B
Python
import pytest
|
|
|
|
|
|
@pytest.fixture(autouse=True)
|
|
def no_host_gpu_probe(monkeypatch):
|
|
"""launch_options launches the browser to read the host's GPU when an
|
|
identity claims the host's OS. This suite has no browser, and its results
|
|
must not depend on the machine running it, so the host reads as having no
|
|
WebGL. Tests of the probe's consumers patch it themselves."""
|
|
from camoufox import utils
|
|
|
|
monkeypatch.setattr(utils, 'host_gpu', lambda *args: None)
|