Detect me if you can: Chromium source level patches for anti fingerprinting

Your browser rats you out. Chromium source patches to make the fingerprinting scripts work a little harder.

A website can ask your browser to make a sound it never plays, then use the resulting numbers to help recognize it. Audio fingerprinting needs neither microphone access nor working speakers. The browser is doing arithmetic.

Fingerprint’s explanation shows how small differences in that arithmetic distinguish browser implementations. Its linked demo turns a synthesized signal into one fingerprint number. The captures below use that recipe in local, unpatched Chromium, Firefox, and WebKit.

Patch 0015 adds a tiny offset derived from an identity seed to the returned samples. Changing the seed changes the simulated fingerprint. A known-silent buffer reveals the same additive pattern; subtracting it restores the original fingerprint in these tests.

Fixed audio noise can be calibrated away
The waveforms are recorded; noise and calibration are simulated. Lower axes magnify changes in the scalar fingerprint, in millionths. Known-zero calibration restores the original fingerprint in these tests. No patched browser build was run.

Actual local unpatched Chromium, Firefox and WebKit waveforms use the linked demo recipe. Lower rows show magnified simulated fingerprint shifts and recovery after known-zero calibration. All 500 hashed samples recover exactly for all eight tested seeds per engine. No patched browser build was run.

View source values
Seed 2; sum |samples 4500–4999|. Recorded inputs, simulated noise and calibration.
Local engineRecorded fingerprintSimulated fingerprintRecovered fingerprintExact samples recovered
Chromium 151.0.7922.34124.04347745512496124.04351337506523124.04347745512496500/500
Firefox 153.035.74996626004576735.75000236805499335.749966260045767500/500
WebKit 26.5124.04346468483709124.04350060477736124.04346468483709500/500
Seed 2; sum |samples 4500–4999|. Recorded inputs, simulated noise and calibration.
Local engineRecorded fingerprintSimulated fingerprintRecovered fingerprintExact samples recovered
Chromium 151.0.7922.34124.04347745512496124.04351337506523124.04347745512496500/500
Firefox 153.035.74996626004576735.75000236805499335.749966260045767500/500
WebKit 26.5124.04346468483709124.04350060477736124.04346468483709500/500

The noise leaves a repeatable pattern for a detector to measure and remove. That is the cat-and-mouse problem behind the rest of this patch series.

Stealth Chromium is my public collection of Chromium source patches for these surfaces. The detection ideas are loosely based on Antoine Vastel’s fpscanner and other publicly known methods. The series covers more than audio, including graphics, device reporting, automation signals, and cross-surface consistency.

BotStop result showing a HUMAN verdict, a suspicion score of 0 out of 100, 34 of 38 signals clean, and zero triggered. Proxy and VPN checks are not tested.

A BotStop snapshot: HUMAN, 0/100 suspicion, 34/38 signals clean and none triggered.

Why change Chromium itself?

A JavaScript shim replaces what page code sees. That introduces another thing to inspect: the replacement function, its property descriptor, or a context where the shim never ran. Source changes let the ordinary browser implementation return the altered value, without installing a page-level replacement function.

That moves the maintenance work into Blink, browser-process configuration, graphics, networking, and V8. It also makes the limitations harder to ignore. Reporting a different GPU does not install that GPU. Advertising a codec does not supply its encoder. A plausible set of getters still needs to survive actual use.

The organizing idea is one decimal 64-bit identity seed. Deterministic values derive from that seed and a purpose label, so the canvas and GPU can use separate derivations without choosing a fresh identity on every read. A browser launch without an explicit seed mints one. Pinning the seed makes those derivations repeatable; host rendering and other unpatched inputs can still affect the result.

Identity and process plumbing

These three patches establish the shared identity. They do not hide a fingerprint on their own.

0001: Shared fingerprint helpers

The core header defines switch parsing, purpose-specific hashing, deterministic noise streams, and the common enable/noise gates. Stable local hashing avoids depending on an implementation-specific standard-library hash. This is reproducibility machinery, not a cryptographic anonymity scheme. Whether a particular surface obeys the gate depends on its call site.

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Stealth Chromium contributors
Date: Thu, 1 Jan 2026 00:00:00 +0000
Subject: [PATCH 1/33] fingerprint: core helpers and --fingerprint* switch constants
X-Spec: patches/01-identity-seed.md, patches/02-switches-and-propagation.md
X-Files: third_party/blink/public/common/switches.h third_party/blink/common/switches.cc third_party/blink/public/common/fingerprint/fingerprint.h

---

--- a/third_party/blink/public/common/switches.h
+++ b/third_party/blink/public/common/switches.h
@@ -58,6 +58,36 @@
 BLINK_COMMON_EXPORT extern const char kWebAudioBypassOutputBufferingOptOut[];
 BLINK_COMMON_EXPORT extern const char kDisableReduceAcceptLanguage[];
 BLINK_COMMON_EXPORT extern const char kXSLTEnabledPolicy[];
+
+// --- begin fingerprint patch set (Stealth Chromium) -------------------------------
+// Identity-seed driven anti-fingerprinting switches. Declared here so that
+// blink renderer code, content and chrome can all reference them. Definitions
+// live in third_party/blink/common/switches.cc, semantics are documented in
+// the Stealth Chromium series (series/0001-fingerprint-core.patch).
+BLINK_COMMON_EXPORT extern const char kFingerprint[];
+BLINK_COMMON_EXPORT extern const char kFingerprintBrand[];
+BLINK_COMMON_EXPORT extern const char kFingerprintBrandVersion[];
+BLINK_COMMON_EXPORT extern const char kFingerprintDeviceMemory[];
+BLINK_COMMON_EXPORT extern const char kFingerprintFontsDir[];
+BLINK_COMMON_EXPORT extern const char kFingerprintGpuRenderer[];
+BLINK_COMMON_EXPORT extern const char kFingerprintGpuVendor[];
+BLINK_COMMON_EXPORT extern const char kFingerprintHardwareConcurrency[];
+BLINK_COMMON_EXPORT extern const char kFingerprintLocale[];
+BLINK_COMMON_EXPORT extern const char kFingerprintLocation[];
+BLINK_COMMON_EXPORT extern const char kFingerprintNoise[];
+BLINK_COMMON_EXPORT extern const char kFingerprintPlatform[];
+BLINK_COMMON_EXPORT extern const char kFingerprintPlatformVersion[];
+BLINK_COMMON_EXPORT extern const char kFingerprintScreenHeight[];
+BLINK_COMMON_EXPORT extern const char kFingerprintScreenWidth[];
+BLINK_COMMON_EXPORT extern const char kFingerprintStorageQuota[];
+BLINK_COMMON_EXPORT extern const char kFingerprintTaskbarHeight[];
+BLINK_COMMON_EXPORT extern const char kFingerprintTimezone[];
+BLINK_COMMON_EXPORT extern const char kFingerprintWebrtcIp[];
+BLINK_COMMON_EXPORT extern const char kFingerprintingCanvasImageDataNoise[];
+BLINK_COMMON_EXPORT extern const char kFingerprintingCanvasMeasureTextNoise[];
+BLINK_COMMON_EXPORT extern const char kFingerprintingClientRectsNoise[];
+// --- end fingerprint patch set -------------------------------------------------
+
 }  // namespace switches
 }  // namespace blink
 
--- a/third_party/blink/common/switches.cc
+++ b/third_party/blink/common/switches.cc
@@ -168,5 +168,35 @@
 // A switch that controls XSLT availability via enterprise policy.
 const char kXSLTEnabledPolicy[] = "xslt-enabled-policy";
 
+
+// --- begin fingerprint patch set (Stealth Chromium) ----------------------------------
+// Values are documented alongside their consumers in the Stealth Chromium series.
+const char kFingerprint[] = "fingerprint";
+const char kFingerprintBrand[] = "fingerprint-brand";
+const char kFingerprintBrandVersion[] = "fingerprint-brand-version";
+const char kFingerprintDeviceMemory[] = "fingerprint-device-memory";
+const char kFingerprintFontsDir[] = "fingerprint-fonts-dir";
+const char kFingerprintGpuRenderer[] = "fingerprint-gpu-renderer";
+const char kFingerprintGpuVendor[] = "fingerprint-gpu-vendor";
+const char kFingerprintHardwareConcurrency[] = "fingerprint-hardware-concurrency";
+const char kFingerprintLocale[] = "fingerprint-locale";
+const char kFingerprintLocation[] = "fingerprint-location";
+const char kFingerprintNoise[] = "fingerprint-noise";
+const char kFingerprintPlatform[] = "fingerprint-platform";
+const char kFingerprintPlatformVersion[] = "fingerprint-platform-version";
+const char kFingerprintScreenHeight[] = "fingerprint-screen-height";
+const char kFingerprintScreenWidth[] = "fingerprint-screen-width";
+const char kFingerprintStorageQuota[] = "fingerprint-storage-quota";
+const char kFingerprintTaskbarHeight[] = "fingerprint-taskbar-height";
+const char kFingerprintTimezone[] = "fingerprint-timezone";
+const char kFingerprintWebrtcIp[] = "fingerprint-webrtc-ip";
+const char kFingerprintingCanvasImageDataNoise[] =
+    "fingerprinting-canvas-image-data-noise";
+const char kFingerprintingCanvasMeasureTextNoise[] =
+    "fingerprinting-canvas-measuretext-noise";
+const char kFingerprintingClientRectsNoise[] =
+    "fingerprinting-client-rects-noise";
+// --- end fingerprint patch set --------------------------------------------------
+
 }  // namespace switches
 }  // namespace blink
--- /dev/null
+++ b/third_party/blink/public/common/fingerprint/fingerprint.h
@@ -0,0 +1,211 @@
+// Copyright 2026 The Stealth Chromium Authors
+// Use of this source code is governed by a GPLv3 license that can be
+// found in the LICENSE file of the Stealth Chromium distribution.
+
+#ifndef THIRD_PARTY_BLINK_PUBLIC_COMMON_FINGERPRINT_FINGERPRINT_H_
+#define THIRD_PARTY_BLINK_PUBLIC_COMMON_FINGERPRINT_FINGERPRINT_H_
+
+#include <cstdint>
+#include <optional>
+#include <string>
+#include <string_view>
+
+#include "base/command_line.h"
+#include "base/no_destructor.h"
+#include "base/strings/string_number_conversions.h"
+#include "base/strings/string_util.h"
+#include "third_party/blink/public/common/switches.h"
+
+// Identity-seed driven anti-fingerprinting core.
+//
+// One 64-bit identity seed (--fingerprint, decimal ASCII) drives every
+// deterministic spoof in the Stealth Chromium series. When the seed is absent the
+// browser process mints a random one at startup (see
+// ChromeMainDelegate::BasicStartupComplete), so fingerprinting is on by
+// default; passing --fingerprint=off (also false/0/disable/disabled) turns
+// the whole system off and every helper below degrades to "return nothing",
+// at which point call sites fall back to stock Chromium behavior.
+//
+// Hash derivation here is deliberately our own (FNV-1a + splitmix64): it is
+// stable across libc++ versions and platforms, unlike std::hash<std::string>.
+// Exact output values are therefore not identical to any other
+// implementation; only determinism per (seed, purpose) is guaranteed.
+namespace blink::fingerprint {
+
+// True unless --fingerprint is absent-and-unminted or set to an explicit
+// off-value. The browser process always mints a seed, so in practice this is
+// false only for explicit opt-out or in unit tests that never set the switch.
+inline bool Enabled() {
+  static const bool enabled = [] {
+    const base::CommandLine& cmd = *base::CommandLine::ForCurrentProcess();
+    if (!cmd.HasSwitch(switches::kFingerprint)) {
+      return false;
+    }
+    const std::string value = base::ToLowerASCII(
+        cmd.GetSwitchValueASCII(switches::kFingerprint));
+    return value != "off" && value != "false" && value != "0" &&
+           value != "disable" && value != "disabled";
+  }();
+  return enabled;
+}
+
+// Parsed identity seed; nullopt when fingerprinting is disabled. Cached:
+// the command line is immutable by the time renderer code runs.
+inline std::optional<uint64_t> Seed() {
+  static const base::NoDestructor<std::optional<uint64_t>> seed([] {
+    if (!Enabled()) {
+      return std::optional<uint64_t>();
+    }
+    const std::string value = base::CommandLine::ForCurrentProcess()
+                                  ->GetSwitchValueASCII(switches::kFingerprint);
+    uint64_t parsed = 0;
+    if (!base::StringToUint64(value, &parsed)) {
+      return std::optional<uint64_t>();
+    }
+    return std::optional<uint64_t>(parsed);
+  }());
+  return *seed;
+}
+
+// Raw seed string ("" when disabled) — for hashing contexts that want the
+// original decimal text.
+inline std::string SeedString() {
+  if (!Seed()) {
+    return std::string();
+  }
+  return base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
+      switches::kFingerprint);
+}
+
+// The noise family (canvas/measureText/clientRects/audio) is gated by
+// --fingerprint-noise; only the literal value "false" opts out.
+inline bool NoiseEnabled() {
+  static const bool enabled = [] {
+    if (!Enabled()) {
+      return false;
+    }
+    return base::CommandLine::ForCurrentProcess()
+               ->GetSwitchValueASCII(switches::kFingerprintNoise) != "false";
+  }();
+  return enabled;
+}
+
+// Spoofed desktop platform from --fingerprint-platform
+// ("windows"|"macos"|"linux"; anything else means no platform spoof).
+enum class Platform { kNone, kWindows, kMacOs, kLinux };
+
+inline Platform SpoofedPlatform() {
+  static const Platform platform = [] {
+    const std::string value = base::ToLowerASCII(
+        base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
+            switches::kFingerprintPlatform));
+    if (value == "windows") {
+      return Platform::kWindows;
+    }
+    if (value == "macos" || value == "darwin") {
+      return Platform::kMacOs;
+    }
+    if (value == "linux") {
+      return Platform::kLinux;
+    }
+    return Platform::kNone;
+  }();
+  return platform;
+}
+
+// FNV-1a 64-bit over bytes; stable and dependency-free.
+inline uint64_t Hash(std::string_view text) {
+  uint64_t hash = 1469598103934665603ULL;  // FNV-1a 64 offset basis
+  for (const char c : text) {
+    hash ^= static_cast<uint8_t>(c);
+    hash *= 1099511628211ULL;  // FNV-1a 64 prime
+  }
+  return hash;
+}
+
+// splitmix64 finalizer — turns lumpy hashes into uniform ones.
+inline uint64_t Mix(uint64_t x) {
+  x += 0x9E3779B97F4A7C15ULL;
+  x = (x ^ (x >> 30)) * 0xBF58476D1CE4E5B9ULL;
+  x = (x ^ (x >> 27)) * 0x94D049BB133111EBULL;
+  return x ^ (x >> 31);
+}
+
+// Deterministic 64-bit value for a purpose string; identical seeds derive
+// identical values, different purposes derive independent values.
+inline uint64_t HashFor(std::string_view purpose) {
+  const std::string key = SeedString() + ":" + std::string(purpose);
+  return Mix(Hash(key));
+}
+
+// Deterministic double in [0, 1) for a purpose string.
+inline double RandomFor(std::string_view purpose) {
+  return static_cast<double>(HashFor(purpose) >> 11) *
+         (1.0 / 9007199254740992.0);  // 2^53
+}
+
+// Deterministic integer in [0, bound); bound must be > 0.
+inline uint32_t RandomBelow(std::string_view purpose, uint32_t bound) {
+  return static_cast<uint32_t>(HashFor(purpose) % bound);
+}
+
+// Small linear congruential generator for the noise family, seeded from the
+// identity. Multiplier/increment constants reproduce the vendor LCG
+// (0x17385CA9 / 0x47502932); the emitted sequences are deterministic per
+// seed + salt but not bit-identical to any other build.
+class NoiseLcg {
+ public:
+  explicit NoiseLcg(std::string_view salt)
+      : state_(HashFor(salt) ^ 0x17385CA9ULL) {}
+
+  uint64_t Next() {
+    state_ = state_ * 0x17385CA9ULL + 0x47502932ULL;
+    return state_;
+  }
+
+  // Uniform integer in [0, bound) without modulo bias for small bounds.
+  uint32_t NextBelow(uint32_t bound) {
+    return static_cast<uint32_t>(Next() >> 32) % bound;
+  }
+
+  double NextDouble() {
+    return static_cast<double>(Next() >> 11) * (1.0 / 9007199254740992.0);
+  }
+
+ private:
+  uint64_t state_;
+};
+
+// Switch value parsers shared by several patches. Return fallback when
+// fingerprinting is off or the switch is absent/unparseable.
+inline std::optional<uint64_t> SwitchUint(std::string_view switch_name) {
+  if (!Enabled()) {
+    return std::nullopt;
+  }
+  const std::string value =
+      base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
+          std::string(switch_name));
+  uint64_t parsed = 0;
+  if (value.empty() || !base::StringToUint64(value, &parsed)) {
+    return std::nullopt;
+  }
+  return parsed;
+}
+
+inline std::optional<double> SwitchDouble(std::string_view switch_name) {
+  if (!Enabled()) {
+    return std::nullopt;
+  }
+  const std::string value =
+      base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
+          std::string(switch_name));
+  double parsed = 0.0;
+  if (value.empty() || !base::StringToDouble(value, &parsed)) {
+    return std::nullopt;
+  }
+  return parsed;
+}
+
+}  // namespace blink::fingerprint
+
+#endif  // THIRD_PARTY_BLINK_PUBLIC_COMMON_FINGERPRINT_FINGERPRINT_H_

Original source.

0002: Mint the seed once

Browser startup creates a random identity seed when the launcher has not supplied one. Child processes should inherit that identity rather than independently inventing theirs. Keeping a seed across launches gives repeatable derived values; changing it can also give a detector a history of fingerprint changes to correlate.

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Stealth Chromium contributors
Date: Thu, 1 Jan 2026 00:00:00 +0000
Subject: [PATCH 2/33] fingerprint: mint random identity seed at browser startup
X-Spec: patches/01-identity-seed.md
X-Files: chrome/app/chrome_main_delegate.cc

---

--- a/chrome/app/chrome_main_delegate.cc
+++ b/chrome/app/chrome_main_delegate.cc
@@ -29,6 +29,8 @@
 #include "base/process/process.h"
 #include "base/process/process_handle.h"
 #include "base/profiler/thread_group_profiler.h"
+#include "base/rand_util.h"
+#include "base/strings/string_number_conversions.h"
 #include "base/strings/string_util.h"
 #include "base/strings/sys_string_conversions.h"
 #include "base/strings/utf_string_conversions.h"
@@ -92,6 +94,7 @@
 #include "extensions/buildflags/buildflags.h"
 #include "net/http/http_cache.h"
 #include "net/url_request/url_request.h"
+#include "third_party/blink/public/common/switches.h"
 #include "pdf/buildflags.h"
 #include "printing/buildflags/buildflags.h"
 #include "services/tracing/public/cpp/stack_sampling/tracing_sampler_profiler.h"
@@ -1055,6 +1058,20 @@
   const base::CommandLine& command_line =
       *base::CommandLine::ForCurrentProcess();
 
+  // Stealth Chromium: mint the per-session identity seed. Every deterministic
+  // spoof downstream derives from this single value; when the launcher does
+  // not pin one (--fingerprint=<decimal u64>) a fresh random identity is
+  // used for this session. Children inherit it via the renderer switch
+  // propagation table, so only the browser process mints.
+  if (!command_line.HasSwitch(switches::kProcessType) &&
+      !command_line.HasSwitch(blink::switches::kFingerprint)) {
+    uint64_t fingerprint_seed = 0;
+    base::RandBytes(&fingerprint_seed, sizeof(fingerprint_seed));
+    base::CommandLine::ForCurrentProcess()->AppendSwitchNative(
+        blink::switches::kFingerprint,
+        base::NumberToString(fingerprint_seed));
+  }
+
   // Only allow disabling web security via the command-line flag if the user has
   // specified a distinct profile directory. This still enables tests to disable
   // web security by setting the kWebKitWebSecurityEnabled pref directly.

Original source.

0003: Carry identity into renderers

The renderer-process switch allowlist carries the seed and surface overrides into Blink. Without that plumbing, the browser process could send one persona in headers while the renderer exposes another to JavaScript. This patch covers the renderer launch path; it is not evidence that every utility process and execution context has been audited.

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Stealth Chromium contributors
Date: Thu, 1 Jan 2026 00:00:00 +0000
Subject: [PATCH 3/33] fingerprint: propagate fingerprint switches to renderer processes
X-Spec: patches/02-switches-and-propagation.md
X-Files: content/browser/renderer_host/render_process_host_impl.cc

---

--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -3709,6 +3709,29 @@
       switches::kEnableWebGLImageChromium,
       switches::kEnableWebGPUDeveloperFeatures,
       switches::kFileUrlPathAlias,
+      // Stealth Chromium: identity-seed switches consumed inside the renderer.
+      blink::switches::kFingerprint,
+      blink::switches::kFingerprintBrand,
+      blink::switches::kFingerprintBrandVersion,
+      blink::switches::kFingerprintDeviceMemory,
+      blink::switches::kFingerprintFontsDir,
+      blink::switches::kFingerprintGpuRenderer,
+      blink::switches::kFingerprintGpuVendor,
+      blink::switches::kFingerprintHardwareConcurrency,
+      blink::switches::kFingerprintLocale,
+      blink::switches::kFingerprintLocation,
+      blink::switches::kFingerprintNoise,
+      blink::switches::kFingerprintPlatform,
+      blink::switches::kFingerprintPlatformVersion,
+      blink::switches::kFingerprintScreenHeight,
+      blink::switches::kFingerprintScreenWidth,
+      blink::switches::kFingerprintStorageQuota,
+      blink::switches::kFingerprintTaskbarHeight,
+      blink::switches::kFingerprintTimezone,
+      blink::switches::kFingerprintWebrtcIp,
+      blink::switches::kFingerprintingCanvasImageDataNoise,
+      blink::switches::kFingerprintingCanvasMeasureTextNoise,
+      blink::switches::kFingerprintingClientRectsNoise,
       switches::kForceDeviceScaleFactor,
       switches::kForceDisplayColorProfile,
       switches::kForceHighContrast,

Original source.

Hardware and the claimed desktop

A platform claim reaches beyond the user-agent string. Memory, screen geometry, language, and exposed capabilities can all contradict it.

0004: Reported device memory

The navigator getter reports an explicit memory override, otherwise eight GiB when a seed is present. It changes the reported value, not the memory available to the process. The override accepts positive values without applying Chromium’s usual bucketing, so an implausible launcher value can create a detection signal.

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Stealth Chromium contributors
Date: Thu, 1 Jan 2026 00:00:00 +0000
Subject: [PATCH 4/33] fingerprint: navigator.deviceMemory override
X-Spec: patches/07-device-memory.md
X-Files: third_party/blink/renderer/core/frame/navigator_device_memory.cc

---

--- a/third_party/blink/renderer/core/frame/navigator_device_memory.cc
+++ b/third_party/blink/renderer/core/frame/navigator_device_memory.cc
@@ -4,7 +4,10 @@
 
 #include "third_party/blink/renderer/core/frame/navigator_device_memory.h"
 
+#include <cmath>
+
 #include "third_party/blink/public/common/device_memory/approximated_device_memory.h"
+#include "third_party/blink/public/common/fingerprint/fingerprint.h"
 #include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-shared.h"
 #include "third_party/blink/renderer/core/dom/document.h"
 #include "third_party/blink/renderer/core/frame/local_dom_window.h"
@@ -12,6 +15,16 @@
 namespace blink {
 
 float NavigatorDeviceMemory::deviceMemory() const {
+  // Stealth Chromium: unbucketed override (launcher passes a realistic bucketed
+  // value); 8 GiB persona default when only the identity seed is present.
+  if (auto gb = fingerprint::SwitchDouble(switches::kFingerprintDeviceMemory)) {
+    if (*gb > 0.0 && !std::isnan(*gb)) {
+      return static_cast<float>(*gb);
+    }
+  }
+  if (fingerprint::Seed()) {
+    return 8.0f;
+  }
   return ApproximatedDeviceMemory::GetApproximatedDeviceMemory();
 }
 

Original source.

0005: Reported hardware concurrency

The hardware-concurrency getter accepts an override and otherwise reports eight logical processors for a seeded identity. That avoids exposing the host’s count through this getter. Scheduling behavior and throughput still depend on the host; returning eight does not make a small container behave like an eight-thread desktop.

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Stealth Chromium contributors
Date: Thu, 1 Jan 2026 00:00:00 +0000
Subject: [PATCH 5/33] fingerprint: navigator.hardwareConcurrency override
X-Spec: patches/08-hardware-concurrency-cdp.md
X-Files: third_party/blink/renderer/core/frame/navigator_concurrent_hardware.cc

---

--- a/third_party/blink/renderer/core/frame/navigator_concurrent_hardware.cc
+++ b/third_party/blink/renderer/core/frame/navigator_concurrent_hardware.cc
@@ -5,10 +5,22 @@
 #include "third_party/blink/renderer/core/frame/navigator_concurrent_hardware.h"
 
 #include "base/system/sys_info.h"
+#include "third_party/blink/public/common/fingerprint/fingerprint.h"
 
 namespace blink {
 
 unsigned NavigatorConcurrentHardware::hardwareConcurrency() const {
+  // Stealth Chromium: explicit thread-count override; 8-thread persona default
+  // when only the identity seed is present.
+  if (auto count =
+          fingerprint::SwitchUint(switches::kFingerprintHardwareConcurrency)) {
+    if (*count != 0) {
+      return static_cast<unsigned>(*count);
+    }
+  }
+  if (fingerprint::Seed()) {
+    return 8u;
+  }
   return static_cast<unsigned>(base::SysInfo::NumberOfProcessors());
 }
 

Original source.

0006: AudioContext sample rate

The realtime audio destination reports 48 kHz while fingerprinting is enabled. The patch leaves the actual hardware/rendering rate alone. That distinction matters when a page compares the advertised rate with audio processing behavior: the patch changes a reported property, without reproducing another audio device.

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Stealth Chromium contributors
Date: Thu, 1 Jan 2026 00:00:00 +0000
Subject: [PATCH 6/33] fingerprint: report AudioContext.sampleRate as 48000
X-Spec: patches/34-audiocontext-samplerate.md
X-Files: third_party/blink/renderer/modules/webaudio/realtime_audio_destination_handler.cc

---

--- a/third_party/blink/renderer/modules/webaudio/realtime_audio_destination_handler.cc
+++ b/third_party/blink/renderer/modules/webaudio/realtime_audio_destination_handler.cc
@@ -8,6 +8,7 @@
 #include "base/metrics/histogram_macros.h"
 #include "media/base/output_device_info.h"
 #include "third_party/blink/public/common/features.h"
+#include "third_party/blink/public/common/fingerprint/fingerprint.h"
 #include "third_party/blink/public/platform/modules/webrtc/webrtc_logging.h"
 #include "third_party/blink/public/platform/web_audio_latency_hint.h"
 #include "third_party/blink/public/platform/web_audio_sink_descriptor.h"
@@ -190,6 +191,12 @@
 }
 
 double RealtimeAudioDestinationHandler::SampleRate() const {
+  // Stealth Chromium: report the persona rate. 48 kHz is the near-universal
+  // default on Windows (WASAPI shared) and modern Linux (PipeWire); the
+  // real render quantum/hardware rate is untouched.
+  if (fingerprint::Enabled()) {
+    return 48000.0;
+  }
   // This can be accessed from both threads (main and audio), so it is
   // possible that `platform_destination_` is not fully functional when it
   // is accssed by the audio thread.

Original source.

0007: Screen dimensions in JavaScript and CSS

A shared helper feeds screen dimensions to both window.screen and CSS device-size media queries. Explicit dimensions win; persona defaults require both a seed and a platform switch. Available height subtracts the persona’s taskbar or Dock band. Changing the reported screen does not resize the real desktop or viewport.

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Stealth Chromium contributors
Date: Thu, 1 Jan 2026 00:00:00 +0000
Subject: [PATCH 7/33] fingerprint: screen dimensions, taskbar band and media-query consistency
X-Spec: patches/11-screen-dimensions.md
X-Files: third_party/blink/renderer/core/frame/screen.cc third_party/blink/renderer/core/css/media_values.cc third_party/blink/renderer/core/fingerprint/screen_dimensions.h

---

--- a/third_party/blink/renderer/core/frame/screen.cc
+++ b/third_party/blink/renderer/core/frame/screen.cc
@@ -31,6 +31,7 @@
 #include "base/numerics/safe_conversions.h"
 #include "services/network/public/mojom/permissions_policy/permissions_policy_feature.mojom-blink.h"
 #include "third_party/blink/renderer/core/event_target_names.h"
+#include "third_party/blink/renderer/core/fingerprint/screen_dimensions.h"
 #include "third_party/blink/renderer/core/frame/local_dom_window.h"
 #include "third_party/blink/renderer/core/frame/local_frame.h"
 #include "third_party/blink/renderer/core/frame/settings.h"
@@ -81,12 +82,20 @@
 int Screen::height() const {
   if (!DomWindow())
     return 0;
+  // Stealth Chromium: switch override, then persona default (900 on macOS).
+  if (auto h = fingerprint::SpoofedScreenHeight()) {
+    return *h;
+  }
   return GetRect(/*available=*/false).height();
 }
 
 int Screen::width() const {
   if (!DomWindow())
     return 0;
+  // Stealth Chromium: switch override, then persona default (1440 on macOS).
+  if (auto w = fingerprint::SpoofedScreenWidth()) {
+    return *w;
+  }
   return GetRect(/*available=*/false).width();
 }
 
@@ -124,12 +133,26 @@
 int Screen::availHeight() const {
   if (!DomWindow())
     return 0;
+  // Stealth Chromium: spoofed height minus the persona taskbar/Dock band.
+  if (auto h = fingerprint::SpoofedScreenHeight()) {
+    return fingerprint::ApplyTaskbar(*h, fingerprint::TaskbarHeight());
+  }
+  if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+          blink::switches::kFingerprintPlatform)) {
+    // No height spoof, but a platform persona still claims its taskbar.
+    return GetRect(/*available=*/false).height() -
+           fingerprint::ApplyTaskbar(0, fingerprint::TaskbarHeight());
+  }
   return GetRect(/*available=*/true).height();
 }
 
 int Screen::availWidth() const {
   if (!DomWindow())
     return 0;
+  // Stealth Chromium: availWidth mirrors width() (horizontal taskbar assumption).
+  if (auto w = fingerprint::SpoofedScreenWidth()) {
+    return *w;
+  }
   return GetRect(/*available=*/true).width();
 }
 
--- a/third_party/blink/renderer/core/css/media_values.cc
+++ b/third_party/blink/renderer/core/css/media_values.cc
@@ -16,9 +16,11 @@
 #include "third_party/blink/renderer/core/dom/document.h"
 #include "third_party/blink/renderer/core/dom/element.h"
 #include "third_party/blink/renderer/core/execution_context/execution_context.h"
+#include "third_party/blink/renderer/core/fingerprint/screen_dimensions.h"
 #include "third_party/blink/renderer/core/frame/local_frame.h"
 #include "third_party/blink/renderer/core/frame/local_frame_view.h"
 #include "third_party/blink/renderer/core/frame/settings.h"
+#include "third_party/blink/renderer/core/frame/settings.h"
 #include "third_party/blink/renderer/core/layout/adjust_for_absolute_zoom.h"
 #include "third_party/blink/renderer/core/layout/layout_view.h"
 #include "third_party/blink/renderer/core/media_type_names.h"
@@ -164,6 +166,11 @@
 
 int MediaValues::CalculateDeviceWidth(LocalFrame* frame) {
   DCHECK(frame && frame->View() && frame->GetSettings() && frame->GetPage());
+  // Stealth Chromium: media queries see the same spoofed device size as
+  // window.screen, so JS and CSS cannot disagree.
+  if (auto w = fingerprint::SpoofedScreenWidth()) {
+    return *w;
+  }
   const display::ScreenInfo& screen_info =
       frame->GetPage()->GetChromeClient().GetScreenInfo(*frame);
   int device_width = screen_info.rect.width();
@@ -176,6 +183,10 @@
 
 int MediaValues::CalculateDeviceHeight(LocalFrame* frame) {
   DCHECK(frame && frame->View() && frame->GetSettings() && frame->GetPage());
+  // Stealth Chromium: see CalculateDeviceWidth.
+  if (auto h = fingerprint::SpoofedScreenHeight()) {
+    return *h;
+  }
   const display::ScreenInfo& screen_info =
       frame->GetPage()->GetChromeClient().GetScreenInfo(*frame);
   int device_height = screen_info.rect.height();
--- /dev/null
+++ b/third_party/blink/renderer/core/fingerprint/screen_dimensions.h
@@ -0,0 +1,72 @@
+// Copyright 2026 The Stealth Chromium Authors
+// Use of this source code is governed by a GPLv3 license that can be
+// found in the LICENSE file of the Stealth Chromium distribution.
+
+#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_FINGERPRINT_SCREEN_DIMENSIONS_H_
+#define THIRD_PARTY_BLINK_RENDERER_CORE_FINGERPRINT_SCREEN_DIMENSIONS_H_
+
+#include <optional>
+
+#include "third_party/blink/public/common/fingerprint/fingerprint.h"
+
+// Screen-dimension ladder shared by window.screen (core/frame/screen.cc) and
+// CSS media queries (core/css/media_values.cc) so JS and CSS agree.
+//
+// Resolution order per dimension (mirrors the vendor build):
+//   1. --fingerprint-screen-width / --fingerprint-screen-height
+//   2. platform default when both --fingerprint and --fingerprint-platform
+//      are present: macos 1440x900, anything else 1920x1080
+//   3. nullopt → caller falls back to stock behavior
+namespace blink::fingerprint {
+
+inline bool HasPlatformDefault() {
+  return Seed() &&
+         base::CommandLine::ForCurrentProcess()->HasSwitch(
+             switches::kFingerprintPlatform);
+}
+
+inline std::optional<int> SpoofedScreenWidth() {
+  if (auto w = SwitchUint(switches::kFingerprintScreenWidth)) {
+    return static_cast<int>(*w);
+  }
+  if (HasPlatformDefault()) {
+    return SpoofedPlatform() == Platform::kMacOs ? 1440 : 1920;
+  }
+  return std::nullopt;
+}
+
+inline std::optional<int> SpoofedScreenHeight() {
+  if (auto h = SwitchUint(switches::kFingerprintScreenHeight)) {
+    return static_cast<int>(*h);
+  }
+  if (HasPlatformDefault()) {
+    return SpoofedPlatform() == Platform::kMacOs ? 900 : 1080;
+  }
+  return std::nullopt;
+}
+
+// Taskbar/Dock band subtracted from availHeight. 48px on the Windows persona
+// (default taskbar), 95px on macOS (default Dock), 0 otherwise; explicit
+// --fingerprint-taskbar-height wins.
+inline int TaskbarHeight() {
+  if (auto t = SwitchUint(switches::kFingerprintTaskbarHeight)) {
+    return static_cast<int>(*t);
+  }
+  switch (SpoofedPlatform()) {
+    case Platform::kWindows:
+      return 48;
+    case Platform::kMacOs:
+      return 95;
+    default:
+      return 0;
+  }
+}
+
+// availHeight = height - (height > taskbar ? taskbar : 0); never negative.
+inline int ApplyTaskbar(int height, int taskbar) {
+  return height - (height > taskbar ? taskbar : 0);
+}
+
+}  // namespace blink::fingerprint
+
+#endif  // THIRD_PARTY_BLINK_RENDERER_CORE_FINGERPRINT_SCREEN_DIMENSIONS_H_

Original source.

0008: Timezone and change notifications

The timezone controller adopts the configured zone as ICU’s default and uses it when handling host timezone changes. The aim is for Date and Intl to agree instead of replacing one formatted string. This requires an explicit timezone switch, and its switch reader does not consult the common enable gate.

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Stealth Chromium contributors
Date: Thu, 1 Jan 2026 00:00:00 +0000
Subject: [PATCH 8/33] fingerprint: timezone override (ICU default + change events)
X-Spec: patches/19-timezone.md
X-Files: third_party/blink/renderer/core/timezone/timezone_controller.cc

---

--- a/third_party/blink/renderer/core/timezone/timezone_controller.cc
+++ b/third_party/blink/renderer/core/timezone/timezone_controller.cc
@@ -4,9 +4,12 @@
 
 #include "third_party/blink/renderer/core/timezone/timezone_controller.h"
 
+#include "base/command_line.h"
 #include "base/feature_list.h"
+#include "base/strings/string_util.h"
 #include "mojo/public/cpp/bindings/pending_remote.h"
 #include "mojo/public/cpp/bindings/remote.h"
+#include "third_party/blink/public/common/fingerprint/fingerprint.h"
 #include "third_party/blink/public/common/thread_safe_browser_interface_broker_proxy.h"
 #include "third_party/blink/public/platform/platform.h"
 #include "third_party/blink/public/platform/task_type.h"
@@ -59,7 +62,26 @@
   return String(unicode::ToSpan(unicode_timezone_id));
 }
 
+// Stealth Chromium: the persona timezone from --fingerprint-timezone, when set.
+// Accepts IANA ids (America/New_York) and custom offsets (GMT+8); empty or
+// unset means no override.
+String FingerprintTimezoneId() {
+  const base::CommandLine& cmd = *base::CommandLine::ForCurrentProcess();
+  if (!cmd.HasSwitch(blink::switches::kFingerprintTimezone)) {
+    return String();
+  }
+  const std::string value =
+      cmd.GetSwitchValueASCII(blink::switches::kFingerprintTimezone);
+  if (value.empty() || !base::IsStringASCII(value)) {
+    return String();
+  }
+  return String::FromUTF8(value);
+}
+
 String GetCurrentTimezoneId() {
+  if (String fingerprint_tz = FingerprintTimezoneId(); !fingerprint_tz.empty()) {
+    return fingerprint_tz;
+  }
   std::unique_ptr<icu::TimeZone> timezone(icu::TimeZone::createDefault());
   CHECK(timezone);
   return GetTimezoneId(*timezone.get());
@@ -96,6 +118,22 @@
   if (!base::FeatureList::IsEnabled(kLazyBlinkTimezoneInit)) {
     host_timezone_id_ = GetCurrentTimezoneId();
   }
+  // Stealth Chromium: adopt the persona timezone as the process ICU default so
+  // Date and Intl agree from isolate creation on. Invalid ids degrade to
+  // ICU's unknown zone (GMT) rather than falling back to the real zone.
+  if (String fingerprint_tz = FingerprintTimezoneId(); !fingerprint_tz.empty()) {
+    UErrorCode status = U_ZERO_ERROR;
+    std::unique_ptr<icu::TimeZone> timezone(icu::TimeZone::createSystemTimeZone(
+        icu::UnicodeString(fingerprint_tz.Ascii().data(), -1, US_INV), status));
+    if (!timezone || U_FAILURE(status)) {
+      timezone.reset(icu::TimeZone::createCustomTimeZone(
+          icu::UnicodeString(fingerprint_tz.Ascii().data(), -1, US_INV)));
+    }
+    if (!timezone) {
+      timezone.reset(icu::TimeZone::getUnknown()->clone());
+    }
+    icu::TimeZone::adoptDefault(timezone.release());
+  }
 }
 
 TimeZoneController::~TimeZoneController() = default;
@@ -245,12 +283,21 @@
 
   base::AutoLock locker(instance().lock_);
 
+  // Stealth Chromium: OS-reported timezone changes are re-labeled with the
+  // persona zone so the host's real zone never leaks through the event.
+  String effective_timezone_id = timezone_id;
+  if (String fingerprint_tz = FingerprintTimezoneId();
+      !fingerprint_tz.empty()) {
+    effective_timezone_id = fingerprint_tz;
+  }
+
   // Remember requested timezone id so we can set it when timezone
   // override is removed.
-  instance().host_timezone_id_ = timezone_id;
+  instance().host_timezone_id_ = effective_timezone_id;
 
-  if (!HasTimeZoneOverride())
-    SetIcuTimeZoneAndNotifyV8(timezone_id);
+  if (!HasTimeZoneOverride()) {
+    SetIcuTimeZoneAndNotifyV8(effective_timezone_id);
+  }
 }
 
 const String& TimeZoneController::GetHostTimezoneId() {

Original source.

0009: Locale and Accept-Language

The locale switch feeds the HTTP Accept-Language path, renderer language preferences, navigator.languages, and the renderer’s ICU default. This addresses the easy contradiction between request headers and JavaScript language values. The paths read the locale switch directly, so the common off gate alone does not undo a supplied locale override.

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Stealth Chromium contributors
Date: Thu, 1 Jan 2026 00:00:00 +0000
Subject: [PATCH 9/33] fingerprint: locale override (Accept-Language, navigator.languages, renderer ICU)
X-Spec: patches/20-locale-accept-language.md
X-Files: chrome/browser/net/profile_network_context_service.cc chrome/browser/renderer_preferences_util.cc content/renderer/renderer_main.cc third_party/blink/renderer/core/frame/navigator_language.cc

---

--- a/chrome/browser/net/profile_network_context_service.cc
+++ b/chrome/browser/net/profile_network_context_service.cc
@@ -100,6 +100,7 @@
 #include "services/network/public/mojom/network_context.mojom.h"
 #include "services/network/public/mojom/network_service.mojom.h"
 #include "third_party/blink/public/common/features.h"
+#include "third_party/blink/public/common/switches.h"
 
 #if BUILDFLAG(IS_CHROMEOS)
 #include "ash/constants/ash_features.h"
@@ -674,6 +675,18 @@
   // expanding the language list if the DisableReduceAcceptLanguage deprecation
   // trial ends.
 
+  // Stealth Chromium: persona Accept-Language. Reuses the stock expansion/header
+  // helpers so q-values match a stock browser with that language pref.
+  if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+          blink::switches::kFingerprintLocale)) {
+    const std::string locale =
+        base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
+            blink::switches::kFingerprintLocale);
+    if (!locale.empty()) {
+      return ComputeAcceptLanguageFromPref(locale);
+    }
+  }
+
   if (profile_->IsOffTheRecord()) {
     // In incognito mode return only the first language.
     return ComputeAcceptLanguageFromPref(
--- a/chrome/browser/renderer_preferences_util.cc
+++ b/chrome/browser/renderer_preferences_util.cc
@@ -9,6 +9,7 @@
 #include <string>
 #include <vector>
 
+#include "base/command_line.h"
 #include "base/logging.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/string_util.h"
@@ -30,6 +31,7 @@
 #include "media/media_buildflags.h"
 #include "third_party/blink/public/common/peerconnection/webrtc_ip_handling_policy.h"
 #include "third_party/blink/public/common/renderer_preferences/renderer_preferences.h"
+#include "third_party/blink/public/common/switches.h"
 #include "third_party/blink/public/mojom/peerconnection/webrtc_ip_handling_policy.mojom.h"
 #include "third_party/blink/public/public_buildflags.h"
 #include "third_party/skia/include/core/SkColor.h"
@@ -194,6 +196,17 @@
       pref_service->GetList(prefs::kWebRtcLocalIpsAllowedUrls));
   prefs->accept_languages = GetLanguageListForProfile(
       profile, pref_service->GetString(language::prefs::kAcceptLanguages));
+  // Stealth Chromium: persona accept-languages override what the profile prefs
+  // produced; renderers see this for navigator.language(s) fallback paths.
+  if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+          blink::switches::kFingerprintLocale)) {
+    const std::string locale =
+        base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
+            blink::switches::kFingerprintLocale);
+    if (!locale.empty()) {
+      prefs->accept_languages = locale;
+    }
+  }
 #if !BUILDFLAG(IS_MAC)
   prefs->plugin_fullscreen_allowed =
       pref_service->GetBoolean(prefs::kFullscreenAllowed);
--- a/content/renderer/renderer_main.cc
+++ b/content/renderer/renderer_main.cc
@@ -13,6 +13,7 @@
 #include "base/debug/debugger.h"
 #include "base/debug/leak_annotations.h"
 #include "base/feature_list.h"
+#include "base/i18n/icu_util.h"
 #include "base/i18n/rtl.h"
 #include "base/message_loop/message_pump.h"
 #include "base/message_loop/message_pump_type.h"
@@ -54,6 +55,7 @@
 #include "services/tracing/public/cpp/trace_startup.h"
 #include "skia/ext/font_utils.h"
 #include "third_party/blink/public/common/features.h"
+#include "third_party/blink/public/common/switches.h"
 #include "third_party/blink/public/platform/platform.h"
 #include "third_party/blink/public/platform/scheduler/web_thread_scheduler.h"
 #include "third_party/skia/include/core/SkFontMgr.h"
@@ -162,6 +164,21 @@
 
   const base::CommandLine& command_line = *parameters.command_line;
 
+  // Stealth Chromium: renderer ICU default locale follows the persona locale so
+  // Intl defaults agree with navigator.languages and Accept-Language. A
+  // comma list uses its first tag (ICU takes a single locale).
+  if (command_line.HasSwitch(blink::switches::kFingerprintLocale)) {
+    std::string locale =
+        command_line.GetSwitchValueASCII(blink::switches::kFingerprintLocale);
+    const size_t comma = locale.find(',');
+    if (comma != std::string::npos) {
+      locale.resize(comma);
+    }
+    if (!locale.empty()) {
+      base::i18n::SetICUDefaultLocale(locale);
+    }
+  }
+
 #if BUILDFLAG(IS_MAC)
   base::apple::ScopedNSAutoreleasePool* pool = parameters.autorelease_pool;
 #endif  // BUILDFLAG(IS_MAC)
--- a/third_party/blink/renderer/core/frame/navigator_language.cc
+++ b/third_party/blink/renderer/core/frame/navigator_language.cc
@@ -70,6 +70,18 @@
 }
 
 void NavigatorLanguage::EnsureUpdatedLanguage() {
+  // Stealth Chromium: persona locale wins over browser-provided accept languages.
+  if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+          blink::switches::kFingerprintLocale)) {
+    const std::string locale =
+        base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
+            blink::switches::kFingerprintLocale);
+    if (!locale.empty()) {
+      languages_ = ParseAndSanitize(String::FromUTF8(locale));
+      languages_dirty_ = false;
+      return;
+    }
+  }
   String accept_languages_override;
   probe::ApplyAcceptLanguageOverride(execution_context_,
                                      &accept_languages_override);

Original source.

0010: User agent and client hints

The central user-agent utilities construct the platform token, brand lists, and User-Agent Client Hints metadata. Stock GREASE and brand-list permutation helpers retain Chromium’s formatting. Some metadata remains stock, including bitness and full version; cross-platform overrides need scrutiny. The brand-list rewrite is also unconditional in this snapshot.

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Stealth Chromium contributors
Date: Thu, 1 Jan 2026 00:00:00 +0000
Subject: [PATCH 10/33] fingerprint: UA string and UA-CH persona (brand, platform, GREASE lists)
X-Spec: patches/09-ua-ch-brands-grease.md, patches/10-user-agent-platform.md
X-Files: components/embedder_support/user_agent_utils.cc

---

--- a/components/embedder_support/user_agent_utils.cc
+++ b/components/embedder_support/user_agent_utils.cc
@@ -33,6 +33,7 @@
 #include "components/version_info/version_info.h"
 #include "net/http/http_util.h"
 #include "third_party/blink/public/common/features.h"
+#include "third_party/blink/public/common/switches.h"
 #include "third_party/blink/public/common/user_agent/user_agent_metadata.h"
 
 #if BUILDFLAG(IS_WIN)
@@ -211,6 +212,91 @@
                                additional_brand_version);
 }
 
+// --- begin Stealth Chromium persona helpers --------------------------------------
+// OS-CPU token reported inside the classic UA parentheses per platform
+// persona. Empty when no persona is active.
+std::string GetFingerprintOsToken() {
+  if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
+          blink::switches::kFingerprintPlatform)) {
+    return std::string();
+  }
+  const std::string platform = base::ToLowerASCII(
+      base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
+          blink::switches::kFingerprintPlatform));
+  if (platform == "windows") {
+    return "Windows NT 10.0; Win64; x64";
+  }
+  if (platform == "macos") {
+    return "Macintosh; Intel Mac OS X 10_15_7";
+  }
+  if (platform == "linux") {
+    return "X11; Linux x86_64";
+  }
+  return std::string();
+}
+
+struct FingerprintBrandPersona {
+  std::string brand;      // display brand for UA-CH brand lists
+  std::string version;    // full version for the brand
+  std::string ua_suffix;  // appended to the classic UA ("" = none)
+};
+
+// Brand persona from --fingerprint-brand / --fingerprint-brand-version.
+// Default (no switch) presents as "Google Chrome". Default per-brand versions
+// mirror a plausible public release of each browser on Chromium 146.
+FingerprintBrandPersona GetFingerprintBrandPersona(
+    const std::string& chromium_full_version) {
+  const base::CommandLine& command_line =
+      *base::CommandLine::ForCurrentProcess();
+  const std::string brand_switch =
+      command_line.HasSwitch(blink::switches::kFingerprintBrand)
+          ? command_line.GetSwitchValueASCII(blink::switches::kFingerprintBrand)
+          : "Chrome";
+  std::string version =
+      command_line.GetSwitchValueASCII(blink::switches::kFingerprintBrandVersion);
+
+  FingerprintBrandPersona persona;
+  if (brand_switch == "Edge") {
+    persona.brand = "Microsoft Edge";
+    persona.ua_suffix = " Edg/";
+    if (version.empty()) {
+      version = "146.0.3856.97";
+    }
+  } else if (brand_switch == "Opera") {
+    persona.brand = "Opera";
+    persona.ua_suffix = " OPR/";
+    if (version.empty()) {
+      version = "129.0.5823.44";
+    }
+  } else if (brand_switch == "Vivaldi") {
+    persona.brand = "Vivaldi";
+    persona.ua_suffix = " Vivaldi/";
+    if (version.empty()) {
+      version = "7.9.3970.47";
+    }
+  } else if (brand_switch == "Chrome" || brand_switch.empty()) {
+    persona.brand = "Google Chrome";
+    if (version.empty()) {
+      version = chromium_full_version;
+    }
+  } else {
+    // Custom brand passes through verbatim.
+    persona.brand = brand_switch;
+    persona.ua_suffix = " " + brand_switch + "/";
+    if (version.empty()) {
+      version = chromium_full_version;
+    }
+  }
+  persona.version = version;
+  return persona;
+}
+
+std::string MajorVersionOf(const std::string& version) {
+  const size_t dot = version.find('.');
+  return dot == std::string::npos ? version : version.substr(0, dot);
+}
+// --- end Stealth Chromium persona helpers ----------------------------------------
+
 // Internal function to handle return the full or "reduced" user agent string,
 // depending on the Reduce User-Agent reduction phase features.
 std::string GetUserAgentInternal() {
@@ -225,6 +311,19 @@
   }
 #endif
 
+  // Stealth Chromium: platform persona overrides both the classic and the
+  // unified/reduced UA OS token; a non-Chrome persona appends its brand
+  // token after the Chrome token, like the real browsers do.
+  if (std::string os_token = GetFingerprintOsToken(); !os_token.empty()) {
+    std::string user_agent = BuildUserAgentFromOSAndProduct(os_token, product);
+    FingerprintBrandPersona persona =
+        GetFingerprintBrandPersona(std::string(version_info::GetVersionNumber()));
+    if (!persona.ua_suffix.empty()) {
+      user_agent.append(persona.ua_suffix).append(persona.version);
+    }
+    return user_agent;
+  }
+
   return ShouldSendUserAgentUnifiedPlatform()
              ? BuildUnifiedPlatformUserAgentFromProduct(product)
              : BuildUserAgentFromProduct(product);
@@ -671,6 +770,56 @@
   metadata.bitness = GetCpuBitness();
   metadata.wow64 = IsWoW64();
   metadata.platform_version = GetPlatformVersion();
+
+  // Stealth Chromium: persona brand lists and platform fields. Brand lists keep
+  // the real Chromium entry plus GREASE, shuffled with the stock permutation
+  // seeded by the Chromium major version (matches stock Chrome formatting).
+  // full_version/model/mobile/bitness/wow64 keep their stock values.
+  {
+    const std::string chromium_full(version_info::GetVersionNumber());
+    const int seed = version_info::GetMajorVersionNumber();
+    FingerprintBrandPersona persona = GetFingerprintBrandPersona(chromium_full);
+
+    blink::UserAgentBrandList full_list = {
+        GetGreasedUserAgentBrandVersion(
+            seed, blink::UserAgentBrandVersionType::kFullVersion),
+        {persona.brand, persona.version},
+        {"Chromium", chromium_full}};
+    blink::UserAgentBrandList major_list = {
+        GetGreasedUserAgentBrandVersion(
+            seed, blink::UserAgentBrandVersionType::kMajorVersion),
+        {persona.brand, MajorVersionOf(persona.version)},
+        {"Chromium", MajorVersionOf(chromium_full)}};
+    metadata.brand_full_version_list =
+        ShuffleBrandList(std::move(full_list), seed);
+    metadata.brand_version_list = ShuffleBrandList(std::move(major_list), seed);
+
+    const base::CommandLine& command_line =
+        *base::CommandLine::ForCurrentProcess();
+    if (command_line.HasSwitch(blink::switches::kFingerprintPlatform)) {
+      const std::string platform = base::ToLowerASCII(
+          command_line.GetSwitchValueASCII(blink::switches::kFingerprintPlatform));
+      if (platform == "windows") {
+        metadata.platform = "Windows";
+        metadata.platform_version = "19.0.0";
+      } else if (platform == "linux") {
+        metadata.platform = "Linux";
+        metadata.platform_version = "6.11.0";
+      } else if (platform == "macos") {
+        metadata.platform = "macOS";
+        metadata.platform_version = "15.2.0";
+        metadata.architecture = "arm";
+      } else {
+        metadata.platform = platform;
+      }
+      const std::string platform_version =
+          command_line.GetSwitchValueASCII(
+              blink::switches::kFingerprintPlatformVersion);
+      if (!platform_version.empty()) {
+        metadata.platform_version = platform_version;
+      }
+    }
+  }
   return metadata;
 }
 

Original source.

0011: Platform token and Web Share

navigator.platform follows the selected desktop persona, while renderer setup enables Web Share for a supplied non-Linux platform value. This connects a platform string to an exposed capability. It does not implement the claimed operating system’s share backend, and these paths also read the platform switch without the common enable gate.

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Stealth Chromium contributors
Date: Thu, 1 Jan 2026 00:00:00 +0000
Subject: [PATCH 11/33] fingerprint: navigator.platform persona and Web Share capability consistency
X-Spec: patches/10-user-agent-platform.md
X-Files: third_party/blink/renderer/core/frame/navigator_id.cc chrome/renderer/chrome_content_renderer_client.cc

---

--- a/third_party/blink/renderer/core/frame/navigator_id.cc
+++ b/third_party/blink/renderer/core/frame/navigator_id.cc
@@ -31,9 +31,11 @@
 
 #include "third_party/blink/renderer/core/frame/navigator_id.h"
 
+#include "base/command_line.h"
 #include "base/feature_list.h"
 #include "build/build_config.h"
 #include "third_party/blink/public/common/features.h"
+#include "third_party/blink/public/common/switches.h"
 #include "third_party/blink/renderer/platform/wtf/text/string_builder.h"
 
 #if !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_WIN)
@@ -59,6 +61,23 @@
 }
 
 String NavigatorID::platform() const {
+  // Stealth Chromium: persona platform token. Unknown/absent persona falls
+  // through to the real OS value.
+  if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+          blink::switches::kFingerprintPlatform)) {
+    const std::string platform = base::ToLowerASCII(
+        base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
+            blink::switches::kFingerprintPlatform));
+    if (platform == "windows") {
+      return "Win32";
+    }
+    if (platform == "linux") {
+      return "Linux x86_64";
+    }
+    if (platform == "macos") {
+      return "MacIntel";
+    }
+  }
 #if BUILDFLAG(IS_MAC)
   // Match Safari and Mozilla on Mac x86.
   return "MacIntel";
--- a/chrome/renderer/chrome_content_renderer_client.cc
+++ b/chrome/renderer/chrome_content_renderer_client.cc
@@ -152,6 +152,7 @@
 #include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
 #include "third_party/blink/public/common/features.h"
 #include "third_party/blink/public/common/features_generated.h"
+#include "third_party/blink/public/common/switches.h"
 #include "third_party/blink/public/common/tokens/tokens.h"
 #include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-shared.h"
 #include "third_party/blink/public/mojom/page/page_visibility_state.mojom.h"
@@ -1452,6 +1453,18 @@
     BUILDFLAG(IS_MAC)
   blink::WebRuntimeFeatures::EnableWebShare(true);
 #endif
+  // Stealth Chromium: navigator.share is stock-disabled on desktop Linux; the
+  // Windows/macOS personas enable it so the capability set matches the
+  // claimed OS.
+  if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+          blink::switches::kFingerprintPlatform)) {
+    const std::string platform = base::ToLowerASCII(
+        base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
+            blink::switches::kFingerprintPlatform));
+    if (platform != "linux") {
+      blink::WebRuntimeFeatures::EnableWebShare(true);
+    }
+  }
 
   if (base::FeatureList::IsEnabled(
           autofill::features::kAutofillPolicyControlledFeatureAutofill)) {

Original source.

Pixels, geometry, audio, and devices

These surfaces reveal the implementation through output or enumeration. Noise changes repeatability and identity; persona tables change the values a script reads.

0012: Canvas and WebGL pixel readback

The pixel helper makes sparse, seed-derived changes at readback/export boundaries, including canvas image data, image encoding, and WebGL readPixels. Its selection is deterministic rather than fresh randomness on every call. Different readback routes and pixel formats still need comparison: changing a hash is much easier than reproducing a different graphics stack.

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Stealth Chromium contributors
Date: Thu, 1 Jan 2026 00:00:00 +0000
Subject: [PATCH 12/33] fingerprint: deterministic canvas image-data pixel noise
X-Spec: patches/03-canvas-image-data-noise.md
X-Files: third_party/blink/renderer/platform/graphics/static_bitmap_image.h third_party/blink/renderer/platform/graphics/static_bitmap_image.cc third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc third_party/blink/renderer/platform/image-encoders/image_encoder.cc third_party/blink/renderer/core/html/canvas/canvas_async_blob_creator.cc third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc

---

--- a/third_party/blink/renderer/platform/graphics/static_bitmap_image.h
+++ b/third_party/blink/renderer/platform/graphics/static_bitmap_image.h
@@ -37,6 +37,14 @@
 
   StaticBitmapImage(ImageOrientation orientation) : orientation_(orientation) {}
 
+  // Stealth Chromium: perturbs at most 10 pixels by one LSB per color channel,
+  // deterministically per identity seed. Applied to canvas/WebGL readback
+  // data (getImageData, toDataURL, toBlob, readPixels).
+  static void ShuffleSubchannelColorData(const void* addr,
+                                         const SkImageInfo& info,
+                                         int src_x,
+                                         int src_y);
+
   bool IsStaticBitmapImage() const override { return true; }
 
   // Methods overridden by all sub-classes
--- a/third_party/blink/renderer/platform/graphics/static_bitmap_image.cc
+++ b/third_party/blink/renderer/platform/graphics/static_bitmap_image.cc
@@ -4,7 +4,10 @@
 
 #include "third_party/blink/renderer/platform/graphics/static_bitmap_image.h"
 
+#include <algorithm>
+
 #include "base/numerics/checked_math.h"
+#include "third_party/blink/public/common/fingerprint/fingerprint.h"
 #include "gpu/command_buffer/client/gles2_interface.h"
 #include "third_party/blink/renderer/platform/graphics/accelerated_static_bitmap_image.h"
 #include "third_party/blink/renderer/platform/graphics/graphics_context.h"
@@ -37,6 +40,98 @@
       orientation);
 }
 
+// static
+void StaticBitmapImage::ShuffleSubchannelColorData(const void* addr,
+                                                   const SkImageInfo& info,
+                                                   int src_x,
+                                                   int src_y) {
+  const int w = info.width() - src_x;
+  const int h = info.height() - src_y;
+  // Skip tiny images (and zero-sized readbacks).
+  if (w < 8 || h < 8) {
+    return;
+  }
+
+  const size_t row_bytes = info.minRowBytes();
+  const long total = static_cast<long>(w) * h;
+  const int count = static_cast<int>(std::min(total, 10L));
+
+  // Position stream: LCG-stepped from the seed hash (vendor constants).
+  const uint32_t pos_seed =
+      static_cast<uint32_t>(fingerprint::HashFor("canvas_pos"));
+
+  for (int i = 0; i < count; ++i) {
+    const uint32_t r =
+        ((static_cast<uint32_t>(i) ^ pos_seed) * 0x17385CA9u + 0x47502932u) %
+        static_cast<uint32_t>(total);
+    const int x = static_cast<int>(r % w);
+    const int y = static_cast<int>(r / w);
+    const uint32_t pixel_hash = static_cast<uint32_t>(fingerprint::HashFor(
+        "canvas_px_" + std::to_string(x) + "_" + std::to_string(y)));
+    const bool b0 = pixel_hash & 1;
+    const bool b1 = (pixel_hash >> 1) & 1;
+    const bool b2 = (pixel_hash >> 2) & 1;
+
+    switch (info.colorType()) {
+      case kAlpha_8_SkColorType:
+      case kGray_8_SkColorType: {
+        uint8_t* pixel = const_cast<uint8_t*>(static_cast<const uint8_t*>(
+            addr)) + y * row_bytes + x;
+        *pixel = static_cast<uint8_t>((*pixel & 0xFE) | b2);
+        break;
+      }
+      case kRGB_565_SkColorType: {
+        uint16_t* pixel = reinterpret_cast<uint16_t*>(
+            const_cast<uint8_t*>(static_cast<const uint8_t*>(addr)) +
+            y * row_bytes + x * 2);
+        const unsigned r5 = (*pixel >> 11) & 0x1F;
+        const unsigned g6 = (*pixel >> 5) & 0x3F;
+        const unsigned b5 = (*pixel) & 0x1F;
+        // Expand to 8 bits, clear the LSB, install the noise bit, truncate.
+        const unsigned r8 = (((r5 << 3) | (r5 >> 2)) & 0x1E) | b0;
+        const unsigned g8 = (((g6 << 2) | (g6 >> 4)) & 0x3E) | b1;
+        const unsigned b8 = (((b5 << 3) | (b5 >> 2)) & 0x1E) | b2;
+        *pixel = static_cast<uint16_t>((r8 << 11) | (g8 << 5) | b8);
+        break;
+      }
+      case kARGB_4444_SkColorType: {
+        uint16_t* pixel = reinterpret_cast<uint16_t*>(
+            const_cast<uint8_t*>(static_cast<const uint8_t*>(addr)) +
+            y * row_bytes + x * 2);
+        const uint16_t pv = *pixel;
+        *pixel = static_cast<uint16_t>((pv & 0xEE0F) | (b0 << 12) |
+                                       (b1 << 8) | (b2 << 4));
+        break;
+      }
+      case kRGBA_8888_SkColorType: {
+        uint32_t* pixel = reinterpret_cast<uint32_t*>(
+            const_cast<uint8_t*>(static_cast<const uint8_t*>(addr)) +
+            y * row_bytes + x * 4);
+        const uint32_t p = *pixel;
+        *pixel = (p & 0xFF000000u) | ((((p) & 0x000000FFu) & 0xFE) | b2) |
+                 (((((p >> 8) & 0xFF) & 0xFE) | b1) << 8) |
+                 (((((p >> 16) & 0xFF) & 0xFE) | b0) << 16);
+        break;
+      }
+      case kBGRA_8888_SkColorType: {
+        uint32_t* pixel = reinterpret_cast<uint32_t*>(
+            const_cast<uint8_t*>(static_cast<const uint8_t*>(addr)) +
+            y * row_bytes + x * 4);
+        const uint32_t p = *pixel;
+        // B at byte 0, G at byte 1, R at byte 2; alpha preserved.
+        *pixel = (p & 0xFF000000u) | ((((p) & 0xFF) & 0xFE) | b0) |
+                 (((((p >> 8) & 0xFF) & 0xFE) | b1) << 8) |
+                 (((((p >> 16) & 0xFF) & 0xFE) | b2) << 16);
+        break;
+      }
+      default:
+        // Unhandled formats (float, 888x, 101010x...) are skipped without
+        // altering the pixel.
+        continue;
+    }
+  }
+}
+
 gfx::Size StaticBitmapImage::SizeWithConfig(SizeConfig config) const {
   gfx::Size size = GetSize();
   if (config.apply_orientation && orientation_.UsesWidthAsHeight())
--- a/third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc
+++ b/third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc
@@ -27,6 +27,7 @@
 #include "cc/paint/paint_image.h"
 #include "components/viz/common/resources/shared_image_format_utils.h"
 #include "third_party/abseil-cpp/absl/cleanup/cleanup.h"
+#include "third_party/blink/public/common/fingerprint/fingerprint.h"
 #include "third_party/blink/public/common/metrics/document_update_reason.h"
 #include "third_party/blink/public/mojom/devtools/console_message.mojom-blink-forward.h"
 #include "third_party/blink/renderer/bindings/core/v8/v8_canvas_text_align.h"
@@ -522,6 +523,10 @@
       SkIRect bounds =
           snapshot->PaintImageForCurrentFrame().GetSkImageInfo().bounds();
       DCHECK(!bounds.intersect(SkIRect::MakeXYWH(sx, sy, sw, sh)));
+    } else if (fingerprint::NoiseEnabled()) {
+      // Stealth Chromium: deterministic per-seed pixel noise on readback data.
+      StaticBitmapImage::ShuffleSubchannelColorData(
+          image_data_pixmap.writable_addr(), image_data_pixmap.info(), 0, 0);
     }
   }
 
--- a/third_party/blink/renderer/platform/image-encoders/image_encoder.cc
+++ b/third_party/blink/renderer/platform/image-encoders/image_encoder.cc
@@ -44,6 +44,12 @@
                           const SkPixmap& src,
                           ImageEncodingMimeType mime_type,
                           double quality) {
+  // Stealth Chromium: single choke point for toDataURL/toBlob encoding — perturb
+  // the source pixels before any codec sees them.
+  if (fingerprint::NoiseEnabled() && src.writable_addr()) {
+    StaticBitmapImage::ShuffleSubchannelColorData(src.writable_addr(),
+                                                  src.info(), 0, 0);
+  }
   switch (mime_type) {
     case kMimeTypeJpeg: {
       SkJpegEncoder::Options options;
--- a/third_party/blink/renderer/core/html/canvas/canvas_async_blob_creator.cc
+++ b/third_party/blink/renderer/core/html/canvas/canvas_async_blob_creator.cc
@@ -8,6 +8,7 @@
 #include "base/metrics/histogram_functions.h"
 #include "base/metrics/histogram_macros.h"
 #include "build/build_config.h"
+#include "third_party/blink/public/common/fingerprint/fingerprint.h"
 #include "third_party/blink/public/platform/platform.h"
 #include "third_party/blink/public/platform/task_type.h"
 #include "third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h"
@@ -17,6 +18,7 @@
 #include "third_party/blink/renderer/core/fileapi/blob.h"
 #include "third_party/blink/renderer/core/html/canvas/canvas_rendering_context.h"
 #include "third_party/blink/renderer/platform/graphics/image_data_buffer.h"
+#include "third_party/blink/renderer/platform/graphics/static_bitmap_image.h"
 #include "third_party/blink/renderer/platform/graphics/skia/skia_utils.h"
 #include "third_party/blink/renderer/platform/graphics/unaccelerated_static_bitmap_image.h"
 #include "third_party/blink/renderer/platform/heap/garbage_collected.h"
@@ -512,6 +514,11 @@
   if (fail_encoder_initialization_for_test_) {
     return false;
   }
+  // Stealth Chromium: perturb source pixels before the async encoder starts.
+  if (fingerprint::NoiseEnabled() && src_data_.writable_addr()) {
+    StaticBitmapImage::ShuffleSubchannelColorData(
+        src_data_.writable_addr(), src_data_.info(), 0, 0);
+  }
   if (mime_type_ == kMimeTypeJpeg) {
     SkJpegEncoder::Options options;
     options.fQuality = ImageEncoder::ComputeJpegQuality(quality);
--- a/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc
+++ b/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc
@@ -52,6 +52,7 @@
 #include "media/base/video_frame.h"
 #include "media/renderers/paint_canvas_video_renderer.h"
 #include "third_party/blink/public/common/features.h"
+#include "third_party/blink/public/common/fingerprint/fingerprint.h"
 #include "third_party/blink/public/common/thread_safe_browser_interface_broker_proxy.h"
 #include "third_party/blink/public/mojom/gpu/gpu.mojom-blink.h"
 #include "third_party/blink/public/platform/platform.h"
@@ -125,6 +126,7 @@
 #include "third_party/blink/renderer/platform/bindings/exception_state.h"
 #include "third_party/blink/renderer/platform/bindings/script_state.h"
 #include "third_party/blink/renderer/platform/bindings/v8_binding_macros.h"
+#include "third_party/blink/renderer/platform/graphics/static_bitmap_image.h"
 #include "third_party/blink/renderer/platform/graphics/accelerated_static_bitmap_image.h"
 #include "third_party/blink/renderer/platform/graphics/canvas_non2d_snapshot_provider_bitmap.h"
 #include "third_party/blink/renderer/platform/graphics/canvas_resource.h"
@@ -5129,6 +5131,18 @@
       return;
     }
     ContextGL()->ReadPixels(x, y, width, height, format, type, data);
+  }
+
+  // Stealth Chromium: apply the canvas pixel noise to WebGL readPixels results.
+  // Only byte formats are handled (same formats as the canvas noise).
+  if (fingerprint::NoiseEnabled() && data && width > 0 && height > 0 &&
+      ((format == GL_RGBA && type == GL_UNSIGNED_BYTE) ||
+       (format == GL_BGRA_EXT && type == GL_UNSIGNED_BYTE))) {
+    const SkImageInfo info = SkImageInfo::Make(
+        width, height,
+        format == GL_RGBA ? kRGBA_8888_SkColorType : kBGRA_8888_SkColorType,
+        kUnpremul_SkAlphaType);
+    StaticBitmapImage::ShuffleSubchannelColorData(data, info, 0, 0);
   }
 }
 

Original source.

0013: Canvas text metrics

measureText() applies one small seed-derived scale factor to width, bounding boxes, and baselines. Scaling related fields together avoids changing only the headline width. It leaves the underlying font and drawing machinery in place, so other measurements can still expose the host’s typography.

The scale calculation is small enough to show directly:

const double factor =
    1.0 + (fingerprint::RandomFor("clientrects_noise_x") - 0.5) * 1e-5;
text_metrics->Shuffle(factor);
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Stealth Chromium contributors
Date: Thu, 1 Jan 2026 00:00:00 +0000
Subject: [PATCH 13/33] fingerprint: deterministic measureText() metric scaling
X-Spec: patches/04-canvas-measuretext-noise.md
X-Files: third_party/blink/renderer/core/html/canvas/text_metrics.h third_party/blink/renderer/core/html/canvas/text_metrics.cc third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc

---

--- a/third_party/blink/renderer/core/html/canvas/text_metrics.h
+++ b/third_party/blink/renderer/core/html/canvas/text_metrics.h
@@ -94,6 +94,10 @@
 
   const Font* GetFont() const { return font_; }
 
+  // Stealth Chromium: scales all reported metrics by a factor near 1.0
+  // (deterministic per identity seed) to defeat text-metric fingerprinting.
+  void Shuffle(const double factor);
+
   void Trace(Visitor*) const override;
 
   struct RunWithOffset {
--- a/third_party/blink/renderer/core/html/canvas/text_metrics.cc
+++ b/third_party/blink/renderer/core/html/canvas/text_metrics.cc
@@ -80,6 +80,29 @@
 
 TextMetrics::TextMetrics() : baselines_(Baselines::Create()) {}
 
+void TextMetrics::Shuffle(const double factor) {
+  width_ *= factor;
+  actual_bounding_box_left_ *= factor;
+  actual_bounding_box_right_ *= factor;
+  font_bounding_box_ascent_ *= factor;
+  font_bounding_box_descent_ *= factor;
+  actual_bounding_box_ascent_ *= factor;
+  actual_bounding_box_descent_ *= factor;
+  em_height_ascent_ *= factor;
+  em_height_descent_ *= factor;
+  if (baselines_) {
+    if (baselines_->hasAlphabetic()) {
+      baselines_->setAlphabetic(baselines_->alphabetic() * factor);
+    }
+    if (baselines_->hasHanging()) {
+      baselines_->setHanging(baselines_->hanging() * factor);
+    }
+    if (baselines_->hasIdeographic()) {
+      baselines_->setIdeographic(baselines_->ideographic() * factor);
+    }
+  }
+}
+
 TextMetrics::TextMetrics(const Font* font,
                          const TextDirection& direction,
                          const V8CanvasTextBaseline::Enum baseline,
--- a/third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc
+++ b/third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc
@@ -1170,9 +1170,18 @@
   TextDirection direction =
       ToTextDirection(state.GetDirection(), host, computed_style);
 
-  return MakeGarbageCollected<TextMetrics>(
+  TextMetrics* text_metrics = MakeGarbageCollected<TextMetrics>(
       font, direction, state.GetTextBaseline(), state.GetTextAlign(), text,
       host->GetPlainTextPainter());
+
+  // Stealth Chromium: scale all reported text metrics by a fixed factor near 1.0,
+  // deterministic per identity seed (±0.0005%).
+  if (canvas && fingerprint::NoiseEnabled()) {
+    const double factor =
+        1.0 + (fingerprint::RandomFor("clientrects_noise_x") - 0.5) * 1e-5;
+    text_metrics->Shuffle(factor);
+  }
+  return text_metrics;
 }
 
 String BaseRenderingContext2D::lang() const {

Original source.

0014: DOM rectangles and integer dimensions

Element and Range rectangle origins receive a fixed subpixel translation, while their rectangle widths and heights remain unchanged. Separately, sufficiently large offsetWidth and offsetHeight values receive integer perturbations keyed by seed and element ID. Those are different operations; comparing the two APIs can expose their disagreement.

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Stealth Chromium contributors
Date: Thu, 1 Jan 2026 00:00:00 +0000
Subject: [PATCH 14/33] fingerprint: get*ClientRects/offsetWidth/Height seeded noise
X-Spec: patches/05-client-rects-noise.md
X-Files: third_party/blink/renderer/core/fingerprint/client_rects_noise.h third_party/blink/renderer/core/dom/range.cc third_party/blink/renderer/core/dom/element.cc third_party/blink/renderer/core/html/html_element.cc

---

--- /dev/null
+++ b/third_party/blink/renderer/core/fingerprint/client_rects_noise.h
@@ -0,0 +1,36 @@
+// Copyright 2026 The Stealth Chromium Authors
+// Use of this source code is governed by a GPLv3 license that can be
+// found in the LICENSE file of the Stealth Chromium distribution.
+
+#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_FINGERPRINT_CLIENT_RECTS_NOISE_H_
+#define THIRD_PARTY_BLINK_RENDERER_CORE_FINGERPRINT_CLIENT_RECTS_NOISE_H_
+
+#include "third_party/blink/public/common/fingerprint/fingerprint.h"
+
+// Sub-pixel translation applied to get*ClientRects / getBoundingClientRect
+// results. The offset is one of ±1/64..±4/64 px per axis (never zero),
+// deterministic per identity seed, identical for every document in a
+// session. Widths/heights are never altered — only origins move.
+namespace blink::fingerprint {
+
+inline double ClientRectsNoiseX() {
+  static const double noise = [] {
+    const uint32_t v =
+        static_cast<uint32_t>(HashFor("offset_x")) & 7;
+    return static_cast<double>(v + (v >= 4 ? 1 : 0) - 4) * 0.015625;
+  }();
+  return noise;
+}
+
+inline double ClientRectsNoiseY() {
+  static const double noise = [] {
+    const uint32_t v =
+        static_cast<uint32_t>(HashFor("offset_y")) & 7;
+    return static_cast<double>(v + (v >= 4 ? 1 : 0) - 4) * 0.015625;
+  }();
+  return noise;
+}
+
+}  // namespace blink::fingerprint
+
+#endif  // THIRD_PARTY_BLINK_RENDERER_CORE_FINGERPRINT_CLIENT_RECTS_NOISE_H_
--- a/third_party/blink/renderer/core/dom/range.cc
+++ b/third_party/blink/renderer/core/dom/range.cc
@@ -46,6 +46,7 @@
 #include "third_party/blink/renderer/core/editing/set_selection_options.h"
 #include "third_party/blink/renderer/core/editing/visible_position.h"
 #include "third_party/blink/renderer/core/editing/visible_units.h"
+#include "third_party/blink/renderer/core/fingerprint/client_rects_noise.h"
 #include "third_party/blink/renderer/core/frame/local_dom_window.h"
 #include "third_party/blink/renderer/core/frame/local_frame.h"
 #include "third_party/blink/renderer/core/frame/settings.h"
@@ -1656,6 +1657,16 @@
   Vector<gfx::QuadF> quads;
   GetBorderAndTextQuads(quads);
 
+  // Stealth Chromium: translate quads by the seeded sub-pixel offset (pure
+  // translation; sizes unchanged).
+  if (fingerprint::NoiseEnabled()) {
+    const float dx = static_cast<float>(fingerprint::ClientRectsNoiseX());
+    const float dy = static_cast<float>(fingerprint::ClientRectsNoiseY());
+    for (gfx::QuadF& quad : quads) {
+      quad.Offset(dx, dy);
+    }
+  }
+
   return MakeGarbageCollected<DOMRectList>(quads);
 }
 
@@ -1663,7 +1674,13 @@
   // TODO(crbug.com/1499981): This should be removed once synchronized scrolling
   // impact is understood.
   SyncScrollAttemptHeuristic::DidAccessScrollOffset();
-  return DOMRect::FromRectF(BoundingRect());
+  gfx::RectF rect = BoundingRect();
+  // Stealth Chromium: seeded sub-pixel origin translation.
+  if (fingerprint::NoiseEnabled()) {
+    rect.set_x(rect.x() + static_cast<float>(fingerprint::ClientRectsNoiseX()));
+    rect.set_y(rect.y() + static_cast<float>(fingerprint::ClientRectsNoiseY()));
+  }
+  return DOMRect::FromRectF(rect);
 }
 
 // TODO(editing-dev): We should make
--- a/third_party/blink/renderer/core/dom/element.cc
+++ b/third_party/blink/renderer/core/dom/element.cc
@@ -164,6 +164,7 @@
 #include "third_party/blink/renderer/core/events/keyboard_event.h"
 #include "third_party/blink/renderer/core/execution_context/agent.h"
 #include "third_party/blink/renderer/core/execution_context/security_context.h"
+#include "third_party/blink/renderer/core/fingerprint/client_rects_noise.h"
 #include "third_party/blink/renderer/core/frame/csp/content_security_policy.h"
 #include "third_party/blink/renderer/core/frame/local_dom_window.h"
 #include "third_party/blink/renderer/core/frame/local_frame.h"
@@ -3442,6 +3443,14 @@
   if (quads.empty()) {
     return {};
   }
+  // Stealth Chromium: translate quads by the seeded sub-pixel offset.
+  if (fingerprint::NoiseEnabled()) {
+    const float dx = static_cast<float>(fingerprint::ClientRectsNoiseX());
+    const float dy = static_cast<float>(fingerprint::ClientRectsNoiseY());
+    for (gfx::QuadF& quad : quads) {
+      quad.Offset(dx, dy);
+    }
+  }
   Vector<gfx::RectF> result;
   for (auto& quad : quads) {
     result.emplace_back(quad.BoundingBox());
@@ -3473,6 +3482,12 @@
   DCHECK(element_layout_object);
   GetDocument().AdjustRectForScrollAndAbsoluteZoom(result,
                                                    *element_layout_object);
+  // Stealth Chromium: seeded sub-pixel origin translation after scroll/zoom
+  // adjustment.
+  if (fingerprint::NoiseEnabled()) {
+    result.set_x(result.x() + static_cast<float>(fingerprint::ClientRectsNoiseX()));
+    result.set_y(result.y() + static_cast<float>(fingerprint::ClientRectsNoiseY()));
+  }
   return result;
 }
 
--- a/third_party/blink/renderer/core/html/html_element.cc
+++ b/third_party/blink/renderer/core/html/html_element.cc
@@ -23,6 +23,7 @@
  *
  */
 
+#include "third_party/blink/renderer/core/fingerprint/client_rects_noise.h"
 #include "third_party/blink/renderer/core/html/html_element.h"
 
 #include <iterator>
@@ -3558,6 +3559,14 @@
   if (const auto* layout_object = GetLayoutBoxModelObject()) {
     result = AdjustedOffsetForZoom(layout_object->OffsetWidth());
   }
+  // Stealth Chromium: deterministic integer noise for large-enough values;
+  // offset in [-30, +50] px keyed to (seed, element id).
+  if (result >= 51 && fingerprint::NoiseEnabled()) {
+    const std::string hash_input = fingerprint::SeedString() + "|offsetWidth|" +
+                                   GetIdAttribute().Utf8();
+    const uint32_t h = static_cast<uint32_t>(fingerprint::Hash(hash_input));
+    result += static_cast<int>(h % 81u) - 30;
+  }
   return result;
 }
 
@@ -3569,6 +3578,14 @@
   if (const auto* layout_object = GetLayoutBoxModelObject()) {
     result = AdjustedOffsetForZoom(layout_object->OffsetHeight());
   }
+  // Stealth Chromium: see offsetWidthForBinding.
+  if (result >= 51 && fingerprint::NoiseEnabled()) {
+    const std::string hash_input = fingerprint::SeedString() +
+                                   "|offsetHeight|" +
+                                   GetIdAttribute().Utf8();
+    const uint32_t h = static_cast<uint32_t>(fingerprint::Hash(hash_input));
+    result += static_cast<int>(h % 81u) - 30;
+  }
   return result;
 }
 

Original source.

0015: AudioBuffer samples

The JavaScript-facing getter and copyFromChannel add small deterministic perturbations once per channel. The revised patch leaves Chromium’s internal getter alone: offline rendering uses it to share storage before writing the samples. It also fixes the helper’s namespace. The original hook sat before rendering, where the renderer would overwrite its noise.

The opening figure simulates this revised readback on recorded inputs. A silent buffer exposes the same per-index offset for subtraction, so changing the fingerprint sum does not establish resistance to fingerprinting. Audio processing still comes from the real implementation; no complete patched browser build was run for this post.

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Stealth Chromium contributors
Date: Thu, 1 Jan 2026 00:00:00 +0000
Subject: [PATCH 15/46] fingerprint: deterministic AudioBuffer sample noise
X-Spec: patches/06-audio-noise.md
X-Files: third_party/blink/renderer/modules/webaudio/audio_buffer.h third_party/blink/renderer/modules/webaudio/audio_buffer.cc

---

--- a/third_party/blink/renderer/modules/webaudio/audio_buffer.h
+++ b/third_party/blink/renderer/modules/webaudio/audio_buffer.h
@@ -127,6 +127,10 @@
   uint32_t length_;
 
   HeapVector<Member<DOMFloat32Array>> channels_;
+
+  // Stealth Chromium: bit per channel marking that the deterministic noise has
+  // been applied, so repeated reads never accumulate.
+  uint32_t noise_channel_mask_ = 0;
 };
 
 // Shared data that audio threads can hold onto.
--- a/third_party/blink/renderer/modules/webaudio/audio_buffer.cc
+++ b/third_party/blink/renderer/modules/webaudio/audio_buffer.cc
@@ -28,6 +28,7 @@
 
 #include "third_party/blink/renderer/modules/webaudio/audio_buffer.h"
 
+#include <algorithm>
 #include <memory>
 
 #include "base/compiler_specific.h"
@@ -39,6 +40,28 @@
 #include "third_party/blink/renderer/platform/bindings/exception_messages.h"
 #include "third_party/blink/renderer/platform/bindings/exception_state.h"
 #include "third_party/blink/renderer/platform/wtf/text/strcat.h"
+#include "third_party/blink/public/common/fingerprint/fingerprint.h"
+
+namespace {
+
+// Stealth Chromium: deterministic per-sample perturbation of AudioBuffer channel
+// data (±5e-6 amplitude), keyed to (identity seed, sample index). Applied
+// once per channel before JS sees the data.
+void ApplyAudioFingerprintNoise(float* data, size_t length) {
+  if (!blink::fingerprint::NoiseEnabled() || !data || length == 0) {
+    return;
+  }
+  const uint32_t hash = static_cast<uint32_t>(blink::fingerprint::HashFor("audio"));
+  for (size_t i = 0; i < length; ++i) {
+    uint32_t v = static_cast<uint32_t>(i) ^ hash;
+    v = v * 0x17385CA9u + 0x47502932u;
+    const float delta = static_cast<float>(
+        (static_cast<double>(v) / 4294967296.0 - 0.5) * 1e-5);
+    data[i] = std::clamp(data[i] + delta, -1.0f, 1.0f);
+  }
+}
+
+}  // namespace
 
 namespace blink {
 
@@ -212,7 +235,17 @@
     return NotShared<DOMFloat32Array>(nullptr);
   }
 
-  return getChannelData(channel_index);
+  DOMFloat32Array* array = channels_[channel_index].Get();
+  // Apply only at the JS-facing boundary. The internal overload is also used
+  // to share uninitialized storage before offline rendering fills it. Marking
+  // the channel there would consume the guard before samples exist.
+  if (array && channel_index < 32 &&
+      !(noise_channel_mask_ & (1u << channel_index))) {
+    const auto span = array->AsSpan();
+    ApplyAudioFingerprintNoise(span.data(), span.size());
+    noise_channel_mask_ |= (1u << channel_index);
+  }
+  return NotShared<DOMFloat32Array>(array);
 }
 
 NotShared<DOMFloat32Array> AudioBuffer::getChannelData(unsigned channel_index) {
@@ -250,6 +283,16 @@
     return;
   }
 
+  // Stealth Chromium: perturb the source channel once before copying out.
+  if (channel_number < 32) {
+    DOMFloat32Array* source_array = channels_[channel_number].Get();
+    if (source_array && !(noise_channel_mask_ & (1u << channel_number))) {
+      const auto source_span = source_array->AsSpan();
+      ApplyAudioFingerprintNoise(source_span.data(), source_span.size());
+      noise_channel_mask_ |= (1u << channel_number);
+    }
+  }
+
   base::span<const float> src = channels_[channel_number].Get()->AsSpan();
   base::span<float> dst = destination->AsSpan();
 

Revised source.

0016: WebGL GPU identity and limits

An embedded model database supplies seed-selected GPU strings, with explicit vendor/renderer overrides and platform-specific formatting. The patch also changes several reported limits. These describe a persona; the real driver still executes work. An advertised limit or model can therefore be checked against allocation, rendering, or performance behavior.

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Stealth Chromium contributors
Date: Thu, 1 Jan 2026 00:00:00 +0000
Subject: [PATCH 16/33] fingerprint: WebGL vendor/renderer persona with NVIDIA model database
X-Spec: patches/13-webgl-vendor-renderer.md, patches/15-gpu-model-database.md
X-Files: third_party/blink/renderer/modules/webgl/gpu_fingerprint.h third_party/blink/renderer/modules/webgl/gpu_fingerprint.cc third_party/blink/renderer/modules/webgl/BUILD.gn third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc

---

--- a/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc
+++ b/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc
@@ -53,6 +53,7 @@
 #include "media/renderers/paint_canvas_video_renderer.h"
 #include "third_party/blink/public/common/features.h"
 #include "third_party/blink/public/common/fingerprint/fingerprint.h"
+#include "third_party/blink/renderer/modules/webgl/gpu_fingerprint.h"
 #include "third_party/blink/public/common/thread_safe_browser_interface_broker_proxy.h"
 #include "third_party/blink/public/mojom/gpu/gpu.mojom-blink.h"
 #include "third_party/blink/public/platform/platform.h"
@@ -1395,6 +1396,33 @@
       max_cube_map_texture_size_, max_cube_map_texture_size_, 1);
   max_renderbuffer_size_ = 0;
   ContextGL()->GetIntegerv(GL_MAX_RENDERBUFFER_SIZE, &max_renderbuffer_size_);
+
+  // Stealth Chromium: persona GPU limits. Real hardware report stays untouched
+  // internally; only the JS-visible cached limits are adjusted.
+  if (IsFingerprintGpuActive()) {
+    const std::string platform = ResolveFingerprintGpuPlatform();
+    if (platform == "macos") {
+      max_texture_size_ = std::max(max_texture_size_, 16384);
+      max_renderbuffer_size_ = std::max(max_renderbuffer_size_, 16384);
+      max_viewport_dims_[0] = std::max(max_viewport_dims_[0], 16384);
+      max_viewport_dims_[1] = std::max(max_viewport_dims_[1], 16384);
+    } else if (platform == "linux") {
+      const std::string renderer = GetGLRendererStringForFingerprint();
+      const bool big_gpu = renderer.find("NVIDIA") != std::string::npos ||
+                           renderer.find("AMD") != std::string::npos ||
+                           renderer.find("Radeon") != std::string::npos;
+      max_texture_size_ = std::max(max_texture_size_, big_gpu ? 32768 : 16384);
+      max_renderbuffer_size_ =
+          std::max(max_renderbuffer_size_, big_gpu ? 32768 : 16384);
+      max_viewport_dims_[0] = std::max(max_viewport_dims_[0], 32767);
+      max_viewport_dims_[1] = std::max(max_viewport_dims_[1], 32767);
+    } else {  // windows persona
+      max_texture_size_ = std::max(max_texture_size_, 16384);
+      max_renderbuffer_size_ = std::max(max_renderbuffer_size_, 32767);
+      max_viewport_dims_[0] = std::max(max_viewport_dims_[0], 32767);
+      max_viewport_dims_[1] = std::max(max_viewport_dims_[1], 32767);
+    }
+  }
 
   // These two values from EXT_draw_buffers are lazily queried.
   max_draw_buffers_ = 0;
@@ -3849,10 +3877,16 @@
     case GL_LINE_WIDTH:
       return GetFloatParameter(script_state, pname);
     case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS:
+      if (IsFingerprintGpuActive()) {
+        return WebGLAny(script_state, 32);
+      }
       return GetIntParameter(script_state, pname);
     case GL_MAX_CUBE_MAP_TEXTURE_SIZE:
       return GetIntParameter(script_state, pname);
     case GL_MAX_FRAGMENT_UNIFORM_VECTORS:
+      if (IsFingerprintGpuActive()) {
+        return WebGLAny(script_state, 1024);
+      }
       return GetIntParameter(script_state, pname);
     case GL_MAX_RENDERBUFFER_SIZE:
       return GetIntParameter(script_state, pname);
@@ -3861,12 +3895,21 @@
     case GL_MAX_TEXTURE_SIZE:
       return GetIntParameter(script_state, pname);
     case GL_MAX_VARYING_VECTORS:
+      if (IsFingerprintGpuActive()) {
+        return WebGLAny(script_state, 30);
+      }
       return GetIntParameter(script_state, pname);
     case GL_MAX_VERTEX_ATTRIBS:
       return GetIntParameter(script_state, pname);
     case GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS:
+      if (IsFingerprintGpuActive()) {
+        return WebGLAny(script_state, 16);
+      }
       return GetIntParameter(script_state, pname);
     case GL_MAX_VERTEX_UNIFORM_VECTORS:
+      if (IsFingerprintGpuActive()) {
+        return WebGLAny(script_state, 4095);
+      }
       return GetIntParameter(script_state, pname);
     case GL_MAX_VIEWPORT_DIMS:
       return GetWebGLIntArrayParameter(script_state, pname);
@@ -3979,6 +4022,13 @@
       return ScriptValue::CreateNull(script_state->GetIsolate());
     case WebGLDebugRendererInfo::kUnmaskedRendererWebgl:
       if (ExtensionEnabled(kWebGLDebugRendererInfoName)) {
+        // Stealth Chromium: persona renderer string when GPU spoofing is active.
+        if (IsFingerprintGpuActive()) {
+          const std::string renderer = GetGLRendererStringForFingerprint();
+          if (!renderer.empty()) {
+            return WebGLAny(script_state, String::FromUTF8(renderer));
+          }
+        }
         return WebGLAny(script_state,
                         String(ContextGL()->GetString(GL_RENDERER)));
       }
@@ -3988,6 +4038,13 @@
       return ScriptValue::CreateNull(script_state->GetIsolate());
     case WebGLDebugRendererInfo::kUnmaskedVendorWebgl:
       if (ExtensionEnabled(kWebGLDebugRendererInfoName)) {
+        // Stealth Chromium: persona vendor string when GPU spoofing is active.
+        if (IsFingerprintGpuActive()) {
+          const std::string vendor = GetGLVendorStringForFingerprint();
+          if (!vendor.empty()) {
+            return WebGLAny(script_state, String::FromUTF8(vendor));
+          }
+        }
         return WebGLAny(script_state,
                         String(ContextGL()->GetString(GL_VENDOR)));
       }
--- /dev/null
+++ b/third_party/blink/renderer/modules/webgl/gpu_fingerprint.h
@@ -0,0 +1,32 @@
+// Copyright 2026 The Stealth Chromium Authors
+// Use of this source code is governed by a GPLv3 license that can be
+// found in the LICENSE file of the Stealth Chromium distribution.
+
+#ifndef THIRD_PARTY_BLINK_RENDERER_MODULES_WEBGL_GPU_FINGERPRINT_H_
+#define THIRD_PARTY_BLINK_RENDERER_MODULES_WEBGL_GPU_FINGERPRINT_H_
+
+#include <string>
+
+namespace blink {
+
+// Identity-seed-driven WebGL GPU persona. When none of
+// --fingerprint-gpu-vendor / --fingerprint-gpu-renderer / --fingerprint is
+// present every getter returns the empty string and callers fall back to
+// stock GPU values.
+bool IsFingerprintGpuActive();
+
+// Lowercased --fingerprint-platform, default "linux" when absent (the
+// vendor/renderer pools pick per-OS strings).
+std::string ResolveFingerprintGpuPlatform();
+
+// UNMASKED_VENDOR_WEBGL persona; "" = no spoof.
+std::string GetGLVendorStringForFingerprint();
+
+// UNMASKED_RENDERER_WEBGL persona (ANGLE-style string derived from the
+// embedded NVIDIA model database, or an Apple SoC on the macOS persona);
+// "" = no spoof.
+std::string GetGLRendererStringForFingerprint();
+
+}  // namespace blink
+
+#endif  // THIRD_PARTY_BLINK_RENDERER_MODULES_WEBGL_GPU_FINGERPRINT_H_
--- /dev/null
+++ b/third_party/blink/renderer/modules/webgl/gpu_fingerprint.cc
@@ -0,0 +1,196 @@
+// Copyright 2026 The Stealth Chromium Authors
+// Use of this source code is governed by a GPLv3 license that can be
+// found in the LICENSE file of the Stealth Chromium distribution.
+
+#include "third_party/blink/renderer/modules/webgl/gpu_fingerprint.h"
+
+#include <cstdint>
+#include <vector>
+
+#include "base/command_line.h"
+#include "base/strings/string_util.h"
+#include "third_party/blink/public/common/fingerprint/fingerprint.h"
+#include "third_party/blink/public/common/switches.h"
+
+namespace blink {
+
+namespace {
+
+// NVIDIA desktop/laptop models with real PCI device IDs (RTX 30 = GA10x,
+// RTX 40 = AD10x, RTX 50 = GB20x). Table lineage: ungoogled-chromium.
+struct GpuModel {
+  const char* name;
+  const char* device_id;
+};
+
+constexpr GpuModel kNvidiaGpuModels[] = {
+    {"GeForce RTX 3050", "0x00002507"},
+    {"GeForce RTX 3050", "0x00002582"},
+    {"GeForce RTX 3050 6GB Laptop GPU", "0x000025EC"},
+    {"GeForce RTX 3050 Laptop GPU", "0x000025A2"},
+    {"GeForce RTX 3050 Ti Laptop GPU", "0x000025A0"},
+    {"GeForce RTX 3060", "0x00002487"},
+    {"GeForce RTX 3060", "0x00002503"},
+    {"GeForce RTX 3060", "0x00002504"},
+    {"GeForce RTX 3060 Laptop GPU", "0x00002520"},
+    {"GeForce RTX 3060 Laptop GPU", "0x00002560"},
+    {"GeForce RTX 3060 Ti", "0x00002486"},
+    {"GeForce RTX 3060 Ti", "0x00002489"},
+    {"GeForce RTX 3060 Ti", "0x000024C9"},
+    {"GeForce RTX 3070", "0x00002484"},
+    {"GeForce RTX 3070", "0x00002488"},
+    {"GeForce RTX 3070 Ti", "0x00002482"},
+    {"GeForce RTX 3070 Ti Laptop GPU", "0x000024A0"},
+    {"GeForce RTX 3080", "0x00002206"},
+    {"GeForce RTX 3080", "0x0000220A"},
+    {"GeForce RTX 3080", "0x00002216"},
+    {"GeForce RTX 3080 Laptop GPU", "0x0000249C"},
+    {"GeForce RTX 3080 Laptop GPU", "0x000024DC"},
+    {"GeForce RTX 3080 Ti", "0x00002208"},
+    {"GeForce RTX 3080 Ti Laptop GPU", "0x00002420"},
+    {"GeForce RTX 3080 Ti Laptop GPU", "0x00002460"},
+    {"GeForce RTX 3090", "0x00002204"},
+    {"GeForce RTX 3090 Ti", "0x00002203"},
+    {"GeForce RTX 4050 Laptop GPU", "0x000028A1"},
+    {"GeForce RTX 4050 Laptop GPU", "0x000028E1"},
+    {"GeForce RTX 4060", "0x00002882"},
+    {"GeForce RTX 4060 Laptop GPU", "0x000028A0"},
+    {"GeForce RTX 4060 Laptop GPU", "0x000028E0"},
+    {"GeForce RTX 4060 Ti", "0x00002803"},
+    {"GeForce RTX 4060 Ti", "0x00002805"},
+    {"GeForce RTX 4070", "0x00002786"},
+    {"GeForce RTX 4070 Laptop GPU", "0x00002820"},
+    {"GeForce RTX 4070 Laptop GPU", "0x00002860"},
+    {"GeForce RTX 4070 SUPER", "0x00002783"},
+    {"GeForce RTX 4070 Ti", "0x00002782"},
+    {"GeForce RTX 4070 Ti SUPER", "0x00002705"},
+    {"GeForce RTX 4080", "0x00002704"},
+    {"GeForce RTX 4080 Laptop GPU", "0x000027A0"},
+    {"GeForce RTX 4080 Laptop GPU", "0x000027E0"},
+    {"GeForce RTX 4080 SUPER", "0x00002702"},
+    {"GeForce RTX 4090", "0x00002684"},
+    {"GeForce RTX 4090 Laptop GPU", "0x00002717"},
+    {"GeForce RTX 4090 Laptop GPU", "0x00002757"},
+    {"GeForce RTX 5070", "0x00002F04"},
+    {"GeForce RTX 5070 Ti", "0x00002C05"},
+    {"GeForce RTX 5070 Ti Laptop GPU", "0x00002F18"},
+    {"GeForce RTX 5070 Ti Laptop GPU", "0x00002F58"},
+    {"GeForce RTX 5080", "0x00002C02"},
+    {"GeForce RTX 5080 Laptop GPU", "0x00002C19"},
+    {"GeForce RTX 5080 Laptop GPU", "0x00002C59"},
+    {"GeForce RTX 5090", "0x00002B85"},
+    {"GeForce RTX 5090 Laptop GPU", "0x00002C18"},
+    {"GeForce RTX 5090 Laptop GPU", "0x00002C58"},
+};
+
+constexpr size_t kNvidiaGpuModelCount = std::size(kNvidiaGpuModels);
+
+// Apple SoCs for the macOS persona.
+constexpr const char* kAppleGpuModels[] = {
+    "M1", "M1 Pro", "M2", "M2 Max", "M2 Pro",
+    "M3", "M3 Max", "M3 Pro", "M4", "M4 Max", "M4 Pro",
+};
+
+constexpr char kWindowsVendorString[] = "NVIDIA";
+constexpr char kLinuxVendorString[] = "NVIDIA Corporation";
+constexpr char kLinuxGpuSuffix[] = "/PCIe/SSE2, OpenGL 4.5.0 NVIDIA 565.77";
+
+}  // namespace
+
+bool IsFingerprintGpuActive() {
+  const base::CommandLine& cmd = *base::CommandLine::ForCurrentProcess();
+  return cmd.HasSwitch(switches::kFingerprintGpuRenderer) ||
+         cmd.HasSwitch(switches::kFingerprintGpuVendor) ||
+         cmd.HasSwitch(switches::kFingerprint);
+}
+
+std::string ResolveFingerprintGpuPlatform() {
+  const base::CommandLine& cmd = *base::CommandLine::ForCurrentProcess();
+  if (cmd.HasSwitch(switches::kFingerprintPlatform)) {
+    const std::string value =
+        cmd.GetSwitchValueASCII(switches::kFingerprintPlatform);
+    if (base::IsStringASCII(value)) {
+      return base::ToLowerASCII(value);
+    }
+  }
+  return "linux";
+}
+
+std::string GetGLVendorStringForFingerprint() {
+  const base::CommandLine& cmd = *base::CommandLine::ForCurrentProcess();
+  if (cmd.HasSwitch(switches::kFingerprintGpuVendor)) {
+    const std::string value =
+        cmd.GetSwitchValueASCII(switches::kFingerprintGpuVendor);
+    return base::IsStringASCII(value) ? value : std::string();
+  }
+  if (!cmd.HasSwitch(switches::kFingerprint)) {
+    return std::string();
+  }
+  const std::string platform = ResolveFingerprintGpuPlatform();
+  if (platform == "macos") {
+    return "Google Inc. (Apple)";
+  }
+  if (platform == "linux") {
+    return "Google Inc. (NVIDIA Corporation)";
+  }
+  return "Google Inc. (NVIDIA)";
+}
+
+std::string GetGLRendererStringForFingerprint() {
+  const base::CommandLine& cmd = *base::CommandLine::ForCurrentProcess();
+  std::string value;
+  bool have_renderer = false;
+  if (cmd.HasSwitch(switches::kFingerprintGpuRenderer)) {
+    value = cmd.GetSwitchValueASCII(switches::kFingerprintGpuRenderer);
+    if (!base::IsStringASCII(value)) {
+      value.clear();
+    }
+    have_renderer = true;
+  } else if (cmd.HasSwitch(switches::kFingerprint)) {
+    value = fingerprint::SeedString();
+  } else {
+    return std::string();
+  }
+
+  const std::string platform = ResolveFingerprintGpuPlatform();
+
+  if (have_renderer) {
+    if (base::StartsWith(value, "ANGLE (")) {
+      return value;
+    }
+    if (platform == "windows" || platform == "linux") {
+      for (const GpuModel& model : kNvidiaGpuModels) {
+        if (value.find(model.name) != std::string::npos) {
+          if (platform == "linux") {
+            return "ANGLE (" + std::string(kLinuxVendorString) + ", " + value +
+                   kLinuxGpuSuffix + ")";
+          }
+          return "ANGLE (" + std::string(kWindowsVendorString) + ", " + value +
+                 " (" + model.device_id +
+                 ") Direct3D11 vs_5_0 ps_5_0, D3D11)";
+        }
+      }
+    }
+    return value;
+  }
+
+  // Seed path: deterministic index into the model database.
+  const uint32_t hash =
+      static_cast<uint32_t>(fingerprint::HashFor("gpu_renderer"));
+  if (platform == "macos") {
+    return "ANGLE (Apple, ANGLE Metal Renderer: Apple " +
+           std::string(kAppleGpuModels[hash % std::size(kAppleGpuModels)]) +
+           ", Unspecified Version)";
+  }
+  const GpuModel& model = kNvidiaGpuModels[hash % kNvidiaGpuModelCount];
+  if (platform == "linux") {
+    return "ANGLE (" + std::string(kLinuxVendorString) + ", NVIDIA " +
+           model.name + kLinuxGpuSuffix + ")";
+  }
+  // Windows persona: full ANGLE D3D11 renderer string.
+  return "ANGLE (" + std::string(kWindowsVendorString) + ", NVIDIA " +
+         model.name + " (" + model.device_id +
+         ") Direct3D11 vs_5_0 ps_5_0, D3D11)";
+}
+
+}  // namespace blink
--- a/third_party/blink/renderer/modules/webgl/BUILD.gn
+++ b/third_party/blink/renderer/modules/webgl/BUILD.gn
@@ -43,6 +43,8 @@
     "ext_texture_compression_rgtc.h",
     "ext_texture_filter_anisotropic.cc",
     "ext_texture_filter_anisotropic.h",
+    "gpu_fingerprint.cc",
+    "gpu_fingerprint.h",
     "ext_texture_mirror_clamp_to_edge.cc",
     "ext_texture_mirror_clamp_to_edge.h",
     "ext_texture_norm_16.cc",

Original source.

0017: Storage quota

Storage estimates use a seed-derived quota in the 400–600 MiB range when the real quota exceeds one GiB, or when an explicit override is supplied. Reported quota never drops below actual usage. This keeps that basic inequality intact while leaving the underlying storage system and its behavior unchanged.

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Stealth Chromium contributors
Date: Thu, 1 Jan 2026 00:00:00 +0000
Subject: [PATCH 17/33] fingerprint: navigator.storage quota persona
X-Spec: patches/12-storage-quota.md
X-Files: third_party/blink/renderer/modules/quota/fingerprint_quota.h third_party/blink/renderer/modules/quota/storage_manager.cc third_party/blink/renderer/modules/quota/deprecated_storage_quota.cc

---

--- /dev/null
+++ b/third_party/blink/renderer/modules/quota/fingerprint_quota.h
@@ -0,0 +1,51 @@
+// Copyright 2026 The Stealth Chromium Authors
+// Use of this source code is governed by a GPLv3 license that can be
+// found in the LICENSE file of the Stealth Chromium distribution.
+
+#ifndef THIRD_PARTY_BLINK_RENDERER_MODULES_QUOTA_FINGERPRINT_QUOTA_H_
+#define THIRD_PARTY_BLINK_RENDERER_MODULES_QUOTA_FINGERPRINT_QUOTA_H_
+
+#include <algorithm>
+#include <cstdint>
+
+#include "base/command_line.h"
+#include "third_party/blink/public/common/fingerprint/fingerprint.h"
+#include "third_party/blink/public/common/switches.h"
+
+// navigator.storage quota persona. Reported quota is deterministic per
+// identity seed, uniform in [400 MiB, 600 MiB); an explicit
+// --fingerprint-storage-quota=<MiB> wins. Real usage is never altered.
+namespace blink::fingerprint {
+
+inline int64_t NormalizeQuotaForFingerprint() {
+  if (!Enabled()) {
+    return 0;
+  }
+  if (auto mib = SwitchUint(switches::kFingerprintStorageQuota)) {
+    if (*mib > 0) {
+      return static_cast<int64_t>(*mib) << 20;
+    }
+  }
+  if (!Seed()) {
+    return 0;
+  }
+  const double jitter = RandomFor("storagequota") * 209715200.0;  // 200 MiB
+  return (int64_t{400} << 20) + static_cast<int64_t>(jitter);
+}
+
+// Vendor rule: spoof only when the real quota is large (>1 GiB, i.e. a real
+// disk-backed pool) or an explicit switch was passed; never report a quota
+// below actual usage.
+inline int64_t ApplyQuotaPersona(int64_t real_quota, int64_t usage) {
+  const int64_t spoof = NormalizeQuotaForFingerprint();
+  const bool explicit_switch = Enabled() && base::CommandLine::ForCurrentProcess()
+      ->HasSwitch(switches::kFingerprintStorageQuota);
+  if (spoof > 0 && (real_quota > (int64_t{1} << 30) || explicit_switch)) {
+    return std::max(usage, spoof);
+  }
+  return real_quota;
+}
+
+}  // namespace blink::fingerprint
+
+#endif  // THIRD_PARTY_BLINK_RENDERER_MODULES_QUOTA_FINGERPRINT_QUOTA_H_
--- a/third_party/blink/renderer/modules/quota/storage_manager.cc
+++ b/third_party/blink/renderer/modules/quota/storage_manager.cc
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "third_party/blink/renderer/modules/quota/fingerprint_quota.h"
 #include "third_party/blink/renderer/modules/quota/storage_manager.h"
 
 #include "mojo/public/cpp/bindings/callback_helpers.h"
@@ -69,7 +70,10 @@
 
   StorageEstimate* estimate = StorageEstimate::Create();
   estimate->setUsage(usage_in_bytes);
-  estimate->setQuota(quota_in_bytes);
+  // Stealth Chromium: persona quota (deterministic per seed, [400, 600) MiB);
+  // usage stays real.
+  estimate->setQuota(fingerprint::ApplyQuotaPersona(quota_in_bytes,
+                                                    usage_in_bytes));
 
   // We only want to show usage details for systems that are used by the app,
   // this way we do not create any web compatibility issues by unecessarily
--- a/third_party/blink/renderer/modules/quota/deprecated_storage_quota.cc
+++ b/third_party/blink/renderer/modules/quota/deprecated_storage_quota.cc
@@ -44,6 +44,7 @@
 #include "third_party/blink/renderer/core/execution_context/execution_context.h"
 #include "third_party/blink/renderer/core/frame/web_feature.h"
 #include "third_party/blink/renderer/modules/quota/dom_error.h"
+#include "third_party/blink/renderer/modules/quota/fingerprint_quota.h"
 #include "third_party/blink/renderer/modules/quota/quota_utils.h"
 #include "third_party/blink/renderer/platform/bindings/script_state.h"
 #include "third_party/blink/renderer/platform/instrumentation/use_counter.h"
@@ -73,8 +74,10 @@
   }
 
   if (success_callback) {
-    success_callback->InvokeAndReportException(nullptr, usage_in_bytes,
-                                               quota_in_bytes);
+    // Stealth Chromium: persona quota (see fingerprint_quota.h).
+    success_callback->InvokeAndReportException(
+        nullptr, usage_in_bytes,
+        fingerprint::ApplyQuotaPersona(quota_in_bytes, usage_in_bytes));
   }
 }
 
@@ -97,7 +100,9 @@
     success_callback->InvokeAndReportException(
         nullptr,
         std::min(base::saturated_cast<int64_t>(requested_quota_in_bytes),
-                 quota_in_bytes));
+                 // Stealth Chromium: persona quota as the grant ceiling.
+                 fingerprint::ApplyQuotaPersona(quota_in_bytes,
+                                                usage_in_bytes)));
   }
 }
 

Original source.

0018: Speech voice lists

Windows and macOS personas return fixed voice tables instead of the host’s enumerated list. The Linux path retains its existing list. Speech synthesis still uses the real backend, so the presence of a voice name is separate from whether that voice can actually speak as advertised.

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Stealth Chromium contributors
Date: Thu, 1 Jan 2026 00:00:00 +0000
Subject: [PATCH 18/33] fingerprint: per-persona speechSynthesis voice lists
X-Spec: patches/32-speech-synthesis-voices.md
X-Files: third_party/blink/renderer/modules/speech/speech_synthesis.cc

---

--- a/third_party/blink/renderer/modules/speech/speech_synthesis.cc
+++ b/third_party/blink/renderer/modules/speech/speech_synthesis.cc
@@ -25,9 +25,11 @@
 
 #include "third_party/blink/renderer/modules/speech/speech_synthesis.h"
 
+
 #include <tuple>
 
 #include "build/build_config.h"
+#include "third_party/blink/public/common/fingerprint/fingerprint.h"
 #include "third_party/blink/public/common/thread_safe_browser_interface_broker_proxy.h"
 #include "third_party/blink/public/platform/browser_interface_broker_proxy.h"
 #include "third_party/blink/public/platform/platform.h"
@@ -88,6 +90,60 @@
 void SpeechSynthesis::OnSetVoiceList(
     Vector<mojom::blink::SpeechSynthesisVoicePtr> mojom_voices) {
   voice_list_.clear();
+
+  // Stealth Chromium: replace the host's real TTS voices with the persona's
+  // table (matching what stock Chrome reports on that OS). Not seed-
+  // randomized: every session of a persona reports the same voice list.
+  // speechSynthesis.speak still routes to the real backend.
+  const fingerprint::Platform persona = fingerprint::SpoofedPlatform();
+  if (persona != fingerprint::Platform::kNone &&
+      persona != fingerprint::Platform::kLinux) {
+    struct PersonaVoice {
+      const char* name;
+      const char* lang;
+      bool local_service;
+      bool is_default;
+    };
+    // Tables copied from real Chrome installs (vendor spec, patch 32).
+    static constexpr PersonaVoice kWindowsVoices[] = {
+        {"Microsoft David - English (United States)", "en-US", true, true},
+        {"Microsoft Zira - English (United States)", "en-US", true, false},
+        {"Microsoft Mark - English (United States)", "en-US", true, false},
+        {"Google US English", "en-US", false, false},
+        {"Google UK English Female", "en-GB", false, false},
+        {"Google UK English Male", "en-GB", false, false},
+    };
+    static constexpr PersonaVoice kMacVoices[] = {
+        {"Samantha", "en-US", true, true},
+        {"Alex", "en-US", true, false},
+        {"Victoria", "en-US", true, false},
+        {"Fred", "en-US", true, false},
+        {"Daniel", "en-GB", true, false},
+        {"Serena", "en-GB", true, false},
+        {"Google US English", "en-US", false, false},
+        {"Google UK English Female", "en-GB", false, false},
+        {"Google UK English Male", "en-GB", false, false},
+    };
+    const PersonaVoice* voices = persona == fingerprint::Platform::kWindows
+                                     ? kWindowsVoices
+                                     : kMacVoices;
+    const size_t count = persona == fingerprint::Platform::kWindows
+                             ? std::size(kWindowsVoices)
+                             : std::size(kMacVoices);
+    for (size_t i = 0; i < count; ++i) {
+      auto mojom_voice = mojom::blink::SpeechSynthesisVoice::New();
+      mojom_voice->voice_uri = voices[i].name;
+      mojom_voice->name = voices[i].name;
+      mojom_voice->lang = voices[i].lang;
+      mojom_voice->is_local_service = voices[i].local_service;
+      mojom_voice->is_default = voices[i].is_default;
+      voice_list_.push_back(MakeGarbageCollected<SpeechSynthesisVoice>(
+          std::move(mojom_voice)));
+    }
+    VoicesDidChange();
+    return;
+  }
+
   for (auto& mojom_voice : mojom_voices) {
     voice_list_.push_back(
         MakeGarbageCollected<SpeechSynthesisVoice>(std::move(mojom_voice)));

Original source.

0019: Media device identifiers

Device and group IDs are replaced with deterministic identifiers derived from the device class and index. Labels retain their normal permission-dependent behavior. Despite the patch comment’s broader wording, this loop does not replace the number or kinds of devices being enumerated; those remain useful things to compare.

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Stealth Chromium contributors
Date: Thu, 1 Jan 2026 00:00:00 +0000
Subject: [PATCH 19/33] fingerprint: deterministic enumerateDevices() ids and group ids
X-Spec: patches/35-mediadevices-ids.md
X-Files: third_party/blink/renderer/modules/mediastream/media_devices.cc

---

--- a/third_party/blink/renderer/modules/mediastream/media_devices.cc
+++ b/third_party/blink/renderer/modules/mediastream/media_devices.cc
@@ -17,6 +17,7 @@
 #include "mojo/public/cpp/bindings/remote.h"
 #include "services/network/public/mojom/permissions_policy/permissions_policy_feature.mojom-blink.h"
 #include "third_party/blink/public/common/features.h"
+#include "third_party/blink/public/common/fingerprint/fingerprint.h"
 #include "third_party/blink/public/common/mediastream/media_devices.h"
 #include "third_party/blink/public/mojom/media/capture_handle_config.mojom-blink.h"
 #include "third_party/blink/public/mojom/mediastream/media_devices.mojom-blink.h"
@@ -80,8 +81,24 @@
 
 BASE_FEATURE(kDeviceChangeRequiresPermission, base::FEATURE_ENABLED_BY_DEFAULT);
 
+
 namespace {
 
+// Stealth Chromium: 16 lowercase hex chars from the identity-seed hash of
+// |purpose| — mirrors the vendor's HexEncodeLower(hash64(seed + suffix)).
+std::string FingerprintMediaId(const std::string& purpose) {
+  const uint64_t hash = blink::fingerprint::HashFor(purpose);
+  char hex[17];
+  static const char kHexDigits[] = "0123456789abcdef";
+  for (int k = 0; k < 16; ++k) {
+    hex[k] = kHexDigits[(hash >> ((15 - k) * 4)) & 0xF];
+  }
+  hex[16] = '\0';
+  return std::string(hex);
+}
+
+}  // namespace
+
 template <typename IDLResolvedType>
 class PromiseResolverCallbacks final : public UserMediaRequest::Callbacks {
  public:
@@ -1315,6 +1332,24 @@
       mojom::blink::MediaDeviceType device_type =
           static_cast<mojom::blink::MediaDeviceType>(i);
       WebMediaDeviceInfo device_info = enumeration[i][j];
+
+      // Stealth Chromium: deterministic seed-derived device/group ids. Real host
+      // device topology (ids, counts, grouping) is not exposed; labels keep
+      // their permission-gated stock behavior.
+      if (fingerprint::Enabled()) {
+        const char* class_name =
+            device_type == mojom::blink::MediaDeviceType::kMediaAudioInput
+                ? "audioinput"
+                : (device_type == mojom::blink::MediaDeviceType::kMediaAudioOutput
+                       ? "audiooutput"
+                       : "videoinput");
+        device_info.group_id = FingerprintMediaId(
+            std::string("groupid_") + class_name);
+        device_info.device_id = FingerprintMediaId(
+            std::string("deviceid_") + class_name + "_" +
+            std::to_string(j));
+      }
+
       String device_label = String::FromUTF8(device_info.label);
       if (device_type == mojom::blink::MediaDeviceType::kMediaAudioInput ||
           device_type == mojom::blink::MediaDeviceType::kMediaVideoInput) {

Original source.

Input and fonts

Input handling exposes details of automation, while font lookup exposes the host. Both need changes below a navigator getter.

0020: CDP input defaults

The DevTools input handler adds a small time skew when the caller omits a timestamp, derives a missing keyboard code using a US-layout mapping, and changes the default mouse force. Explicitly supplied values remain significant. These changes alter event details; they do not produce a person’s typing rhythm or pointer trajectory.

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Stealth Chromium contributors
Date: Thu, 1 Jan 2026 00:00:00 +0000
Subject: [PATCH 20] fingerprint: naturalize CDP-injected input (timestamp jitter, key code derivation, force NaN)
X-Spec: patches/29-cdp-input-timing.md
X-Files: content/browser/devtools/protocol/input_handler.cc

---

--- a/content/browser/devtools/protocol/input_handler.cc
+++ b/content/browser/devtools/protocol/input_handler.cc
@@ -6,6 +6,7 @@
 
 #include <stddef.h>
 
+#include <limits>
 #include <memory>
 #include <tuple>
 #include <utility>
@@ -41,6 +42,7 @@
 #include "content/common/input/synthetic_tap_gesture.h"
 #include "content/common/input/synthetic_tap_gesture_params.h"
 #include "content/public/common/content_features.h"
+#include "third_party/blink/public/common/fingerprint/fingerprint.h"
 #include "third_party/blink/public/common/input/web_input_event.h"
 #include "third_party/blink/public/common/page/page_zoom.h"
 #include "ui/base/dragdrop/mojom/drag_drop_types.mojom-shared.h"
@@ -49,6 +51,7 @@
 #include "ui/events/event_constants.h"
 #include "ui/events/gesture_detection/gesture_provider_config_helper.h"
 #include "ui/events/keycodes/dom/keycode_converter.h"
+#include "ui/events/keycodes/keyboard_code_conversion.h"
 #include "ui/gfx/geometry/point_f.h"
 #include "ui/gfx/range/range.h"
 
@@ -126,9 +129,22 @@
 base::TimeTicks GetEventTimeTicks(const std::optional<double>& timestamp) {
   // Convert timestamp, in seconds since unix epoch, to an event timestamp
   // which is time ticks since platform start time.
-  return timestamp.has_value()
-             ? base::Seconds(timestamp.value()) + base::TimeTicks::UnixEpoch()
-             : base::TimeTicks::Now();
+  if (timestamp.has_value()) {
+    return base::Seconds(timestamp.value()) + base::TimeTicks::UnixEpoch();
+  }
+  base::TimeTicks now = base::TimeTicks::Now();
+  // Stealth Chromium: untimed CDP input carries the exact dispatch instant; real
+  // OS input never does. Skew each event by a fresh 0..2999 µs (LCG over
+  // the tick value itself, vendor constants) so event.timeStamp looks
+  // organic. Explicit CDP timestamps pass through untouched.
+  if (blink::fingerprint::Enabled()) {
+    const int64_t ticks = now.ToInternalValue();
+    uint32_t hash = static_cast<uint32_t>(ticks >> 32) ^
+                    static_cast<uint32_t>(ticks);
+    hash = hash * 0x19660D + 0x3C6EF35F;
+    return now + base::Microseconds(hash % 3000);
+  }
+  return now;
 }
 
 bool SetKeyboardEventText(
@@ -451,7 +467,16 @@
   mouse_event->button = event_button;
   mouse_event->click_count = click_count.value_or(0);
   mouse_event->pointer_type = GetPointerType(pointer_type.value_or(""));
-  mouse_event->force = force.value_or(0);
+  mouse_event->force =
+      force.has_value()
+          ? static_cast<float>(force.value())
+          // Stealth Chromium: real OS mouse events keep the NaN default of
+          // WebPointerProperties::force; stock CDP forced 0.0, making
+          // pressure/force JS-visible behavior differ between real and
+          // synthetic input.
+          : blink::fingerprint::Enabled()
+                ? std::numeric_limits<float>::quiet_NaN()
+                : 0;
   mouse_event->tangential_pressure = tangential_pressure.value_or(0);
   mouse_event->tilt_x = tilt_x.value_or(0);
   mouse_event->tilt_y = tilt_y.value_or(0);
@@ -1207,6 +1232,18 @@
   if (key.has_value()) {
     event.dom_key =
         static_cast<int>(ui::KeycodeConverter::KeyStringToDomKey(key.value()));
+  }
+
+  // Stealth Chromium: CDP callers commonly omit `code`; stock leaves dom_code =
+  // NONE (event.code == "" in the page — a synthetic-input tell). Derive
+  // the US-layout DomCode implied by `key`, as a real key press would.
+  if (!code.has_value() && key.has_value() &&
+      blink::fingerprint::Enabled()) {
+    const ui::DomCode derived_code = ui::UsLayoutDomKeyToDomCode(
+        ui::KeycodeConverter::KeyStringToDomKey(key.value()));
+    if (derived_code != ui::DomCode::NONE) {
+      event.dom_code = static_cast<int>(derived_code);
+    }
   }
 
   if (!host_ || !host_->GetRenderWidgetHost()) {

Original source.

0021: Pointer-event provenance and coalescing

Pointer-event construction clears the debugger-origin modifier and generates coalesced mouse samples for debugger input. The synthetic samples use seeded jitter and closely spaced timestamps. That gives a detector a generated sampling pattern to inspect, so the presence of coalesced events alone cannot establish that input came from a physical mouse.

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Stealth Chromium contributors
Date: Thu, 1 Jan 2026 00:00:00 +0000
Subject: [PATCH 21] fingerprint: PointerEvent CDP stealth (kFromDebugger scrub + synthetic coalesced events)
X-Spec: patches/33-pointer-event-input-stealth.md
X-Files: third_party/blink/renderer/core/events/pointer_event_factory.cc

---

--- a/third_party/blink/renderer/core/events/pointer_event_factory.cc
+++ b/third_party/blink/renderer/core/events/pointer_event_factory.cc
@@ -6,6 +6,7 @@
 
 #include "base/notreached.h"
 #include "base/trace_event/trace_event.h"
+#include "third_party/blink/public/common/fingerprint/fingerprint.h"
 #include "third_party/blink/renderer/bindings/core/v8/v8_pointer_event_init.h"
 #include "third_party/blink/renderer/core/events/pointer_event_util.h"
 #include "third_party/blink/renderer/core/frame/local_dom_window.h"
@@ -136,6 +137,71 @@
   pointer_event_init->setTwist(web_pointer_event.twist);
 }
 
+// Stealth Chromium: CDP-injected mouse moves (kFromDebugger set) reach the
+// renderer with an empty coalesced vector, while real OS input carries
+// coalesced samples. Synthesize a 3–5 sample stream between the previous
+// and current position — ±0.15 px per-axis jitter, interpolated
+// coordinates, timestamps spaced 16 µs apart — deterministic per identity
+// seed. Constants follow the vendor build (spec
+// patches/33-pointer-event-input-stealth.md); LCG stream seeding is
+// reconstructed, per-seed determinism is what matters.
+Vector<WebPointerEvent> SynthesizeCoalescedEvents(
+    const WebPointerEvent& event,
+    const gfx::PointF& previous_screen_position) {
+  Vector<WebPointerEvent> samples;
+
+  const gfx::PointF current = event.PositionInScreen();
+  const float delta_x = current.x() - previous_screen_position.x();
+  const float delta_y = current.y() - previous_screen_position.y();
+
+  const uint32_t hash = static_cast<uint32_t>(
+      blink::fingerprint::HashFor("coalesced"));
+  // Y axis chosen for the seed mix (axis INFERRED in the spec).
+  uint32_t state =
+      static_cast<uint32_t>(static_cast<int32_t>(1000.f * delta_y)) ^ hash;
+  state = state * 0x19660D + 0x3C6EF35F;
+  const int denominator = static_cast<int>(state % 3) + 3;
+  state = state * 0x19660D + 0x3C6EF35F;
+  const int count = static_cast<int>(state % 3) + 3;
+
+  // Two parallel 32-bit LCG streams (the vendor pairs) for x/y jitter.
+  uint32_t jitter_x_state = state;
+  uint32_t jitter_y_state = hash * 0x17385CA9 + 0x47502932;
+
+  const base::TimeTicks end = event.TimeStamp();
+  for (int i = 0; i < count; ++i) {
+    const float t = static_cast<float>(i + 1) / denominator;
+    jitter_x_state = jitter_x_state * 0x19660D + 0x3C6EF35F;
+    jitter_y_state = jitter_y_state * 0x17385CA9 + 0x47502932;
+    const float jitter_x =
+        ((jitter_x_state >> 16) / 65536.f - 0.5f) * 0.3f;
+    const float jitter_y =
+        ((jitter_y_state >> 16) / 65536.f - 0.5f) * 0.3f;
+
+    WebPointerEvent sample = event;
+    // Scrub the CDP marker so the synthesized stream matches the parent.
+    sample.SetModifiers(event.GetModifiers() &
+                        ~WebInputEvent::kFromDebugger);
+    const gfx::PointF screen_pos(previous_screen_position.x() +
+                                     delta_x * t + jitter_x,
+                                 previous_screen_position.y() +
+                                     delta_y * t + jitter_y);
+    sample.SetPositionInScreen(screen_pos);
+    // Keep the widget pair consistent with the interpolated screen pair
+    // (CDP input sets screen := widget, so both share the same offset).
+    sample.SetPositionInWidget(
+        gfx::PointF(event.PositionInWidget().x() +
+                        (screen_pos.x() - current.x()),
+                    event.PositionInWidget().y() +
+                        (screen_pos.y() - current.y())));
+    // Monotonic timestamps >= 16 µs apart ending just before the parent
+    // event; with count <= 5 the vendor's 2 ms look-back clamp never binds.
+    sample.SetTimeStamp(end - base::Microseconds((count - i) * 16));
+    samples.push_back(sample);
+  }
+  return samples;
+}
+
 }  // namespace
 
 // static
@@ -344,15 +410,21 @@
   }
 
   pointer_event_init->setView(view);
-  UpdateCommonPointerEventInit(
-      web_pointer_event,
-      GetLastPointerPosition(pointer_event_init->pointerId(), web_pointer_event,
-                             event_type),
-      view, pointer_event_init);
+  const gfx::PointF last_screen_position = GetLastPointerPosition(
+      pointer_event_init->pointerId(), web_pointer_event, event_type);
+  UpdateCommonPointerEventInit(web_pointer_event, last_screen_position, view,
+                               pointer_event_init);
 
+  // Stealth Chromium: strip the CDP/DevTools marker bit (kFromDebugger) before it
+  // reaches the DOM event; real OS input never carries it.
+  int dom_modifiers = web_pointer_event.GetModifiers();
+  const bool from_debugger =
+      (dom_modifiers & WebInputEvent::kFromDebugger) != 0;
+  if (blink::fingerprint::Enabled()) {
+    dom_modifiers &= ~WebInputEvent::kFromDebugger;
+  }
   UIEventWithKeyState::SetFromWebInputEventModifiers(
-      pointer_event_init,
-      static_cast<WebInputEvent::Modifiers>(web_pointer_event.GetModifiers()));
+      pointer_event_init, static_cast<WebInputEvent::Modifiers>(dom_modifiers));
 
   SetEventSpecificFields(pointer_event_init, type);
 
@@ -360,8 +432,17 @@
       predicted_pointer_events;
   if (type == event_type_names::kPointermove ||
       type == event_type_names::kPointerrawupdate) {
+    // Stealth Chromium: CDP mouse moves arrive with an empty coalesced vector —
+    // serve a synthesized human-looking stream instead.
+    Vector<WebPointerEvent> effective_coalesced = coalesced_events;
+    if (blink::fingerprint::Enabled() && from_debugger &&
+        web_pointer_event.pointer_type ==
+            WebPointerProperties::PointerType::kMouse) {
+      effective_coalesced =
+          SynthesizeCoalescedEvents(web_pointer_event, last_screen_position);
+    }
     coalesced_pointer_events = CreateEventSequence(
-        web_pointer_event, pointer_event_init, coalesced_events, view);
+        web_pointer_event, pointer_event_init, effective_coalesced, view);
   }
   if (type == event_type_names::kPointermove) {
     predicted_pointer_events = CreateEventSequence(

Original source.

0022: Font availability and substitution

The font cache consults platform inventories, hides host-only families under a different persona, and redirects selected Windows families toward local substitutes. An extra-font directory can extend availability. Substitution is an approximation: compatible metrics do not guarantee identical glyph outlines, fallback decisions, or rasterization.

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Stealth Chromium contributors
Date: Thu, 1 Jan 2026 00:00:00 +0000
Subject: [PATCH 22] fingerprint: font platform spoofing + per-platform font databases
X-Spec: patches/18-fonts.md
X-Files: third_party/blink/renderer/platform/fonts/font_cache.cc third_party/blink/renderer/platform/fonts/fingerprint_font_databases.h

---

--- a/third_party/blink/renderer/platform/fonts/font_cache.cc
+++ b/third_party/blink/renderer/platform/fonts/font_cache.cc
@@ -43,9 +43,11 @@
 #include "build/build_config.h"
 #include "skia/ext/font_utils.h"
 #include "third_party/blink/public/common/features.h"
+#include "third_party/blink/public/common/fingerprint/fingerprint.h"
 #include "third_party/blink/public/platform/platform.h"
 #include "third_party/blink/renderer/platform/font_family_names.h"
 #include "third_party/blink/renderer/platform/fonts/alternate_font_family.h"
+#include "third_party/blink/renderer/platform/fonts/fingerprint_font_databases.h"
 #include "third_party/blink/renderer/platform/fonts/font_cache_client.h"
 #include "third_party/blink/renderer/platform/fonts/font_data_cache.h"
 #include "third_party/blink/renderer/platform/fonts/font_description.h"
@@ -140,9 +142,21 @@
     return SystemFontPlatformData(font_description);
   }
 #endif
+
+  // Stealth Chromium: font platform spoofing (patches/18-fonts.md). Under a
+  // cross-platform persona, families that exist only on the host OS are
+  // reported unavailable (as the spoofed OS would), and Windows-only
+  // families are re-aimed at metric-compatible local fonts. Everything
+  // else proceeds through the stock cache.
+  FontFaceCreationParams effective_params(creation_params);
+  if (fingerprint_fonts::ResolveSpoofedFamily(creation_params,
+                                              effective_params) ==
+      fingerprint_fonts::FontLookupDecision::kUnavailable) {
+    return nullptr;
+  }
 
   return font_platform_data_cache_.GetOrCreateFontPlatformData(
-      this, font_description, creation_params, alternate_font_name);
+      this, font_description, effective_params, alternate_font_name);
 }
 
 void FontCache::AcceptLanguagesChanged(const String& accept_languages) {
--- /dev/null
+++ b/third_party/blink/renderer/platform/fonts/fingerprint_font_databases.h
@@ -0,0 +1,932 @@
+// Copyright 2026 The Stealth Chromium Authors
+// Use of this source code is governed by a GPLv3 license that can be
+// found in the LICENSE file of the Stealth Chromium distribution.
+
+#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_FONTS_FINGERPRINT_FONT_DATABASES_H_
+#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_FONTS_FINGERPRINT_FONT_DATABASES_H_
+
+#include <initializer_list>
+#include <map>
+#include <set>
+#include <string>
+
+#include "base/command_line.h"
+#include "base/files/file_enumerator.h"
+#include "base/files/file_path.h"
+#include "base/no_destructor.h"
+#include "base/strings/string_util.h"
+#include "build/build_config.h"
+#include "third_party/blink/public/common/fingerprint/fingerprint.h"
+#include "third_party/blink/renderer/platform/fonts/font_face_creation_params.h"
+#include "third_party/blink/renderer/platform/wtf/text/atomic_string.h"
+#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
+
+// Stealth Chromium: per-platform font databases for font platform spoofing
+// (spec patches/18-fonts.md). The three name lists are the vendor build's
+// recovered font inventories (patches/refs/font-databases.txt), kept
+// verbatim: they encode what a real Windows / macOS / Linux box has
+// installed, so availability decisions match the spoofed OS. Families that
+// exist only on the host OS are reported unavailable; Windows-only
+// families are re-aimed at metric-compatible local fonts.
+namespace blink::fingerprint_fonts {
+
+// The host OS this binary runs on, in the same vocabulary as
+// fingerprint::SpoofedPlatform(). kNone on platforms without a desktop-OS
+// persona (the spoof then applies without a host filter).
+inline fingerprint::Platform CurrentBuildPlatform() {
+#if BUILDFLAG(IS_WIN)
+  return fingerprint::Platform::kWindows;
+#elif BUILDFLAG(IS_MAC)
+  return fingerprint::Platform::kMacOs;
+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+  return fingerprint::Platform::kLinux;
+#else
+  return fingerprint::Platform::kNone;
+#endif
+}
+
+// Builds a lowercase-name set — mirrors the vendor's BuildLowercaseSet()
+// helper over initializer_list<const char*>.
+inline std::set<std::string> BuildLowercaseSet(
+    std::initializer_list<const char*> names) {
+  std::set<std::string> set;
+  for (const char* name : names) {
+    set.insert(base::ToLowerASCII(name));
+  }
+  return set;
+}
+
+// The recovered font inventories (lowercase family names).
+inline const std::set<std::string>& GetPlatformFonts(
+    fingerprint::Platform platform) {
+  static const base::NoDestructor<const std::set<std::string>> kWindowsFonts =
+      BuildLowercaseSet({
+        "Arial",
+        "Arial Black",
+        "Bahnschrift",
+        "Calibri",
+        "Cambria",
+        "Cambria Math",
+        "Candara",
+        "Cascadia Code",
+        "Cascadia Mono",
+        "Comic Sans MS",
+        "Consolas",
+        "Constantia",
+        "Corbel",
+        "Courier New",
+        "Ebrima",
+        "Franklin Gothic Medium",
+        "Gabriola",
+        "Gadugi",
+        "Georgia",
+        "HoloLens MDL2 Assets",
+        "Impact",
+        "Ink Free",
+        "Javanese Text",
+        "Leelawadee UI",
+        "Lucida Console",
+        "Lucida Sans Unicode",
+        "Malgun Gothic",
+        "Marlett",
+        "Microsoft Himalaya",
+        "Microsoft JhengHei",
+        "Microsoft New Tai Lue",
+        "Microsoft PhagsPa",
+        "Microsoft Sans Serif",
+        "Microsoft Tai Le",
+        "Microsoft YaHei",
+        "Microsoft Yi Baiti",
+        "MingLiU-ExtB",
+        "Mongolian Baiti",
+        "MS Gothic",
+        "MV Boli",
+        "Myanmar Text",
+        "Nirmala UI",
+        "Palatino Linotype",
+        "Segoe Fluent Icons",
+        "Segoe MDL2 Assets",
+        "Segoe Print",
+        "Segoe Script",
+        "Segoe UI",
+        "Segoe UI Emoji",
+        "Segoe UI Historic",
+        "Segoe UI Symbol",
+        "Segoe UI Variable",
+        "SimSun",
+        "Sitka",
+        "Sylfaen",
+        "Symbol",
+        "Tahoma",
+        "Times New Roman",
+        "Trebuchet MS",
+        "Verdana",
+        "Webdings",
+        "Wingdings",
+        "Yu Gothic",
+      });
+  static const base::NoDestructor<const std::set<std::string>> kMacosFonts =
+      BuildLowercaseSet({
+        "Academy Engraved LET",
+        "Adelle Sans Devanagari",
+        "AkayaKanadaka",
+        "AkayaTelivigala",
+        "Al Bayan",
+        "Al Firat",
+        "Al Khalil",
+        "Al Nile",
+        "Al Rafidain",
+        "Al Rafidain Al Fanni",
+        "Al Tarikh",
+        "Algiers",
+        "American Typewriter",
+        "Andale Mono",
+        "Annai MN",
+        "Apple Braille",
+        "Apple Chancery",
+        "Apple Color Emoji",
+        "Apple LiGothic",
+        "Apple LiSung",
+        "Apple SD Gothic Neo",
+        "Apple Symbols",
+        "AppleGothic",
+        "AppleMyungjo",
+        "Arial",
+        "Arial Hebrew",
+        "Arial Narrow",
+        "Arial Rounded MT",
+        "Arial Unicode MS",
+        "Arima Koshi",
+        "Arima Madurai",
+        "Asphalt",
+        "Athelas",
+        "Avenir",
+        "Avenir Next",
+        "Ayuthaya",
+        "Baghdad",
+        "Bai Jamjuree",
+        "Balega",
+        "Baloo 2",
+        "Baloo Bhai 2",
+        "Baloo Bhaijaan",
+        "Baloo Bhaina 2",
+        "Baloo Chettan 2",
+        "Baloo Da 2",
+        "Baloo Paaji 2",
+        "Baloo Tamma 2",
+        "Baloo Tammudu 2",
+        "Baloo Thambi 2",
+        "Bangla MN",
+        "Bangla Sangam MN",
+        "Bank Gothic",
+        "Baoli SC",
+        "Baoli TC",
+        "Baskerville",
+        "Basra",
+        "Bebas Neue",
+        "Beirut",
+        "BiauKaiHK",
+        "BiauKaiTC",
+        "Big Caslon",
+        "BIZ UDGothic",
+        "BIZ UDMincho",
+        "Blackmoor LET",
+        "BlairMdITC TT",
+        "BM DoHyeon OTF",
+        "BM HANNA 11yrs old OTF",
+        "BM HANNA Air OTF",
+        "BM HANNA Pro OTF",
+        "BM JUA OTF",
+        "BM KIRANGHAERANG OTF",
+        "BM YEONSUNG OTF",
+        "Bodoni 72",
+        "Bodoni 72 Oldstyle",
+        "Bodoni 72 Smallcaps",
+        "Bodoni Ornaments",
+        "Book Antiqua",
+        "Bookman Old Style",
+        "Bordeaux Roman Bold LET",
+        "Bradley Hand",
+        "Braganza",
+        "Brill Italic",
+        "Brill Roman",
+        "Brush Script MT",
+        "Cambay Devanagari",
+        "Canela",
+        "Canela Deck",
+        "Canela Text",
+        "Capitals",
+        "Carlito",
+        "Catamaran",
+        "Century Gothic",
+        "Century Schoolbook",
+        "Chakra Petch",
+        "Chalkboard",
+        "Chalkboard SE",
+        "Chalkduster",
+        "Charcoal CY",
+        "Charm",
+        "Charmonman",
+        "Charter",
+        "Cochin",
+        "Comic Sans MS",
+        "Copperplate",
+        "Corsiva Hebrew",
+        "Courier",
+        "Courier New",
+        "Damascus",
+        "Dash",
+        "Dear Joe Four",
+        "DecoType Naskh",
+        "Devanagari MT",
+        "Devanagari Sangam MN",
+        "DFKaiShu-SB-Estd-BF",
+        "Didot",
+        "Dijla",
+        "DIN Alternate",
+        "DIN Condensed",
+        "Diwan Kufi",
+        "Diwan Thuluth",
+        "Domaine Display",
+        "Druk",
+        "Druk Text",
+        "Druk Wide",
+        "Euphemia UCAS",
+        "Fahkwang",
+        "Fakt Slab Stencil Pro",
+        "Farah",
+        "Farisi",
+        "Forgotten Futurist",
+        "Founders Grotesk",
+        "Founders Grotesk Text",
+        "Futura",
+        "Galvji",
+        "Garamond",
+        "GB18030 Bitmap",
+        "Geeza Pro",
+        "Geneva",
+        "Geneva CY",
+        "Georgia",
+        "Gill Sans",
+        "Gotu",
+        "Grantha Sangam MN",
+        "Graphik",
+        "Graphik Compact",
+        "Gujarati MT",
+        "Gujarati Sangam MN",
+        "GungSeo",
+        "Gurmukhi MN",
+        "Gurmukhi MT",
+        "Gurmukhi Sangam MN",
+        "Hannotate SC",
+        "Hannotate TC",
+        "HanziPen SC",
+        "HanziPen TC",
+        "HeadLineA",
+        "Hei",
+        "Heiti SC",
+        "Heiti TC",
+        "Helvetica",
+        "Helvetica CY",
+        "Helvetica Neue",
+        "Herculanum",
+        "Hiragino Kaku Gothic Pro",
+        "Hiragino Kaku Gothic ProN",
+        "Hiragino Kaku Gothic Std",
+        "Hiragino Kaku Gothic StdN",
+        "Hiragino Maru Gothic Pro",
+        "Hiragino Maru Gothic ProN",
+        "Hiragino Mincho Pro",
+        "Hiragino Mincho ProN",
+        "Hiragino Sans",
+        "Hiragino Sans CNS",
+        "Hiragino Sans GB",
+        "Hiragino Sans TC",
+        "Hoefler Text",
+        "Hopper Script",
+        "Hubballi",
+        "Impact",
+        "InaiMathi",
+        "Iowan Old Style",
+        "ITF Devanagari",
+        "ITF Devanagari Marathi",
+        "Jaini",
+        "Jaini Purva",
+        "Jazz LET",
+        "Journal Sans New",
+        "K2D",
+        "Kai",
+        "Kailasa",
+        "Kaiti SC",
+        "Kaiti TC",
+        "Kannada MN",
+        "Kannada Sangam MN",
+        "Katari",
+        "Kavivanar",
+        "Kefa",
+        "Khmer MN",
+        "Khmer Sangam MN",
+        "Kigelia",
+        "Kigelia Arabic",
+        "Klee",
+        "Kodchasan",
+        "Kohinoor Bangla",
+        "Kohinoor Devanagari",
+        "Kohinoor Gujarati",
+        "Kohinoor Telugu",
+        "KoHo",
+        "Kokonor",
+        "Koufi Abjadi",
+        "Krub",
+        "Krungthep",
+        "KufiStandardGK",
+        "Lahore Gurmukhi",
+        "Laimoon",
+        "Lantinghei SC",
+        "Lantinghei TC",
+        "Lao MN",
+        "Lao Sangam MN",
+        "Lava Devanagari",
+        "Lava Kannada",
+        "Lava Telugu",
+        "Libian SC",
+        "Libian TC",
+        "LiHei Pro",
+        "LingWai SC",
+        "LingWai TC",
+        "LiSong Pro",
+        "Lucida Grande",
+        "Luminari",
+        "Maku",
+        "Malayalam MN",
+        "Malayalam Sangam MN",
+        "Mali",
+        "Marion",
+        "Marker Felt",
+        "Menlo",
+        "Microsoft Sans Serif",
+        "Mishafi",
+        "Mishafi Gold",
+        "Modak",
+        "Mona Lisa Solid ITC TT",
+        "Monaco",
+        "Mshtakan",
+        "Mukta",
+        "Mukta Malar",
+        "Mukta Vaani",
+        "MuktaMahee",
+        "Muna",
+        "Myanmar MN",
+        "Myanmar Sangam MN",
+        "Myriad Arabic",
+        "Nadeem",
+        "Nanum Brush Script",
+        "Nanum Pen Script",
+        "NanumGothic",
+        "NanumMyeongjo",
+        "New Peninim MT",
+        "Niramit",
+        "Nisan",
+        "Nom Na Tong",
+        "Noteworthy",
+        "Noto Nastaliq Urdu",
+        "Noto Sans Adlam",
+        "Noto Sans Armenian",
+        "Noto Sans Avestan",
+        "Noto Sans Bamum",
+        "Noto Sans Bassa Vah",
+        "Noto Sans Batak",
+        "Noto Sans Bhaiksuki",
+        "Noto Sans Brahmi",
+        "Noto Sans Buginese",
+        "Noto Sans Buhid",
+        "Noto Sans Canadian Aboriginal",
+        "Noto Sans Carian",
+        "Noto Sans Caucasian Albanian",
+        "Noto Sans Chakma",
+        "Noto Sans Cham",
+        "Noto Sans Coptic",
+        "Noto Sans Cuneiform",
+        "Noto Sans Cypriot",
+        "Noto Sans Duployan",
+        "Noto Sans Egyptian Hieroglyphs",
+        "Noto Sans Elbasan",
+        "Noto Sans Glagolitic",
+        "Noto Sans Gothic",
+        "Noto Sans Gunjala Gondi",
+        "Noto Sans Hanifi Rohingya",
+        "Noto Sans Hanunoo",
+        "Noto Sans Hatran",
+        "Noto Sans Imperial Aramaic",
+        "Noto Sans Inscriptional Pahlavi",
+        "Noto Sans Inscriptional Parthian",
+        "Noto Sans Javanese",
+        "Noto Sans Kaithi",
+        "Noto Sans Kannada",
+        "Noto Sans Kayah Li",
+        "Noto Sans Kharoshthi",
+        "Noto Sans Khojki",
+        "Noto Sans Khudawadi",
+        "Noto Sans Lepcha",
+        "Noto Sans Limbu",
+        "Noto Sans Linear A",
+        "Noto Sans Linear B",
+        "Noto Sans Lisu",
+        "Noto Sans Lycian",
+        "Noto Sans Lydian",
+        "Noto Sans Mahajani",
+        "Noto Sans Mandaic",
+        "Noto Sans Manichaean",
+        "Noto Sans Marchen",
+        "Noto Sans Masaram Gondi",
+        "Noto Sans Meetei Mayek",
+        "Noto Sans Mende Kikakui",
+        "Noto Sans Meroitic",
+        "Noto Sans Miao",
+        "Noto Sans Modi",
+        "Noto Sans Mongolian",
+        "Noto Sans Mro",
+        "Noto Sans Multani",
+        "Noto Sans Myanmar",
+        "Noto Sans Nabataean",
+        "Noto Sans New Tai Lue",
+        "Noto Sans Newa",
+        "Noto Sans NKo",
+        "Noto Sans Ol Chiki",
+        "Noto Sans Old Hungarian",
+        "Noto Sans Old Italic",
+        "Noto Sans Old North Arabian",
+        "Noto Sans Old Permic",
+        "Noto Sans Old Persian",
+        "Noto Sans Old South Arabian",
+        "Noto Sans Old Turkic",
+        "Noto Sans Oriya",
+        "Noto Sans Osage",
+        "Noto Sans Osmanya",
+        "Noto Sans Pahawh Hmong",
+        "Noto Sans Palmyrene",
+        "Noto Sans Pau Cin Hau",
+        "Noto Sans PhagsPa",
+        "Noto Sans Phoenician",
+        "Noto Sans Psalter Pahlavi",
+        "Noto Sans Rejang",
+        "Noto Sans Samaritan",
+        "Noto Sans Saurashtra",
+        "Noto Sans Sharada",
+        "Noto Sans Siddham",
+        "Noto Sans Sora Sompeng",
+        "Noto Sans Sundanese",
+        "Noto Sans Syloti Nagri",
+        "Noto Sans Syriac",
+        "Noto Sans Tagalog",
+        "Noto Sans Tagbanwa",
+        "Noto Sans Tai Le",
+        "Noto Sans Tai Tham",
+        "Noto Sans Tai Viet",
+        "Noto Sans Takri",
+        "Noto Sans Thaana",
+        "Noto Sans Tifinagh",
+        "Noto Sans Tirhuta",
+        "Noto Sans Ugaritic",
+        "Noto Sans Vai",
+        "Noto Sans Wancho",
+        "Noto Sans Warang Citi",
+        "Noto Sans Yi",
+        "Noto Sans Zawgyi",
+        "Noto Serif Ahom",
+        "Noto Serif Balinese",
+        "Noto Serif Hmong Nyiakeng",
+        "Noto Serif Kannada",
+        "Noto Serif Myanmar",
+        "Noto Serif Yezidi",
+        "November Bangla Traditional",
+        "October Compressed Devanagari",
+        "October Compressed Gujarati",
+        "October Compressed Gurmukhi",
+        "October Compressed Kannada",
+        "October Compressed Meetei Mayek",
+        "October Compressed Odia",
+        "October Compressed Ol Chiki",
+        "October Compressed Tamil",
+        "October Compressed Telugu",
+        "October Condensed Devanagari",
+        "October Condensed Gujarati",
+        "October Condensed Gurmukhi",
+        "October Condensed Kannada",
+        "October Condensed Meetei Mayek",
+        "October Condensed Odia",
+        "October Condensed Ol Chiki",
+        "October Condensed Tamil",
+        "October Condensed Telugu",
+        "October Devanagari",
+        "October Gujarati",
+        "October Gurmukhi",
+        "October Kannada",
+        "October Meetei Mayek",
+        "October Odia",
+        "October Ol Chiki",
+        "October Tamil",
+        "October Telugu",
+        "Optima",
+        "Oriya MN",
+        "Oriya Sangam MN",
+        "Osaka",
+        "Osaka-Mono",
+        "Padyakke Expanded One",
+        "Palatino",
+        "Papyrus",
+        "Party LET",
+        "PCMyungjo",
+        "Phosphate",
+        "PilGi",
+        "PingFang HK",
+        "PingFang MO",
+        "PingFang SC",
+        "PingFang TC",
+        "Plantagenet Cherokee",
+        "PortagoITC TT",
+        "Princetown LET",
+        "Produkt",
+        "Proxima Nova",
+        "PSL Ornanong Pro",
+        "PT Mono",
+        "PT Sans",
+        "PT Sans Caption",
+        "PT Sans Narrow",
+        "PT Serif",
+        "PT Serif Caption",
+        "Publico Headline",
+        "Publico Text",
+        "Quotes Caps",
+        "Quotes Script",
+        "Raanana",
+        "Raya",
+        "Rockwell",
+        "Sama Devanagari",
+        "Sama Gujarati",
+        "Sama Gurmukhi",
+        "Sama Kannada",
+        "Sama Malayalam",
+        "Sama Tamil",
+        "Sana",
+        "Santa Fe LET",
+        "Sarabun",
+        "Sathu",
+        "Sauber Script",
+        "Savoye LET",
+        "Scheme",
+        "SchoolHouse Cursive B",
+        "SchoolHouse Printed A",
+        "Seravek",
+        "SF Compact",
+        "SF Compact Display",
+        "SF Compact Rounded",
+        "SF Compact Text",
+        "SF Mono",
+        "SF Pro",
+        "SF Pro Display",
+        "SF Pro Rounded",
+        "SF Pro Text",
+        "SFNS Display",
+        "SFNS Text",
+        "Shobhika",
+        "Shree Devanagari 714",
+        "SignPainter-HouseScript",
+        "Silom",
+        "SimSong",
+        "Sinhala MN",
+        "Sinhala Sangam MN",
+        "Skia",
+        "Snell Roundhand",
+        "Somer",
+        "Songti SC",
+        "Songti TC",
+        "Spot Mono",
+        "Srisakdi",
+        "STFangsong",
+        "STHeiti",
+        "STIXGeneral",
+        "STIXIntegralsD",
+        "STIXIntegralsSm",
+        "STIXIntegralsUp",
+        "STIXIntegralsUpD",
+        "STIXIntegralsUpSm",
+        "STIXNonUnicode",
+        "STIXSizeFiveSym",
+        "STIXSizeFourSym",
+        "STIXSizeOneSym",
+        "STIXSizeThreeSym",
+        "STIXSizeTwoSym",
+        "STIX Two Math",
+        "STIX Two Text",
+        "STIXVariants",
+        "STKaiti",
+        "STSong",
+        "STXihei",
+        "Stone Sans ITC TT",
+        "Stone Sans Sem ITC TT",
+        "Sukhumvit Set",
+        "Superclarendon",
+        "Symbol",
+        "Synchro LET",
+        "Tahoma",
+        "Tamil MN",
+        "Tamil Sangam MN",
+        "Telugu MN",
+        "Telugu Sangam MN",
+        "The Hand Serif",
+        "Thonburi",
+        "Times",
+        "Times New Roman",
+        "Tiro Bangla",
+        "Tiro Devanagari Hindi",
+        "Tiro Devanagari Marathi",
+        "Tiro Devanagari Sanskrit",
+        "Tiro Gurmukhi",
+        "Tiro Kannada",
+        "Tiro Tamil",
+        "Tiro Telugu",
+        "Toppan Bunkyu Gothic",
+        "Toppan Bunkyu Midashi Gothic",
+        "Toppan Bunkyu Midashi Mincho",
+        "Toppan Bunkyu Mincho",
+        "Trattatello",
+        "Trebuchet MS",
+        "Tsukushi A Round Gothic",
+        "Tsukushi B Round Gothic",
+        "Tw Cen MT",
+        "Type Embellishments One LET",
+        "Verdana",
+        "Waseem",
+        "Wawati SC",
+        "Wawati TC",
+        "Webdings",
+        "Weibei SC",
+        "Weibei TC",
+        "Wingdings",
+        "Wingdings 2",
+        "Wingdings 3",
+        "Xingkai SC",
+        "Xingkai TC",
+        "Yaziji",
+        "Yuanti SC",
+        "Yuanti TC",
+        "YuGothic",
+        "YuKyokasho",
+        "YuKyokasho Yoko",
+        "YuMincho",
+        "YuMincho +36p Kana",
+        "Yuppy SC",
+        "Yuppy TC",
+        "Zapf Dingbats",
+        "Zapfino",
+        "Zawra",
+      });
+  static const base::NoDestructor<const std::set<std::string>> kLinuxFonts =
+      BuildLowercaseSet({
+        "Ubuntu",
+        "Ubuntu Condensed",
+        "Ubuntu Light",
+        "Ubuntu Mono",
+        "Ubuntu Sans",
+        "Ubuntu Sans Mono",
+        "DejaVu Sans",
+        "DejaVu Sans Condensed",
+        "DejaVu Sans Light",
+        "DejaVu Sans Mono",
+        "DejaVu Serif",
+        "DejaVu Serif Condensed",
+        "DejaVu Math TeX Gyre",
+        "Liberation Sans",
+        "Liberation Sans Narrow",
+        "Liberation Serif",
+        "Liberation Mono",
+        "Noto Sans",
+        "Noto Sans Display",
+        "Noto Sans Mono",
+        "Noto Serif",
+        "Noto Serif Display",
+        "Noto Mono",
+        "Noto Color Emoji",
+        "Nimbus Sans",
+        "Nimbus Sans L",
+        "Nimbus Sans Narrow",
+        "Nimbus Roman",
+        "Nimbus Roman No9 L",
+        "Nimbus Mono",
+        "Nimbus Mono L",
+        "Nimbus Mono PS",
+        "FreeSans",
+        "FreeSerif",
+        "FreeMono",
+        "Cantarell",
+        "Droid Sans",
+        "Droid Sans Mono",
+        "Droid Serif",
+        "Droid Sans Fallback",
+        "Tlwg Mono",
+        "Tlwg Typewriter",
+        "Loma",
+        "Garuda",
+        "Norasi",
+        "Padauk",
+        "LKLUG",
+      });
+  static const base::NoDestructor<const std::set<std::string>> kEmptyFonts =
+      BuildLowercaseSet({});
+  switch (platform) {
+    case fingerprint::Platform::kWindows:
+      return **kWindowsFonts;
+    case fingerprint::Platform::kMacOs:
+      return **kMacosFonts;
+    case fingerprint::Platform::kLinux:
+      return **kLinuxFonts;
+    case fingerprint::Platform::kNone:
+      break;
+  }
+  return **kEmptyFonts;
+}
+
+// Generic and basic families that must always resolve and are exempt from
+// substitution (vendor blink::IsBasicFont set, verbatim).
+inline bool IsBasicFont(const std::string& lowercase_family) {
+  static const base::NoDestructor<const std::set<std::string>> kBasicFonts =
+      BuildLowercaseSet({
+          "-webkit-standard",
+          "system-ui",
+          "arial",
+          "courier new",
+          "microsoft sans serif",
+          "roboto",
+          "sans",
+          "times new roman",
+          "cursive",
+          "fantasy",
+          "monospace",
+          "sans-serif",
+          "serif",
+          "math",
+          "blinkmacsystemfont",
+          "noto color emoji",
+          "dejavu math tex gyre",
+          "franklin gothic",
+          "franklin gothic medium",
+      });
+  return kBasicFonts->count(lowercase_family) > 0;
+}
+
+// Windows-only family (lowercase) -> metric-compatible local replacement.
+// The vendor's kWindowsAliases contents were not recovered; these entries
+// target the recovered Linux font inventory (Liberation = Arial/Times/
+// Courier metric-compatible, DejaVu for the humanist sans/mono set, Noto
+// for script coverage, Noto Color Emoji for Segoe UI Emoji).
+inline const std::map<std::string, std::string>& WindowsAliases() {
+  static const base::NoDestructor<const std::map<std::string, std::string>>
+      kWindowsAliases = std::map<std::string, std::string>{
+          {"arial black", "Liberation Sans"},
+          {"bahnschrift", "Liberation Sans Narrow"},
+          {"calibri", "Liberation Sans"},
+          {"cambria", "Liberation Serif"},
+          {"cambria math", "DejaVu Math TeX Gyre"},
+          {"candara", "Liberation Sans"},
+          {"cascadia code", "Liberation Mono"},
+          {"cascadia mono", "Liberation Mono"},
+          {"consolas", "Liberation Mono"},
+          {"constantia", "Liberation Serif"},
+          {"corbel", "Liberation Sans"},
+          {"ebrima", "Noto Sans"},
+          {"franklin gothic medium", "Liberation Sans Narrow"},
+          {"gabriola", "Liberation Serif"},
+          {"gadugi", "Noto Sans"},
+          {"hololens mdl2 assets", "DejaVu Sans"},
+          {"ink free", "Liberation Sans"},
+          {"javanese text", "Noto Sans"},
+          {"leelawadee ui", "Noto Sans"},
+          {"lucida console", "DejaVu Sans Mono"},
+          {"lucida sans unicode", "DejaVu Sans"},
+          {"malgun gothic", "Noto Sans"},
+          {"marlett", "DejaVu Sans"},
+          {"microsoft himalaya", "Noto Sans"},
+          {"microsoft jhenghei", "Noto Sans"},
+          {"microsoft new tai lue", "Noto Sans"},
+          {"microsoft phagspa", "Noto Sans"},
+          {"microsoft sans serif", "Liberation Sans"},
+          {"microsoft tai le", "Noto Sans"},
+          {"microsoft yahei", "Noto Sans"},
+          {"microsoft yi baiti", "Noto Sans"},
+          {"mingliu-extb", "Noto Sans"},
+          {"mongolian baiti", "Noto Sans"},
+          {"ms gothic", "Noto Sans"},
+          {"mv boli", "Noto Sans"},
+          {"myanmar text", "Noto Sans"},
+          {"nirmala ui", "Noto Sans"},
+          {"palatino linotype", "Liberation Serif"},
+          {"segoe fluent icons", "DejaVu Sans"},
+          {"segoe mdl2 assets", "DejaVu Sans"},
+          {"segoe print", "Liberation Sans"},
+          {"segoe script", "Liberation Sans"},
+          {"segoe ui", "DejaVu Sans"},
+          {"segoe ui emoji", "Noto Color Emoji"},
+          {"segoe ui historic", "DejaVu Sans"},
+          {"segoe ui symbol", "DejaVu Sans"},
+          {"segoe ui variable", "DejaVu Sans"},
+          {"simsun", "Noto Sans"},
+          {"sitka", "Liberation Serif"},
+          {"sylfaen", "Liberation Serif"},
+          {"symbol", "DejaVu Sans"},
+          {"tahoma", "DejaVu Sans"},
+          {"trebuchet ms", "Liberation Sans"},
+          {"verdana", "DejaVu Sans"},
+          {"webdings", "DejaVu Sans"},
+          {"wingdings", "DejaVu Sans"},
+          {"yu gothic", "Noto Sans"},
+      };
+  return **kWindowsAliases;
+}
+
+// Families provided as real font files under --fingerprint-fonts-dir
+// (convention: "<Family>.ttf" / ".otf" / ".ttc", basename = family name).
+// Scanned once; the directory acts as an extension of the spoofed
+// platform's database, so user-shipped persona fonts report available.
+// For real metrics the directory must also be fontconfig-visible (e.g.
+// symlinked into ~/.fonts); family matching here only decides
+// availability, since FontFaceCreationParams at 146 has no create-from-
+// file path (kCreateFontByFciIdAndTtcIndex is fontconfig-internal).
+inline bool FontsDirProvides(const std::string& lowercase_family) {
+  static const base::NoDestructor<const std::set<std::string>> kProvided = [] {
+    std::set<std::string> families;
+    const std::string dir = base::CommandLine::ForCurrentProcess()
+                                ->GetSwitchValueASCII(
+                                    switches::kFingerprintFontsDir);
+    if (dir.empty()) {
+      return families;
+    }
+    base::FileEnumerator enumerator(base::FilePath::FromUTF8Unsafe(dir),
+                                     /*recursive=*/false,
+                                     base::FileEnumerator::FILES);
+    for (base::FilePath path = enumerator.Next(); !path.empty();
+         path = enumerator.Next()) {
+      std::string name = path.BaseName().RemoveExtension().AsUTF8Unsafe();
+      if (!name.empty()) {
+        families.insert(base::ToLowerASCII(name));
+      }
+    }
+    return families;
+  }();
+  return kProvided->count(lowercase_family) > 0;
+}
+
+// Decision for a family-based font lookup under an active persona.
+enum class FontLookupDecision {
+  kStock,        // fingerprinting off, no persona, or non-family lookup
+  kUnavailable,  // family exists on the host OS but not on the spoofed OS
+  kProceed,      // available or unknown everywhere; |out_params| may be
+                 // rewritten to a metric-compatible local family
+};
+
+// Core hook helper for FontCache::GetFontPlatformData. Availability is
+// decided on the requested family name (Windows aliasing happens after,
+// on the proceed path — aliasing first would misclassify the aliased
+// local name as host-only).
+inline FontLookupDecision ResolveSpoofedFamily(
+    const FontFaceCreationParams& creation_params,
+    FontFaceCreationParams& out_params) {
+  if (!fingerprint::Enabled() ||
+      creation_params.CreationType() != kCreateFontByFamily) {
+    return FontLookupDecision::kStock;
+  }
+  const fingerprint::Platform spoofed = fingerprint::SpoofedPlatform();
+  const fingerprint::Platform current = CurrentBuildPlatform();
+  if (spoofed == fingerprint::Platform::kNone || spoofed == current) {
+    // Vendor gate: is_cross_platform = !(spoofed_platform == current_os).
+    return FontLookupDecision::kStock;
+  }
+
+  const std::string family =
+      base::ToLowerASCII(creation_params.Family().Utf8());
+  if (IsBasicFont(family)) {
+    return FontLookupDecision::kProceed;
+  }
+
+  const bool known_on_spoofed =
+      GetPlatformFonts(spoofed).count(family) > 0 || FontsDirProvides(family);
+  if (!known_on_spoofed &&
+      GetPlatformFonts(current).count(family) > 0) {
+    // Host-only family: report it as unavailable, as the spoofed OS would.
+    return FontLookupDecision::kUnavailable;
+  }
+
+  if (spoofed == fingerprint::Platform::kWindows) {
+    const auto it = WindowsAliases().find(family);
+    if (it != WindowsAliases().end()) {
+      // Intern the substituted name so subsequent matching uses it.
+      out_params = FontFaceCreationParams(
+          AtomicString(String::FromUTF8(it->second)));
+    }
+  }
+  return FontLookupDecision::kProceed;
+}
+
+}  // namespace blink::fingerprint_fonts
+
+#endif  // THIRD_PARTY_BLINK_RENDERER_PLATFORM_FONTS_FINGERPRINT_FONT_DATABASES_H_

Original source.

Network addresses and timing

A page can inspect WebRTC in several representations and compare those reports with Resource Timing. The remote endpoint has its own view of the connection.

0023: WebRTC candidate gathering

With a WebRTC IP override configured, the port allocator re-enables nonproxied UDP and default local candidates so later patches have addresses to rewrite. This changes network behavior as well as reporting. Replacing an address visible to JavaScript does not route packets through that address or prevent a remote endpoint from seeing their real source.

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Stealth Chromium contributors
Date: Thu, 1 Jan 2026 00:00:00 +0000
Subject: [PATCH 23] fingerprint: WebRTC port allocator force-out (IP masking)
X-Spec: patches/21-webrtc-port-allocator.md
X-Files: third_party/blink/renderer/modules/peerconnection/peer_connection_dependency_factory.cc

---

--- a/third_party/blink/renderer/modules/peerconnection/peer_connection_dependency_factory.cc
+++ b/third_party/blink/renderer/modules/peerconnection/peer_connection_dependency_factory.cc
@@ -11,6 +11,7 @@
 #include <utility>
 #include <vector>
 
+#include "base/command_line.h"
 #include "base/feature_list.h"
 #include "base/functional/callback.h"
 #include "base/functional/callback_helpers.h"
@@ -41,7 +42,9 @@
 #include "services/network/public/cpp/ip_address_space_util.h"
 #include "services/network/public/mojom/ip_address_space.mojom-shared.h"
 #include "third_party/blink/public/common/features.h"
+#include "third_party/blink/public/common/fingerprint/fingerprint.h"
 #include "third_party/blink/public/common/peerconnection/webrtc_ip_handling_policy.h"
+#include "third_party/blink/public/common/switches.h"
 #include "third_party/blink/public/mojom/peerconnection/webrtc_ip_handling_policy.mojom-blink.h"
 #include "third_party/blink/public/mojom/permissions/permission.mojom-blink.h"
 #include "third_party/blink/public/mojom/permissions/permission_status.mojom-blink-forward.h"
@@ -1094,6 +1097,18 @@
           break;
       }
 
+      // Stealth Chromium: when the WebRTC IP spoof is configured, force UDP/local
+      // candidate gathering back on regardless of the privacy policy so
+      // there are host candidates for patches 24/25 to rewrite at the string
+      // level. enable_multiple_routes (adapter enumeration filtering) and
+      // allow_mdns_obfuscation keep their policy-derived values.
+      if (fingerprint::Enabled() &&
+          base::CommandLine::ForCurrentProcess()->HasSwitch(
+              switches::kFingerprintWebrtcIp)) {
+        port_config.enable_nonproxied_udp = true;
+        port_config.enable_default_local_candidate = true;
+      }
+
       VLOG(3) << "WebRTC routing preferences: " << "policy: "
               << ToString(webrtc_ip_handling_policy)
               << ", multiple_routes: " << port_config.enable_multiple_routes

Original source.

0024: ICE candidate and SDP addresses

The patch rewrites address fields, raw candidate strings, and IP-bearing session-description lines using the configured replacement. The representations need checking together. In this snapshot, the SDP candidate-line rewrite deliberately differs from the candidate-object path’s wildcard/loopback exemptions, so the source does not support a blanket claim that they always agree.

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Stealth Chromium contributors
Date: Thu, 1 Jan 2026 00:00:00 +0000
Subject: [PATCH 24] fingerprint: WebRTC ICE candidate + SDP IP rewrite
X-Spec: patches/22-webrtc-candidate-sdp.md
X-Files: third_party/blink/renderer/platform/peerconnection/rtc_ice_candidate_platform.cc third_party/blink/renderer/modules/peerconnection/rtc_peer_connection_handler.cc

---

--- a/third_party/blink/renderer/platform/peerconnection/rtc_ice_candidate_platform.cc
+++ b/third_party/blink/renderer/platform/peerconnection/rtc_ice_candidate_platform.cc
@@ -4,6 +4,13 @@
 
 #include "third_party/blink/renderer/platform/peerconnection/rtc_ice_candidate_platform.h"
 
+#include <sstream>
+#include <string>
+
+#include "base/command_line.h"
+#include "base/strings/string_util.h"
+#include "third_party/blink/public/common/fingerprint/fingerprint.h"
+#include "third_party/blink/public/common/switches.h"
 #include "third_party/webrtc/api/candidate.h"
 #include "third_party/webrtc/p2p/base/p2p_constants.h"
 
@@ -39,6 +46,35 @@
   return String();
 }
 
+// Stealth Chromium: the --fingerprint-webrtc-ip replacement IP, or "" when the
+// WebRTC IP spoof is inactive (fingerprinting off, switch absent, empty
+// value) or the value is not pure ASCII — vendor semantics discard a
+// non-ASCII value rather than rewrite with it. Re-read independently by the
+// SDP (rtc_peer_connection_handler.cc) and getStats (rtc_stats_report.cc)
+// spoofs; keep the three readers' value semantics identical.
+std::string FingerprintWebrtcIpSpoof() {
+  if (!fingerprint::Enabled()) {
+    return std::string();
+  }
+  const base::CommandLine& cmd = *base::CommandLine::ForCurrentProcess();
+  if (!cmd.HasSwitch(switches::kFingerprintWebrtcIp)) {
+    return std::string();
+  }
+  const std::string value =
+      cmd.GetSwitchValueNative(switches::kFingerprintWebrtcIp);
+  if (!base::IsStringASCII(value)) {
+    return std::string();
+  }
+  return value;
+}
+
+// Stealth Chromium: host strings never rewritten (loopback/wildcard stay honest so
+// exempt candidates cannot disagree between the candidate object, SDP and
+// getStats()).
+bool IsExemptWebrtcHost(const std::string& host) {
+  return host.empty() || host == "0.0.0.0" || host == "127.0.0.1";
+}
+
 }  // namespace
 
 RTCIceCandidatePlatform::RTCIceCandidatePlatform(
@@ -62,6 +98,9 @@
     return;
   }
 
+  // Stealth Chromium: replacement IP for every host string this candidate exposes.
+  const std::string spoof = FingerprintWebrtcIpSpoof();
+
   const webrtc::Candidate& c = parsed_candidate.value();
 
   foundation_ = String::FromUTF8(c.foundation());
@@ -70,6 +109,11 @@
   protocol_ = String::FromUTF8(c.protocol());
   if (!c.address().IsNil()) {
     address_ = String::FromUTF8(c.address().HostAsURIString());
+    // Stealth Chromium: swap in the spoofed IP; the port is kept as gathered.
+    if (!spoof.empty() &&
+        !IsExemptWebrtcHost(c.address().HostAsURIString())) {
+      address_ = String::FromUTF8(spoof);
+    }
     port_ = c.address().port();
   }
   // The `type_name()` property returns a name as specified in:
@@ -85,12 +129,46 @@
   }
   if (!c.related_address().IsNil()) {
     related_address_ = String::FromUTF8(c.related_address().HostAsURIString());
+    // Stealth Chromium: same substitution + exemption rule as |address_|; the
+    // related port is kept as gathered.
+    if (!spoof.empty() &&
+        !IsExemptWebrtcHost(c.related_address().HostAsURIString())) {
+      related_address_ = String::FromUTF8(spoof);
+    }
     related_port_ = c.related_address().port();
   }
   // url_ is set only when the candidate was gathered locally.
   if (type_ == "relay" && priority_ && !url_.IsNull()) {
     relay_protocol_ = PriorityToRelayProtocol(*priority_);
   }
+
+  // Stealth Chromium: rebuild the raw candidate string around the spoofed
+  // connection address. The address is the 5th space-separated token
+  // (index 4 — "candidate:<foundation>" counts as one token) and the token
+  // following a literal "raddr" token is the related address; both carry
+  // the empty/0.0.0.0/127.0.0.1 exemption. Rebuilding from |candidate_|
+  // (not the parsed candidate) also rewrites fields the parser normalized.
+  if (!spoof.empty()) {
+    std::istringstream tokens(candidate_.Utf8());
+    std::string rebuilt;
+    std::string token;
+    int index = 0;
+    bool substitute = false;
+    while (tokens >> token) {
+      if (!rebuilt.empty()) {
+        rebuilt += ' ';
+      }
+      const bool next_follows_raddr = (token == "raddr");
+      if ((index == 4 || substitute) && !IsExemptWebrtcHost(token)) {
+        rebuilt += spoof;
+      } else {
+        rebuilt += token;
+      }
+      ++index;
+      substitute = next_follows_raddr;
+    }
+    candidate_ = String::FromUTF8(rebuilt);
+  }
 }
 
 }  // namespace blink
--- a/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection_handler.cc
+++ b/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection_handler.cc
@@ -10,10 +10,12 @@
 #include <functional>
 #include <memory>
 #include <set>
+#include <sstream>
 #include <string>
 #include <utility>
 #include <vector>
 
+#include "base/command_line.h"
 #include "base/compiler_specific.h"
 #include "base/location.h"
 #include "base/logging.h"
@@ -21,6 +23,7 @@
 #include "base/metrics/histogram_functions.h"
 #include "base/metrics/histogram_macros.h"
 #include "base/numerics/safe_conversions.h"
+#include "base/strings/string_util.h"
 #include "base/synchronization/waitable_event.h"
 #include "base/task/sequenced_task_runner.h"
 #include "base/task/single_thread_task_runner.h"
@@ -29,6 +32,8 @@
 #include "build/chromecast_buildflags.h"
 #include "media/base/media_switches.h"
 #include "third_party/blink/public/common/features.h"
+#include "third_party/blink/public/common/fingerprint/fingerprint.h"
+#include "third_party/blink/public/common/switches.h"
 #include "third_party/blink/public/platform/platform.h"
 #include "third_party/blink/public/platform/web_string.h"
 #include "third_party/blink/public/platform/web_url.h"
@@ -94,6 +99,78 @@
 // so treat as append-only.
 enum class RtcpMux { kDisabled, kEnabled, kNoMedia, kMax };
 
+// Stealth Chromium: rewrite the IP-bearing SDP lines of |sdp| to the
+// --fingerprint-webrtc-ip value. Returns |sdp| unchanged when the spoof is
+// inactive (fingerprinting off, switch absent/empty, non-ASCII value).
+// Semantics (spec patches/22-webrtc-candidate-sdp.md):
+// - "o=" lines: the "IN IP4 " (or "IN IP6 ") addrtype+address tail is
+//   replaced; IPv6 lines are converted to the IPv4 form with the spoof.
+// - "c=IN IP4 "/"c=IN IP6 " lines: become "c=IN IP4 <spoof>".
+// - "a=candidate:" lines: re-tokenized; the connection address (token
+//   index 4) and the token after a literal "raddr" token are replaced —
+//   deliberately without the 0.0.0.0/127.0.0.1 exemption the
+//   RTCIceCandidatePlatform object fields keep (vendor asymmetry).
+// - every other line passes through; output is CRLF-terminated.
+std::string MaybeSpoofSdpAddresses(const std::string& sdp) {
+  std::string spoof;
+  if (fingerprint::Enabled() &&
+      base::CommandLine::ForCurrentProcess()->HasSwitch(
+          switches::kFingerprintWebrtcIp)) {
+    const std::string value = base::CommandLine::ForCurrentProcess()
+                                  ->GetSwitchValueNative(
+                                      switches::kFingerprintWebrtcIp);
+    if (base::IsStringASCII(value)) {
+      spoof = value;
+    }
+  }
+  if (spoof.empty()) {
+    return sdp;
+  }
+
+  std::istringstream lines(sdp);
+  std::string rebuilt;
+  std::string line;
+  while (std::getline(lines, line, '\n')) {
+    if (!line.empty() && line.back() == '\r') {
+      line.pop_back();
+    }
+    if (line.rfind("o=", 0) == 0) {
+      const size_t ip4 = line.find("IN IP4 ");
+      const size_t ip6 = line.find("IN IP6 ");
+      if (ip4 != std::string::npos) {
+        line = line.substr(0, ip4 + 7) + spoof;
+      } else if (ip6 != std::string::npos) {
+        line = line.substr(0, ip6) + "IN IP4 " + spoof;
+      }
+    } else if (line.rfind("c=IN IP4 ", 0) == 0 ||
+               line.rfind("c=IN IP6 ", 0) == 0) {
+      line = "c=IN IP4 " + spoof;
+    } else if (line.rfind("a=candidate:", 0) == 0) {
+      std::istringstream tokens(line.substr(12));
+      std::string out;
+      std::string token;
+      int index = 0;
+      bool substitute = false;
+      while (tokens >> token) {
+        if (!out.empty()) {
+          out += ' ';
+        }
+        if (index == 4 || substitute) {
+          out += spoof;
+        } else {
+          out += token;
+        }
+        ++index;
+        substitute = (token == "raddr");
+      }
+      line = "a=candidate:" + out;
+    }
+    rebuilt += line;
+    rebuilt += "\r\n";
+  }
+  return rebuilt;
+}
+
 RTCSessionDescriptionPlatform* CreateWebKitSessionDescription(
     const std::string& sdp,
     const std::string& type) {
@@ -114,6 +191,10 @@
     return nullptr;
   }
 
+  // Stealth Chromium: rewrite IP-bearing lines before the SDP becomes JS-visible
+  // (RTCPeerConnection.{local,remote,current,pending}Description).
+  sdp = MaybeSpoofSdpAddresses(sdp);
+
   return CreateWebKitSessionDescription(sdp, native_desc->type());
 }
 

Original source.

0025: WebRTC statistics addresses

The stats adapter replaces candidate address fields, including related addresses, while keeping ports and other statistics. This covers another place a script can look after inspecting ICE candidates and SDP. It changes the JavaScript report, while connectivity and the remote peer’s observations still depend on the actual network path.

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Stealth Chromium contributors
Date: Thu, 1 Jan 2026 00:00:00 +0000
Subject: [PATCH 25] fingerprint: RTCStatsReport address spoof
X-Spec: patches/23-webrtc-stats-spoof.md
X-Files: third_party/blink/renderer/modules/peerconnection/rtc_stats_report.cc

---

--- a/third_party/blink/renderer/modules/peerconnection/rtc_stats_report.cc
+++ b/third_party/blink/renderer/modules/peerconnection/rtc_stats_report.cc
@@ -4,12 +4,16 @@
 
 #include "third_party/blink/renderer/modules/peerconnection/rtc_stats_report.h"
 
+#include "base/command_line.h"
 #include "base/compiler_specific.h"
 #include "base/feature_list.h"
 #include "base/notimplemented.h"
 #include "base/notreached.h"
 #include "base/numerics/safe_conversions.h"
+#include "base/strings/string_util.h"
 #include "third_party/blink/public/common/features.h"
+#include "third_party/blink/public/common/fingerprint/fingerprint.h"
+#include "third_party/blink/public/common/switches.h"
 #include "third_party/blink/renderer/bindings/core/v8/script_value.h"
 #include "third_party/blink/renderer/bindings/core/v8/v8_object_builder.h"
 #include "third_party/blink/renderer/bindings/modules/v8/v8_rtc_audio_playout_stats.h"
@@ -481,6 +485,28 @@
   SET_STAT(webrtc_stat.rtcp_transport_stats_id,
            v8_stat->setRtcpTransportStatsId);
   return v8_stat;
+}
+
+// Stealth Chromium: substitute the --fingerprint-webrtc-ip value for candidate
+// stat addresses. Passes the input through when the spoof is inactive
+// (fingerprinting off, switch absent, empty or non-ASCII value) or the
+// input is empty/loopback/wildcard — the same exemption set as the ICE
+// candidate (rtc_ice_candidate_platform.cc) and SDP
+// (rtc_peer_connection_handler.cc) rewrites, so getStats() never disagrees
+// with onicecandidate/localDescription for those.
+String MaybeSpoofStatsAddress(const std::string& input) {
+  const base::CommandLine& cmd = *base::CommandLine::ForCurrentProcess();
+  if (!fingerprint::Enabled() ||
+      !cmd.HasSwitch(switches::kFingerprintWebrtcIp)) {
+    return String::FromUTF8(input);
+  }
+  const std::string spoof =
+      cmd.GetSwitchValueNative(switches::kFingerprintWebrtcIp);
+  if (!base::IsStringASCII(spoof) || spoof.empty() || input.empty() ||
+      input == "0.0.0.0" || input == "127.0.0.1") {
+    return String::FromUTF8(input);
+  }
+  return String::FromUTF8(spoof);
 }
 
 // https://w3c.github.io/webrtc-stats/#icecandidate-dict*
@@ -490,7 +516,12 @@
   RTCIceCandidateStats* v8_stat =
       MakeGarbageCollected<RTCIceCandidateStats>(script_state->GetIsolate());
   SET_STAT(webrtc_stat.transport_id, v8_stat->setTransportId);
-  SET_STAT(webrtc_stat.address, v8_stat->setAddress);
+  // Stealth Chromium: address/relatedAddress/ip carry the spoofed IP (see
+  // MaybeSpoofStatsAddress above); ports and every other member are
+  // passed through untouched.
+  if (webrtc_stat.address.has_value()) {
+    v8_stat->setAddress(MaybeSpoofStatsAddress(*webrtc_stat.address));
+  }
   SET_STAT(webrtc_stat.port, v8_stat->setPort);
   SET_STAT(webrtc_stat.protocol, v8_stat->setProtocol);
   SET_STAT_ENUM(webrtc_stat.candidate_type, v8_stat->setCandidateType,
@@ -500,7 +531,10 @@
   SET_STAT_ENUM(webrtc_stat.relay_protocol, v8_stat->setRelayProtocol,
                 V8RTCIceServerTransportProtocol);
   SET_STAT(webrtc_stat.foundation, v8_stat->setFoundation);
-  SET_STAT(webrtc_stat.related_address, v8_stat->setRelatedAddress);
+  if (webrtc_stat.related_address.has_value()) {
+    v8_stat->setRelatedAddress(
+        MaybeSpoofStatsAddress(*webrtc_stat.related_address));
+  }
   SET_STAT(webrtc_stat.related_port, v8_stat->setRelatedPort);
   SET_STAT(webrtc_stat.username_fragment, v8_stat->setUsernameFragment);
   SET_STAT_ENUM(webrtc_stat.tcp_type, v8_stat->setTcpType,
@@ -511,7 +545,9 @@
                 V8RTCNetworkType);
   // Non-standard and obsolete stats.
   SET_STAT(webrtc_stat.is_remote, v8_stat->setIsRemote);
-  SET_STAT(webrtc_stat.ip, v8_stat->setIp);
+  if (webrtc_stat.ip.has_value()) {
+    v8_stat->setIp(MaybeSpoofStatsAddress(*webrtc_stat.ip));
+  }
   return v8_stat;
 }
 

Original source.

Platform behavior beyond navigator

Computed styles, window geometry, authentication capabilities, and codecs add more ways to test an operating-system claim.

0026: CSS system colors

The Windows persona supplies a fixed table for public CSS system-color keywords, with a companion change in UI color defaults. That reduces host-theme differences visible through computed styles. The source describes the values as a reconstruction, rather than recovered exact constants; unhandled keywords continue through stock paths.

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Stealth Chromium contributors
Date: Thu, 1 Jan 2026 00:00:00 +0000
Subject: [PATCH 26] fingerprint: CSS system colors (Windows persona)
X-Spec: patches/27-system-colors.md
X-Files: third_party/blink/renderer/core/layout/layout_theme.cc third_party/blink/renderer/core/fingerprint/windows_system_colors.h ui/color/color_provider_utils.cc

---

--- a/third_party/blink/renderer/core/layout/layout_theme.cc
+++ b/third_party/blink/renderer/core/layout/layout_theme.cc
@@ -22,6 +22,7 @@
 #include "third_party/blink/renderer/core/layout/layout_theme.h"
 
 #include "build/build_config.h"
+#include "third_party/blink/public/common/fingerprint/fingerprint.h"
 #include "third_party/blink/public/strings/grit/blink_strings.h"
 #include "third_party/blink/public/web/blink.h"
 #include "third_party/blink/renderer/core/css_value_keywords.h"
@@ -30,6 +31,7 @@
 #include "third_party/blink/renderer/core/dom/shadow_root.h"
 #include "third_party/blink/renderer/core/editing/frame_selection.h"
 #include "third_party/blink/renderer/core/fileapi/file.h"
+#include "third_party/blink/renderer/core/fingerprint/windows_system_colors.h"
 #include "third_party/blink/renderer/core/frame/local_frame.h"
 #include "third_party/blink/renderer/core/frame/settings.h"
 #include "third_party/blink/renderer/core/html/forms/html_button_element.h"
@@ -577,6 +579,21 @@
                                mojom::blink::ColorScheme color_scheme,
                                const ui::ColorProvider* color_provider,
                                bool is_in_web_app_scope) const {
+  // Stealth Chromium: Windows persona for CSS system colors — serve hardcoded
+  // Windows-default palette values instead of the host platform's, so a
+  // non-Windows host cannot leak its palette (GTK on Linux) through
+  // getComputedStyle or UA rendering. Keywords without a persona color
+  // (internal ids) fall through to the stock paths below. The gate and
+  // two-sided design (this hook + the ui color mixer defaults) follow the
+  // vendor build; the exact constants were not recovered from the binary
+  // (spec patches/27-system-colors.md).
+  if (fingerprint::Enabled() &&
+      fingerprint::SpoofedPlatform() == fingerprint::Platform::kWindows) {
+    if (auto windows_color = fingerprint::WindowsSystemColor(
+            css_value_id, color_scheme == mojom::blink::ColorScheme::kDark)) {
+      return *windows_color;
+    }
+  }
   if (color_provider && !WebTestSupport::IsRunningWebTest()) {
     return SystemColorFromColorProvider(css_value_id, color_scheme,
                                         color_provider, is_in_web_app_scope);
--- /dev/null
+++ b/third_party/blink/renderer/core/fingerprint/windows_system_colors.h
@@ -0,0 +1,126 @@
+// Copyright 2026 The Stealth Chromium Authors
+// Use of this source code is governed by a GPLv3 license that can be
+// found in the LICENSE file of the Stealth Chromium distribution.
+
+#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_FINGERPRINT_WINDOWS_SYSTEM_COLORS_H_
+#define THIRD_PARTY_BLINK_RENDERER_CORE_FINGERPRINT_WINDOWS_SYSTEM_COLORS_H_
+
+// Stealth Chromium: Windows-persona palette for the CSS system color keywords.
+//
+// Serves hardcoded Windows-default colors so that a Chromium build running
+// on a non-Windows host never leaks the host palette (GTK on Linux, Aqua on
+// macOS) through CSS system colors (`getComputedStyle`, UA rendering).
+// Reimplementation of the vendor build's LayoutTheme::SystemColor jump
+// table (spec patches/27-system-colors.md). The vendor's exact per-keyword
+// constants were not recovered from the binary; the values below are a
+// representative table reconstructed from the public Windows 10/11 default
+// system palette (light) and from Chromium's documented dark defaults for
+// keywords where Windows has no distinct dark-mode syscolor. Determinism is
+// what matters, not bit-parity with any other build.
+
+#include <optional>
+
+#include "third_party/blink/renderer/core/css_value_keywords.h"
+#include "third_party/blink/renderer/platform/graphics/color.h"
+
+namespace blink::fingerprint {
+
+// Returns the Windows-persona color for a CSS system color keyword, or
+// nullopt for keywords that are not spoofed (internal ids fall back to the
+// stock LayoutTheme paths).
+inline std::optional<Color> WindowsSystemColor(CSSValueID css_value_id,
+                                               bool dark_scheme) {
+  switch (css_value_id) {
+    // No public Windows syscolor; Windows Chromium reports Chromium's own
+    // constants for these, so the persona must not diverge from them.
+    case CSSValueID::kActivetext:
+      return Color(0xFF, 0x00, 0x00);
+    case CSSValueID::kMark:
+      return Color(0xFF, 0xFF, 0x00);
+    case CSSValueID::kMarktext:
+      return Color::kBlack;
+    case CSSValueID::kVisitedtext:
+      return dark_scheme ? Color(0xD0, 0xAD, 0xF0) : Color(0x55, 0x1A, 0x8B);
+
+    // Default Windows accent color (also COLOR_HIGHLIGHT on 10/11).
+    case CSSValueID::kAccentcolor:
+      return Color(0x00, 0x78, 0xD7);
+    case CSSValueID::kAccentcolortext:
+      // The accent is dark in both schemes, so text on it is white.
+      return Color::kWhite;
+
+    case CSSValueID::kButtonborder:
+    // The following system colors were deprecated to default to ButtonBorder.
+    case CSSValueID::kActiveborder:
+    case CSSValueID::kInactiveborder:
+    case CSSValueID::kThreeddarkshadow:
+    case CSSValueID::kThreedhighlight:
+    case CSSValueID::kThreedlightshadow:
+    case CSSValueID::kThreedshadow:
+    case CSSValueID::kWindowframe:
+      return dark_scheme ? Color(0x6B, 0x6B, 0x6B)
+                         : Color(0x64, 0x64, 0x64);  // Win10 WindowFrame.
+    case CSSValueID::kButtonface:
+    // The following system colors were deprecated to default to ButtonFace.
+    case CSSValueID::kButtonhighlight:
+    case CSSValueID::kButtonshadow:
+    case CSSValueID::kThreedface:
+      return dark_scheme ? Color(0x6B, 0x6B, 0x6B)
+                         : Color(0xF0, 0xF0, 0xF0);  // Win10 COLOR_3DFACE.
+    case CSSValueID::kButtontext:
+      return dark_scheme ? Color::kWhite : Color::kBlack;
+
+    case CSSValueID::kCanvas:
+    // The following system colors were deprecated to default to Canvas.
+    case CSSValueID::kAppworkspace:
+    case CSSValueID::kBackground:
+    case CSSValueID::kInactivecaption:
+    case CSSValueID::kInfobackground:
+    case CSSValueID::kMenu:
+    case CSSValueID::kWindow:
+      return dark_scheme ? Color(0x12, 0x12, 0x12) : Color::kWhite;
+    case CSSValueID::kScrollbar:
+      // Win10 COLOR_SCROLLBAR differs from Window in the light scheme.
+      return dark_scheme ? Color(0x12, 0x12, 0x12) : Color(0xF0, 0xF0, 0xF0);
+    case CSSValueID::kCanvastext:
+    // The following system colors were deprecated to default to CanvasText.
+    case CSSValueID::kActivecaption:
+    case CSSValueID::kCaptiontext:
+    case CSSValueID::kInfotext:
+    case CSSValueID::kMenutext:
+    case CSSValueID::kWindowtext:
+      return dark_scheme ? Color::kWhite : Color::kBlack;
+
+    case CSSValueID::kField:
+      return dark_scheme ? Color(0x3B, 0x3B, 0x3B) : Color::kWhite;
+    case CSSValueID::kFieldtext:
+    case CSSValueID::kText:
+      return dark_scheme ? Color::kWhite : Color::kBlack;
+
+    case CSSValueID::kGraytext:
+    // Deprecated to default to GrayText.
+    case CSSValueID::kInactivecaptiontext:
+      return dark_scheme ? Color(0xA6, 0xA6, 0xA6)
+                         : Color(0x6D, 0x6D, 0x6D);  // Win10 COLOR_GRAYTEXT.
+
+    // Win10/11 default accent; the OS accent does not change with theme.
+    case CSSValueID::kHighlight:
+    case CSSValueID::kSelecteditem:
+      return Color(0x00, 0x78, 0xD7);
+    case CSSValueID::kHighlighttext:
+    case CSSValueID::kSelecteditemtext:
+      return Color::kWhite;
+
+    case CSSValueID::kLinktext:
+      // Windows maps link text onto COLOR_HOTLIGHT.
+      return dark_scheme ? Color(0x9E, 0x9E, 0xFF)
+                         : Color(0x00, 0x66, 0xCC);
+
+    default:
+      return std::nullopt;
+  }
+}
+
+}  // namespace blink::fingerprint
+
+#endif  // THIRD_PARTY_BLINK_RENDERER_CORE_FINGERPRINT_WINDOWS_SYSTEM_COLORS_H_
--- a/ui/color/color_provider_utils.cc
+++ b/ui/color/color_provider_utils.cc
@@ -7,6 +7,7 @@
 #include <memory>
 #include <string_view>
 
+#include "base/command_line.h"
 #include "base/containers/fixed_flat_map.h"
 #include "base/no_destructor.h"
 #include "base/strings/string_util.h"
@@ -548,10 +549,82 @@
   mixer[kColorWebNativeControlSliderHovered] = {kColorCssSystemHighlight};
   mixer[kColorWebNativeControlSliderPressed] = {kColorCssSystemHighlight};
   CompleteScrollbarColorsDefinition(mixer);
+}
+
+namespace {
+
+// Stealth Chromium: gate for the Windows CSS-system-color persona (spec
+// patches/27-system-colors.md): --fingerprint must be present and not an
+// off-value, and --fingerprint-platform must be "windows". ui/ cannot
+// include the blink fingerprint core, so the switch names and off-value
+// semantics are repeated here from
+// third_party/blink/public/common/fingerprint/fingerprint.h.
+bool ShouldSpoofWindowsSystemColors() {
+  static const bool spoof = [] {
+    const base::CommandLine& cmd = *base::CommandLine::ForCurrentProcess();
+    if (!cmd.HasSwitch("fingerprint")) {
+      return false;
+    }
+    const std::string value =
+        base::ToLowerASCII(cmd.GetSwitchValueASCII("fingerprint"));
+    if (value == "off" || value == "false" || value == "0" ||
+        value == "disable" || value == "disabled") {
+      return false;
+    }
+    return base::ToLowerASCII(cmd.GetSwitchValueASCII(
+               "fingerprint-platform")) == "windows";
+  }();
+  return spoof;
 }
 
+}  // namespace
+
 void CompleteDefaultCssSystemColorDefinition(ui::ColorMixer& mixer,
                                              bool dark_mode) {
+  // Stealth Chromium: Windows persona — define the default CSS system colors from
+  // the hardcoded Windows 10/11 default palette instead of the
+  // cross-platform defaults, so the ColorProvider path agrees with the
+  // LayoutTheme::SystemColor hook and a non-Windows host cannot leak its
+  // platform palette. Values are reconstructed from the public Windows
+  // defaults (the vendor binary's exact constants were not recovered).
+  if (ShouldSpoofWindowsSystemColors()) {
+    mixer[kColorCssSystemActiveText] = {SkColorSetRGB(0xFF, 0x00, 0x00)};
+    mixer[kColorCssSystemGrayText] =
+        {dark_mode ? SkColorSetRGB(0xA6, 0xA6, 0xA6)
+                   : SkColorSetRGB(0x6D, 0x6D, 0x6D)};
+    // Win10/11 default accent (COLOR_HIGHLIGHT); theme-independent.
+    mixer[kColorCssSystemHighlight] = {SkColorSetRGB(0x00, 0x78, 0xD7)};
+    mixer[kColorCssSystemHighlightText] = {SK_ColorWHITE};
+    if (dark_mode) {
+      mixer[kColorCssSystemBtnFace] = {SkColorSetRGB(0x6B, 0x6B, 0x6B)};
+      mixer[kColorCssSystemBtnText] = {SK_ColorWHITE};
+      mixer[kColorCssSystemField] = {SkColorSetRGB(0x3B, 0x3B, 0x3B)};
+      mixer[kColorCssSystemFieldText] = {SK_ColorWHITE};
+      mixer[kColorCssSystemMenuHilight] = {SkColorSetRGB(0x80, 0x00, 0x80)};
+      mixer[kColorCssSystemScrollbar] = {SkColorSetRGB(0x12, 0x12, 0x12)};
+      mixer[kColorCssSystemWindow] = {SkColorSetRGB(0x12, 0x12, 0x12)};
+      mixer[kColorCssSystemWindowText] = {SK_ColorWHITE};
+      mixer[kColorCssSystemHotlight] = {SkColorSetRGB(0x9E, 0x9E, 0xFF)};
+      mixer[kColorCssSystemLinkText] = {SkColorSetRGB(0x9E, 0x9E, 0xFF)};
+      mixer[kColorCssSystemVisitedText] = {SkColorSetRGB(0xD0, 0xAD, 0xF0)};
+    } else {
+      mixer[kColorCssSystemBtnFace] = {SkColorSetRGB(0xF0, 0xF0, 0xF0)};
+      mixer[kColorCssSystemBtnText] = {SK_ColorBLACK};
+      mixer[kColorCssSystemField] = {SK_ColorWHITE};
+      mixer[kColorCssSystemFieldText] = {SK_ColorBLACK};
+      // Win10 COLOR_MENUHILIGHT.
+      mixer[kColorCssSystemMenuHilight] = {SkColorSetRGB(0x33, 0x99, 0xFF)};
+      // Win10 COLOR_SCROLLBAR.
+      mixer[kColorCssSystemScrollbar] = {SkColorSetRGB(0xF0, 0xF0, 0xF0)};
+      mixer[kColorCssSystemWindow] = {SK_ColorWHITE};
+      mixer[kColorCssSystemWindowText] = {SK_ColorBLACK};
+      // Win10 COLOR_HOTLIGHT; Windows maps link text onto it.
+      mixer[kColorCssSystemHotlight] = {SkColorSetRGB(0x00, 0x66, 0xCC)};
+      mixer[kColorCssSystemLinkText] = {SkColorSetRGB(0x00, 0x66, 0xCC)};
+      mixer[kColorCssSystemVisitedText] = {SkColorSetRGB(0x55, 0x1A, 0x8B)};
+    }
+    return;
+  }
   mixer[kColorCssSystemActiveText] = {SkColorSetRGB(0xFF, 0x00, 0x00)};
   mixer[kColorCssSystemGrayText] = {SkColorSetRGB(0x80, 0x80, 0x80)};
   mixer[kColorCssSystemHighlight] = {SkColorSetRGB(0x19, 0x67, 0xD2)};

Original source.

0027: Window origin and outer dimensions

Outer dimensions are capped against the reported screen’s available area, and the window origin is derived from the seed and remaining space. This addresses some obvious screen/window contradictions. It does not move or resize the actual window, and degenerate size ranges use a fixed fallback origin.

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Stealth Chromium contributors
Date: Thu, 1 Jan 2026 00:00:00 +0000
Subject: [PATCH 27] fingerprint: window position + outer size persona
X-Spec: patches/31-window-position-outer-size.md
X-Files: third_party/blink/renderer/core/frame/local_dom_window.cc

---

--- a/third_party/blink/renderer/core/frame/local_dom_window.cc
+++ b/third_party/blink/renderer/core/frame/local_dom_window.cc
@@ -40,6 +40,7 @@
 #include "net/base/registry_controlled_domains/registry_controlled_domain.h"
 #include "net/storage_access_api/status.h"
 #include "third_party/blink/public/common/features.h"
+#include "third_party/blink/public/common/fingerprint/fingerprint.h"
 #include "third_party/blink/public/common/navigation/impression.h"
 #include "third_party/blink/public/common/switches.h"
 #include "third_party/blink/public/mojom/devtools/inspector_issue.mojom-blink.h"
@@ -211,6 +212,31 @@
       MakeGarbageCollected<ScriptPromiseResolver<IDLUndefined>>(script_state);
   resolver->Resolve();
   return resolver->Promise();
+}
+
+// Stealth Chromium: seed-derived window origin inside the spoofed screen (spec
+// patches/31-window-position-outer-size.md). The vendor build hashed
+// seed + "screenX"/"screenY" into the band left by fixed margins around
+// the screen edges (50px horizontal, 30px vertical) after subtracting the
+// outer size, so the window can never be reported outside the spoofed
+// (patch 0007) screen; HashFor provides the same per-identity determinism
+// with our stable hash. A degenerate range (window at least as large as
+// the screen minus the margin) reports the vendor's fixed fallback of 10.
+int FingerprintWindowOrigin(const LocalDOMWindow& window, bool y_axis) {
+  // The Screen accessor is non-const only because it lazily creates the
+  // window's Screen; reading it from these const getters is safe.
+  Screen* screen = const_cast<LocalDOMWindow&>(window).screen();
+  const int margin = y_axis ? 30 : 50;
+  const int extent = y_axis ? screen->height() - window.outerHeight()
+                            : screen->width() - window.outerWidth();
+  const int range = extent - margin;
+  if (range <= 0) {
+    return 10;
+  }
+  const uint32_t offset =
+      fingerprint::RandomBelow(y_axis ? "screenY" : "screenX",
+                               static_cast<uint32_t>(range));
+  return margin + static_cast<int>(offset);
 }
 
 }  // namespace
@@ -1607,12 +1633,23 @@
     return 0;
 
   ChromeClient& chrome_client = page->GetChromeClient();
+  int outer_height = chrome_client.RootWindowRect(*frame).height();
   if (page->GetSettings().GetReportScreenSizeInPhysicalPixelsQuirk()) {
-    return static_cast<int>(
-        lroundf(chrome_client.RootWindowRect(*frame).height() *
+    outer_height = static_cast<int>(
+        lroundf(outer_height *
                 chrome_client.GetScreenInfo(*frame).device_scale_factor));
   }
-  return chrome_client.RootWindowRect(*frame).height();
+  // Stealth Chromium: never report an outer size larger than the spoofed
+  // screen's available area — hides headless "window bigger than screen"
+  // tells and keeps outer* consistent with screen.avail* (spec 31).
+  if (fingerprint::Enabled()) {
+    // The Screen accessor is non-const only because it lazily creates the
+    // window's Screen; reading it from these const getters is safe.
+    const int avail =
+        const_cast<LocalDOMWindow*>(this)->screen()->availHeight();
+    return avail < outer_height ? avail : outer_height;
+  }
+  return outer_height;
 }
 
 int LocalDOMWindow::outerWidth() const {
@@ -1632,12 +1669,20 @@
     return 0;
 
   ChromeClient& chrome_client = page->GetChromeClient();
+  int outer_width = chrome_client.RootWindowRect(*frame).width();
   if (page->GetSettings().GetReportScreenSizeInPhysicalPixelsQuirk()) {
-    return static_cast<int>(
-        lroundf(chrome_client.RootWindowRect(*frame).width() *
+    outer_width = static_cast<int>(
+        lroundf(outer_width *
                 chrome_client.GetScreenInfo(*frame).device_scale_factor));
   }
-  return chrome_client.RootWindowRect(*frame).width();
+  // Stealth Chromium: see outerHeight — outerWidth = min(real, availWidth).
+  if (fingerprint::Enabled()) {
+    // The Screen accessor is non-const only because it lazily creates the
+    // window's Screen; reading it from these const getters is safe.
+    const int avail = const_cast<LocalDOMWindow*>(this)->screen()->availWidth();
+    return avail < outer_width ? avail : outer_width;
+  }
+  return outer_width;
 }
 
 gfx::Size LocalDOMWindow::GetViewportSize() const {
@@ -1695,6 +1740,13 @@
   Page* page = frame->GetPage();
   if (!page)
     return 0;
+
+  // Stealth Chromium: seed-derived window origin inside the spoofed screen
+  // (spec 31); replaces the stock ChromeClient position (including the
+  // physical-pixels quirk) entirely.
+  if (fingerprint::Enabled()) {
+    return FingerprintWindowOrigin(*this, /*y_axis=*/false);
+  }
 
   ChromeClient& chrome_client = page->GetChromeClient();
   if (page->GetSettings().GetReportScreenSizeInPhysicalPixelsQuirk()) {
@@ -1714,6 +1766,11 @@
   if (!page)
     return 0;
 
+  // Stealth Chromium: see screenX (margin 30 instead of 50).
+  if (fingerprint::Enabled()) {
+    return FingerprintWindowOrigin(*this, /*y_axis=*/true);
+  }
+
   ChromeClient& chrome_client = page->GetChromeClient();
   if (page->GetSettings().GetReportScreenSizeInPhysicalPixelsQuirk()) {
     return static_cast<int>(

Original source.

0028: DNS and connection timing reports

Resource Timing getters substitute deterministic DNS/connect offsets under the patch’s activation conditions, while same-host subresources keep stock timing. In practice the propagated WebRTC-IP switch is the important trigger; the ordinary proxy switch is not normally inherited by renderers. This changes timing reports, without making DNS requests take those durations.

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Stealth Chromium contributors
Date: Thu, 1 Jan 2026 00:00:00 +0000
Subject: [PATCH 28] fingerprint: DNS/connect timing normalization
X-Spec: patches/24-dns-timing.md
X-Files: third_party/blink/renderer/core/timing/performance_resource_timing.cc

---

--- a/third_party/blink/renderer/core/timing/performance_resource_timing.cc
+++ b/third_party/blink/renderer/core/timing/performance_resource_timing.cc
@@ -31,10 +31,16 @@
 
 #include "third_party/blink/renderer/core/timing/performance_resource_timing.h"
 
+#include <algorithm>
+#include <utility>
+
+#include "base/command_line.h"
 #include "base/containers/fixed_flat_set.h"
 #include "base/notreached.h"
 #include "services/network/public/mojom/service_worker_router_info.mojom-blink-forward.h"
 #include "third_party/blink/public/common/features_generated.h"
+#include "third_party/blink/public/common/fingerprint/fingerprint.h"
+#include "third_party/blink/public/common/switches.h"
 #include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-blink.h"
 #include "third_party/blink/public/mojom/timing/performance_mark_or_measure.mojom-blink.h"
 #include "third_party/blink/public/mojom/timing/resource_timing.mojom-blink-forward.h"
@@ -42,6 +48,8 @@
 #include "third_party/blink/renderer/bindings/core/v8/to_v8_traits.h"
 #include "third_party/blink/renderer/bindings/core/v8/v8_object_builder.h"
 #include "third_party/blink/renderer/bindings/core/v8/v8_render_blocking_status_type.h"
+#include "third_party/blink/renderer/core/dom/document.h"
+#include "third_party/blink/renderer/core/frame/dom_window.h"
 #include "third_party/blink/renderer/core/frame/local_dom_window.h"
 #include "third_party/blink/renderer/core/loader/document_loader.h"
 #include "third_party/blink/renderer/core/performance_entry_names.h"
@@ -60,7 +68,9 @@
 #include "third_party/blink/renderer/platform/loader/fetch/service_worker_router_info.h"
 #include "third_party/blink/renderer/platform/runtime_enabled_features.h"
 #include "third_party/blink/renderer/platform/scheduler/public/thread_scheduler.h"
+#include "third_party/blink/renderer/platform/weborigin/kurl.h"
 #include "third_party/blink/renderer/platform/wtf/text/atomic_string.h"
+#include "third_party/blink/renderer/platform/wtf/text/string_view.h"
 #include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
 
 namespace blink {
@@ -87,6 +97,83 @@
     return initiator_type;
   }
   return fetch_initiator_type_names::kOther;
+}
+
+// Stealth Chromium: DNS/connect timing normalization (spec
+// patches/24-dns-timing.md). Behind a proxy there is no local DNS
+// resolution, so cross-origin Resource Timing would otherwise expose
+// domainLookupStart == domainLookupEnd (== 0 or fetchStart) — a proxy-
+// detection fingerprint. The four accessors below replace the DNS/connect
+// window with deterministic offsets derived from (identity seed, request
+// host), anchored at fetchStart(). Same-host subresources keep stock
+// timings.
+
+// The vendor build reads network_switches::kProxyServer; that header is
+// not reachable from blink renderer deps, so use the literal. Note that
+// the stock renderer command line does not inherit --proxy-server, so the
+// practical trigger is --fingerprint-webrtc-ip (propagated by patch 0003).
+constexpr char kProxyServerSwitch[] = "proxy-server";
+
+bool ShouldNormalizeDnsTiming() {
+  static const bool active = [] {
+    if (!fingerprint::Enabled()) {
+      return false;
+    }
+    const base::CommandLine& cmd = *base::CommandLine::ForCurrentProcess();
+    return cmd.HasSwitch(switches::kFingerprintWebrtcIp) ||
+           cmd.HasSwitch(kProxyServerSwitch);
+  }();
+  return active;
+}
+
+uint32_t DnsBaseSeed() {
+  static const uint32_t base_seed = [] {
+    // Low 32 bits of the decimal identity seed (the vendor parsed
+    // --fingerprint with StringToInt and kept the low 32 bits; its
+    // TimeTicks fallback is unreachable because a seed is minted
+    // whenever fingerprinting is enabled).
+    if (auto seed = fingerprint::Seed()) {
+      return static_cast<uint32_t>(*seed);
+    }
+    return static_cast<uint32_t>(fingerprint::HashFor("dns-timing"));
+  }();
+  return base_seed;
+}
+
+// Vendor host hash: Java-style h = 31 * h + c over the host characters
+// (Latin-1 characters are read zero-extended, so both string flavors hash
+// identically).
+uint32_t DnsHostHash(const String& host) {
+  uint32_t hash = 0;
+  const StringView view(host);
+  for (unsigned i = 0; i < view.length(); ++i) {
+    hash = 31 * hash + view[i];
+  }
+  return hash;
+}
+
+String ResourceHost(const String& url) {
+  return KURL(url).Host().ToString();
+}
+
+// Synthetic (DNS start offset, DNS duration) pair in milliseconds over
+// fetchStart(); {0, 0} means "same-host subresource, do not spoof".
+std::pair<double, double> ComputeDnsOffsets(const String& url,
+                                            const AtomicString& initiator,
+                                            DOMWindow* window) {
+  const String host = ResourceHost(url);
+  if (window && initiator != performance_entry_names::kNavigation) {
+    if (auto* local = DynamicTo<LocalDOMWindow>(window)) {
+      if (host == local->document()->Url().Host()) {
+        return {0.0, 0.0};
+      }
+    }
+  }
+  const uint32_t x = DnsHostHash(host) ^ DnsBaseSeed();
+  // Lane 0 in [0.5, ~3.1] ms, lane 1 in [0.5, ~8.0] ms; correction terms
+  // from bits 16-25 and 26-31 of host_hash ^ seed.
+  return {0.5 + (x & 0xff) * 2.5 / 255.0 + ((x >> 16) & 0x3ff) / 10000.0,
+          0.5 + ((x >> 8) & 0xff) * 7.5 / 255.0 + (x >> 26) / 10000.0};
 }
 }  // namespace
 
@@ -328,6 +415,14 @@
 DOMHighResTimeStamp PerformanceResourceTiming::domainLookupStart() const {
   if (!info_->allow_timing_details) {
     return 0.0;
+  }
+  // Stealth Chromium: synthetic DNS window start.
+  if (ShouldNormalizeDnsTiming()) {
+    const std::pair<double, double> offsets =
+        ComputeDnsOffsets(info_->name, initiator_type_, source());
+    if (offsets.first > 0.0) {
+      return fetchStart() + offsets.first;
+    }
   }
   if (!info_->timing || !info_->timing->connect_timing ||
       info_->timing->connect_timing->domain_lookup_start.is_null()) {
@@ -342,6 +437,26 @@
 DOMHighResTimeStamp PerformanceResourceTiming::domainLookupEnd() const {
   if (!info_->allow_timing_details) {
     return 0.0;
+  }
+  // Stealth Chromium: synthetic DNS window end; clamped to end 1 ms before the
+  // real connect end and never before the (possibly synthetic) start.
+  if (ShouldNormalizeDnsTiming()) {
+    const std::pair<double, double> offsets =
+        ComputeDnsOffsets(info_->name, initiator_type_, source());
+    if (offsets.second > 0.0) {
+      double end = fetchStart() + offsets.first + offsets.second;
+      if (info_->timing && info_->timing->connect_timing &&
+          !info_->timing->connect_timing->connect_end.is_null()) {
+        end = std::min(
+            end,
+            Performance::MonotonicTimeToDOMHighResTimeStamp(
+                TimeOrigin(), info_->timing->connect_timing->connect_end,
+                info_->allow_negative_values,
+                CrossOriginIsolatedCapability()) -
+                1.0);
+      }
+      return std::max(end, domainLookupStart());
+    }
   }
   if (!info_->timing || !info_->timing->connect_timing ||
       info_->timing->connect_timing->domain_lookup_end.is_null()) {
@@ -370,9 +485,16 @@
     connect_start = info_->timing->connect_timing->domain_lookup_end;
   }
 
-  return Performance::MonotonicTimeToDOMHighResTimeStamp(
-      TimeOrigin(), connect_start, info_->allow_negative_values,
-      CrossOriginIsolatedCapability());
+  const double stock_connect_start =
+      Performance::MonotonicTimeToDOMHighResTimeStamp(
+          TimeOrigin(), connect_start, info_->allow_negative_values,
+          CrossOriginIsolatedCapability());
+  // Stealth Chromium: keep the synthetic window monotonic — never report a
+  // connectStart before the (possibly synthetic) domainLookupEnd.
+  if (ShouldNormalizeDnsTiming()) {
+    return std::max(stock_connect_start, domainLookupEnd());
+  }
+  return stock_connect_start;
 }
 
 DOMHighResTimeStamp PerformanceResourceTiming::connectEnd() const {
@@ -404,6 +526,12 @@
 
   if (info_->timing && info_->timing->connect_timing &&
       !info_->timing->connect_timing->ssl_start.is_null()) {
+    // Stealth Chromium: synthetic TLS start — connectStart() + [0.1, 0.5] ms,
+    // jitter derived from the un-seeded host hash.
+    if (ShouldNormalizeDnsTiming()) {
+      const uint32_t host_hash = DnsHostHash(ResourceHost(info_->name));
+      return connectStart() + 0.1 + (host_hash & 0xff) * 0.4 / 255.0;
+    }
     return Performance::MonotonicTimeToDOMHighResTimeStamp(
         TimeOrigin(), info_->timing->connect_timing->ssl_start,
         info_->allow_negative_values, CrossOriginIsolatedCapability());

Original source.

0029: WebAuthn capability reporting

The capability query reports hybrid transport support without waiting for the Bluetooth adapter query. That also affects the derived passkey-platform-authenticator capability, while the UVPAA query still reflects the real platform authenticator state. Advertising a capability is separate from successfully completing an authentication ceremony.

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Stealth Chromium contributors
Date: Thu, 1 Jan 2026 00:00:00 +0000
Subject: [PATCH 29] fingerprint: deterministic WebAuthn client capabilities
X-Spec: patches/25-webauthn-capabilities.md
X-Files: content/browser/webauth/authenticator_common_impl.cc

---

--- a/content/browser/webauth/authenticator_common_impl.cc
+++ b/content/browser/webauth/authenticator_common_impl.cc
@@ -95,6 +95,7 @@
 #include "services/metrics/public/cpp/ukm_builders.h"
 #include "services/metrics/public/cpp/ukm_recorder.h"
 #include "services/metrics/public/cpp/ukm_source_id.h"
+#include "third_party/blink/public/common/fingerprint/fingerprint.h"
 #include "third_party/blink/public/mojom/credentialmanagement/credential_type_flags.mojom.h"
 #include "third_party/blink/public/mojom/webauthn/authenticator.mojom.h"
 #include "third_party/boringssl/src/pki/input.h"
@@ -2019,9 +2020,22 @@
   barrier_callback.Run(
       MakeCapability(client_capabilities::kConditionalCreate, true));
 
-  IsHybridTransportSupported(
-      base::BindOnce(&MakeCapability, client_capabilities::kHybridTransport)
-          .Then(barrier_callback));
+  // Stealth Chromium: fingerprinted identities always report hybridTransport=true
+  // (spec patches/25-webauthn-capabilities.md). This skips the Bluetooth
+  // adapter query — which leaks the host's Bluetooth environment and adds
+  // a startup timing side effect — and, because InsertIsPPAACapability
+  // computes passkeyPlatformAuthenticator = UVPAA || hybridTransport,
+  // forces that capability true as well. isUVPAA itself keeps reflecting
+  // the real platform authenticator state. The vendor gated on
+  // --fingerprint presence; Stealth Chromium uses the series-wide Enabled().
+  if (blink::fingerprint::Enabled()) {
+    barrier_callback.Run(
+        MakeCapability(client_capabilities::kHybridTransport, true));
+  } else {
+    IsHybridTransportSupported(
+        base::BindOnce(&MakeCapability, client_capabilities::kHybridTransport)
+            .Then(barrier_callback));
+  }
 
   IsUvpaaAvailableInternal(
       caller_origin,

Original source.

0030: AAC encoder capability gate

For an explicit Windows persona, the WebCodecs support check can pass its platform AAC gate even when the host lacks that encoder. Stock configuration allowlists still apply. A page that goes on to initialize and use the encoder can test more than this support answer; the patch does not install an AAC implementation.

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Stealth Chromium contributors
Date: Thu, 1 Jan 2026 00:00:00 +0000
Subject: [PATCH 30] fingerprint: WebCodecs AAC support persona
X-Spec: patches/26-aac-codec.md
X-Files: third_party/blink/renderer/modules/webcodecs/audio_encoder.cc

---

--- a/third_party/blink/renderer/modules/webcodecs/audio_encoder.cc
+++ b/third_party/blink/renderer/modules/webcodecs/audio_encoder.cc
@@ -20,6 +20,7 @@
 #include "media/base/offloading_audio_encoder.h"
 #include "media/mojo/clients/mojo_audio_encoder.h"
 #include "media/mojo/mojom/interface_factory.mojom.h"
+#include "third_party/blink/public/common/fingerprint/fingerprint.h"
 #include "third_party/blink/public/common/thread_safe_browser_interface_broker_proxy.h"
 #include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-blink.h"
 #include "third_party/blink/public/platform/platform.h"
@@ -325,7 +326,21 @@
       return true;
     }
     case media::AudioCodec::kAAC: {
-      if (media::MojoAudioEncoder::IsSupported(media::AudioCodec::kAAC)) {
+      bool platform_aac_supported =
+          media::MojoAudioEncoder::IsSupported(media::AudioCodec::kAAC);
+      // Stealth Chromium: a windows persona claims platform AAC support even on
+      // hosts without one, keeping AudioEncoder.isConfigSupported() for
+      // 'mp4a.40.2' consistent with the claimed OS (real Windows Chrome
+      // reports supported; the stock gate is disabled by default on
+      // Linux). Spec patches/26-aac-codec.md; the vendor defaulted the
+      // platform to "windows" when the switch was absent, Stealth Chromium
+      // requires an explicit persona and falls back to stock otherwise.
+      // The parameter allow-lists below are stock and unchanged.
+      if (!platform_aac_supported && fingerprint::Enabled() &&
+          fingerprint::SpoofedPlatform() == fingerprint::Platform::kWindows) {
+        platform_aac_supported = true;
+      }
+      if (platform_aac_supported) {
         if (!VerifyParameterValues(config->options.channels,
                                    "Unsupported number of channels.", {1, 2, 6},
                                    js_error_message)) {

Original source.

0031: Text rasterization preferences

On non-macOS builds, Windows and macOS personas override Skia hinting, antialiasing, and subpixel-positioning preferences after renderer preferences are applied. That reaches below font names into drawing behavior. These settings approximate platform conventions while the host’s fonts and rendering backend continue to affect pixels.

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Stealth Chromium contributors
Date: Thu, 1 Jan 2026 00:00:00 +0000
Subject: [PATCH 31] fingerprint: Skia text rendering persona (hinting/subpixel per platform)
X-Spec: patches/36-text-rendering-params.md
X-Files: third_party/blink/renderer/core/exported/web_view_impl.cc

---

--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
@@ -49,6 +49,7 @@
 #include "media/base/media_switches.h"
 #include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
 #include "third_party/blink/public/common/features.h"
+#include "third_party/blink/public/common/fingerprint/fingerprint.h"
 #include "third_party/blink/public/common/fingerprinting_protection/noise_token.h"
 #include "third_party/blink/public/common/history/session_history_constants.h"
 #include "third_party/blink/public/common/input/web_input_event.h"
@@ -3706,6 +3707,35 @@
 
   WebThemeEngineHelper::DidUpdateRendererPreferences(preferences);
   UpdateFontRenderingFromRendererPrefs();
+
+#if !BUILDFLAG(IS_MAC)
+  // Stealth Chromium: Skia text rendering persona (spec
+  // patches/36-text-rendering-params.md). The stock renderer preferences
+  // were just applied above; for the spoofed desktop personas, override
+  // the rasterization knobs afterwards so text is drawn the way real
+  // Chrome draws it on the claimed OS: ClearType (full hinting + LCD
+  // subpixel rendering, pixel-aligned positions) on Windows, and the
+  // macOS 10.14+ look (slight hinting, grayscale antialiasing, subpixel
+  // positioning) on macOS. The Linux persona and any other value keep
+  // the stock preference-derived values.
+  if (fingerprint::Enabled()) {
+    const fingerprint::Platform platform = fingerprint::SpoofedPlatform();
+    if (platform == fingerprint::Platform::kWindows ||
+        platform == fingerprint::Platform::kMacOs) {
+      if (platform == fingerprint::Platform::kWindows) {
+        WebFontRenderStyle::SetHinting(SkFontHinting::kFull);
+        WebFontRenderStyle::SetSubpixelRendering(true);
+        WebFontRenderStyle::SetSubpixelPositioning(false);
+      } else {
+        WebFontRenderStyle::SetHinting(SkFontHinting::kSlight);
+        WebFontRenderStyle::SetSubpixelRendering(false);
+        WebFontRenderStyle::SetSubpixelPositioning(true);
+      }
+      WebFontRenderStyle::SetAutoHint(false);
+      WebFontRenderStyle::SetUseBitmaps(false);
+    }
+  }
+#endif  // !BUILDFLAG(IS_MAC)
 
   blink::SetCaretBlinkInterval(
       renderer_preferences_.caret_blink_interval.has_value()

Original source.

Graphics consistency and transport

The remaining patches connect GPU identity to nearby APIs, carry older compatibility features, and change network and inspector behavior.

0032: WebGPU adapter persona

Adapter information, feature filtering, limits, and preferred canvas format receive persona treatment. The NVIDIA selection mirrors the WebGL database and seed label so the two APIs can describe the same model. They still run on the real adapter. The source also makes feature filtering unconditional, which limits the common off switch’s effect.

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Stealth Chromium contributors
Date: Thu, 1 Jan 2026 00:00:00 +0000
Subject: [PATCH 32] fingerprint: WebGPU adapter persona + canvas format consistency
X-Spec: patches/16-webgpu-fingerprint.md, patches/37-webgpu-canvas-format-consistency.md
X-Files: third_party/blink/renderer/modules/webgpu/webgpu_fingerprint.h third_party/blink/renderer/modules/webgpu/gpu_adapter.cc third_party/blink/renderer/modules/webgpu/gpu.cc

---

--- /dev/null
+++ b/third_party/blink/renderer/modules/webgpu/webgpu_fingerprint.h
@@ -0,0 +1,287 @@
+// Copyright 2026 The Stealth Chromium Authors
+// Use of this source code is governed by a GPLv3 license that can be
+// found in the LICENSE file of the Stealth Chromium distribution.
+
+#ifndef THIRD_PARTY_BLINK_RENDERER_MODULES_WEBGPU_WEBGPU_FINGERPRINT_H_
+#define THIRD_PARTY_BLINK_RENDERER_MODULES_WEBGPU_WEBGPU_FINGERPRINT_H_
+
+// Stealth Chromium: WebGPU adapter persona (spec patches/16-webgpu-fingerprint.md).
+//
+// Identity-seed-driven GPUAdapter spoofing. While fingerprinting is active
+// the adapter reports the persona vendor/architecture/device (Apple on the
+// macOS persona, an NVIDIA model from the embedded database otherwise), the
+// advertised feature set is filtered through a plausibility allowlist, and
+// the advertised limits are clamped to the persona table below. Without
+// --fingerprint every getter reports "no spoof" and callers keep the real
+// adapter values (feature filtering is the one unconditional piece, matching
+// the vendor build).
+//
+// The NVIDIA model selection mirrors modules/webgl/gpu_fingerprint.cc
+// (patch 0016): same database order, same seed salt ("gpu_renderer"), same
+// first-match substring lookup for --fingerprint-gpu-renderer. The two
+// tables MUST stay in sync so WebGL UNMASKED_RENDERER_WEBGL and the WebGPU
+// adapter info can never disagree for a given identity.
+
+#include <algorithm>
+#include <cstdint>
+#include <optional>
+#include <string>
+
+#include "base/command_line.h"
+#include "base/strings/string_util.h"
+#include "third_party/blink/public/common/fingerprint/fingerprint.h"
+#include "third_party/blink/public/common/switches.h"
+#include "third_party/blink/renderer/modules/webgpu/gpu_supported_limits.h"
+#include "third_party/blink/renderer/platform/graphics/gpu/webgpu_cpp.h"
+
+namespace blink {
+
+namespace webgpu_fingerprint {
+
+// Stealth Chromium: NVIDIA models with real PCI device IDs. Order mirrors
+// kNvidiaGpuModels in modules/webgl/gpu_fingerprint.cc (ungoogled-chromium
+// table lineage); the index is shared with the WebGL persona, do not
+// reorder. (name, PCI device id)
+struct NvidiaGpuModel {
+  const char* name;
+  uint32_t device_id;
+};
+
+inline constexpr NvidiaGpuModel kNvidiaGpuModels[] = {
+    {"GeForce RTX 3050", 0x2507},
+    {"GeForce RTX 3050", 0x2582},
+    {"GeForce RTX 3050 6GB Laptop GPU", 0x25EC},
+    {"GeForce RTX 3050 Laptop GPU", 0x25A2},
+    {"GeForce RTX 3050 Ti Laptop GPU", 0x25A0},
+    {"GeForce RTX 3060", 0x2487},
+    {"GeForce RTX 3060", 0x2503},
+    {"GeForce RTX 3060", 0x2504},
+    {"GeForce RTX 3060 Laptop GPU", 0x2520},
+    {"GeForce RTX 3060 Laptop GPU", 0x2560},
+    {"GeForce RTX 3060 Ti", 0x2486},
+    {"GeForce RTX 3060 Ti", 0x2489},
+    {"GeForce RTX 3060 Ti", 0x24C9},
+    {"GeForce RTX 3070", 0x2484},
+    {"GeForce RTX 3070", 0x2488},
+    {"GeForce RTX 3070 Ti", 0x2482},
+    {"GeForce RTX 3070 Ti Laptop GPU", 0x24A0},
+    {"GeForce RTX 3080", 0x2206},
+    {"GeForce RTX 3080", 0x220A},
+    {"GeForce RTX 3080", 0x2216},
+    {"GeForce RTX 3080 Laptop GPU", 0x249C},
+    {"GeForce RTX 3080 Laptop GPU", 0x24DC},
+    {"GeForce RTX 3080 Ti", 0x2208},
+    {"GeForce RTX 3080 Ti Laptop GPU", 0x2420},
+    {"GeForce RTX 3080 Ti Laptop GPU", 0x2460},
+    {"GeForce RTX 3090", 0x2204},
+    {"GeForce RTX 3090 Ti", 0x2203},
+    {"GeForce RTX 4050 Laptop GPU", 0x28A1},
+    {"GeForce RTX 4050 Laptop GPU", 0x28E1},
+    {"GeForce RTX 4060", 0x2882},
+    {"GeForce RTX 4060 Laptop GPU", 0x28A0},
+    {"GeForce RTX 4060 Laptop GPU", 0x28E0},
+    {"GeForce RTX 4060 Ti", 0x2803},
+    {"GeForce RTX 4060 Ti", 0x2805},
+    {"GeForce RTX 4070", 0x2786},
+    {"GeForce RTX 4070 Laptop GPU", 0x2820},
+    {"GeForce RTX 4070 Laptop GPU", 0x2860},
+    {"GeForce RTX 4070 SUPER", 0x2783},
+    {"GeForce RTX 4070 Ti", 0x2782},
+    {"GeForce RTX 4070 Ti SUPER", 0x2705},
+    {"GeForce RTX 4080", 0x2704},
+    {"GeForce RTX 4080 Laptop GPU", 0x27A0},
+    {"GeForce RTX 4080 Laptop GPU", 0x27E0},
+    {"GeForce RTX 4080 SUPER", 0x2702},
+    {"GeForce RTX 4090", 0x2684},
+    {"GeForce RTX 4090 Laptop GPU", 0x2717},
+    {"GeForce RTX 4090 Laptop GPU", 0x2757},
+    {"GeForce RTX 5070", 0x2F04},
+    {"GeForce RTX 5070 Ti", 0x2C05},
+    {"GeForce RTX 5070 Ti Laptop GPU", 0x2F18},
+    {"GeForce RTX 5070 Ti Laptop GPU", 0x2F58},
+    {"GeForce RTX 5080", 0x2C02},
+    {"GeForce RTX 5080 Laptop GPU", 0x2C19},
+    {"GeForce RTX 5080 Laptop GPU", 0x2C59},
+    {"GeForce RTX 5090", 0x2B85},
+    {"GeForce RTX 5090 Laptop GPU", 0x2C18},
+    {"GeForce RTX 5090 Laptop GPU", 0x2C58},
+};
+
+inline constexpr size_t kNvidiaGpuModelCount =
+    sizeof(kNvidiaGpuModels) / sizeof(kNvidiaGpuModels[0]);
+
+// Lowercased --fingerprint-platform, default "linux" when absent (vendor
+// build resolved the platform locally in the webgpu TU; default pool is
+// NVIDIA).
+inline std::string ResolvePlatform() {
+  const base::CommandLine& cmd = *base::CommandLine::ForCurrentProcess();
+  if (cmd.HasSwitch(switches::kFingerprintPlatform)) {
+    const std::string value =
+        cmd.GetSwitchValueASCII(switches::kFingerprintPlatform);
+    if (base::IsStringASCII(value)) {
+      return base::ToLowerASCII(value);
+    }
+  }
+  return "linux";
+}
+
+// Index into kNvidiaGpuModels: an explicit --fingerprint-gpu-renderer whose
+// value contains a model name selects that model (first match wins, same
+// iteration order as the WebGL persona); otherwise the identity seed hashes
+// to a stable index. nullopt = no persona model (custom renderer string).
+inline std::optional<size_t> ResolveNvidiaModelIndex() {
+  const base::CommandLine& cmd = *base::CommandLine::ForCurrentProcess();
+  if (cmd.HasSwitch(switches::kFingerprintGpuRenderer)) {
+    const std::string value =
+        cmd.GetSwitchValueASCII(switches::kFingerprintGpuRenderer);
+    if (!base::IsStringASCII(value)) {
+      return std::nullopt;
+    }
+    for (size_t i = 0; i < kNvidiaGpuModelCount; ++i) {
+      if (value.find(kNvidiaGpuModels[i].name) != std::string::npos) {
+        return i;
+      }
+    }
+    return std::nullopt;
+  }
+  const uint32_t hash =
+      static_cast<uint32_t>(fingerprint::HashFor("gpu_renderer"));
+  return hash % kNvidiaGpuModelCount;
+}
+
+// Persona vendor: "" = no spoof (fingerprinting off), else "apple" on the
+// macOS persona and "nvidia" everywhere else.
+inline std::string GetVendor() {
+  if (!fingerprint::Enabled()) {
+    return std::string();
+  }
+  return ResolvePlatform() == "macos" ? "apple" : "nvidia";
+}
+
+// Persona architecture: NVIDIA generation name derived from the PCI device
+// id bucket (16-entry vendor-observed table, verbatim including the
+// 0x21xx/0x23xx/0x2Exx "lovelace" quirks), or the Apple Metal family name.
+inline std::string GetArchitecture() {
+  if (!fingerprint::Enabled()) {
+    return std::string();
+  }
+  if (ResolvePlatform() == "macos") {
+    return "common-3";
+  }
+  const std::optional<size_t> index = ResolveNvidiaModelIndex();
+  if (!index) {
+    return std::string();
+  }
+  // Stealth Chromium: vendor-observed bucket table, indexed by (id - 0x2000) >> 8.
+  static constexpr const char* kArchitectureByBucket[16] = {
+      "ampere",    "lovelace",   // 0x20xx, 0x21xx
+      "ampere",    "lovelace",   // 0x22xx, 0x23xx
+      "ampere",    "ampere",     // 0x24xx, 0x25xx
+      "lovelace",  "lovelace",   // 0x26xx, 0x27xx
+      "lovelace",  "lovelace",   // 0x28xx, 0x29xx
+      "lovelace",  "blackwell",  // 0x2axx, 0x2bxx
+      "blackwell", "blackwell",  // 0x2cxx, 0x2dxx
+      "lovelace",  "blackwell",  // 0x2exx, 0x2fxx
+  };
+  const uint32_t v = kNvidiaGpuModels[*index].device_id - 0x2000;
+  if (v > 0xFFF) {
+    return "lovelace";
+  }
+  return kArchitectureByBucket[v >> 8];
+}
+
+// Persona raw PCI device id (0 = keep the real adapter device string; the
+// macOS persona never spoofs it).
+inline uint32_t GetRawDeviceId() {
+  if (!fingerprint::Enabled()) {
+    return 0;
+  }
+  if (ResolvePlatform() == "macos") {
+    return 0;
+  }
+  const std::optional<size_t> index = ResolveNvidiaModelIndex();
+  if (!index) {
+    return 0;
+  }
+  return kNvidiaGpuModels[*index].device_id;
+}
+
+// Feature plausibility allowlist (vendor-observed bitmask logic, verbatim).
+// Runs UNCONDITIONALLY — it strips implausible/experimental features (e.g.
+// desktop BC compression for the macOS persona, chromium-experimental-*
+// dawn extensions) even when no fingerprint seed is set.
+//
+// Masks over the wgpu::FeatureName numeric values (dawn.json order):
+//   f in 1..15 and bit (f-1) of 0x7B0F: core set every persona may report;
+//   macOS persona additionally allows f in 6..8 (ETC2/ASTC compression);
+//   other personas additionally allow bit f of 0x7F0820 for f <= 0x16
+//   (bc-sliced-3d, shader-f16, clip-distances .. component-swizzle).
+inline bool IsPlausibleFeature(wgpu::FeatureName f) {
+  const uint32_t v = static_cast<uint32_t>(f);
+  if (v >= 1 && v <= 15 && ((0x7B0Fu >> (v - 1)) & 1) != 0) {
+    return true;
+  }
+  if (ResolvePlatform() == "macos") {
+    return v >= 6 && v <= 8;
+  }
+  if (v <= 0x16) {
+    return ((0x7F0820u >> v) & 1) != 0;
+  }
+  return false;
+}
+
+// Stealth Chromium: persona limits (vendor-observed stores/clamps; the exact
+// value table from the disassembly, applied by field name). Overwrites set
+// the persona value; std::min entries clamp the real value down. Only
+// applied while fingerprinting is active, so real limits stay stock.
+inline void ClampLimits(GPUSupportedLimits::ComboLimits& l) {
+  l.maxTextureDimension1D = 0x4000;
+  l.maxTextureDimension2D = 0x4000;
+  l.maxTextureDimension3D = std::min(l.maxTextureDimension3D, 0x800u);
+  l.maxTextureArrayLayers = 0x800;
+  l.maxBindGroups = std::min(l.maxBindGroups, 4u);
+  l.maxBindGroupsPlusVertexBuffers =
+      std::min(l.maxBindGroupsPlusVertexBuffers, 24u);
+  l.maxBindingsPerBindGroup = std::min(l.maxBindingsPerBindGroup, 1000u);
+  l.maxDynamicUniformBuffersPerPipelineLayout = 10;
+  l.maxDynamicStorageBuffersPerPipelineLayout = 8;
+  l.maxSampledTexturesPerShaderStage = 48;
+  l.maxSamplersPerShaderStage = std::min(l.maxSamplersPerShaderStage, 16u);
+  l.maxStorageBuffersPerShaderStage = 16;
+  l.maxStorageTexturesPerShaderStage = 8;
+  l.maxUniformBuffersPerShaderStage =
+      std::min(l.maxUniformBuffersPerShaderStage, 12u);
+  l.maxUniformBufferBindingSize =
+      std::min<uint64_t>(l.maxUniformBufferBindingSize, 0x10000ull);
+  l.maxStorageBufferBindingSize = 0x7FFFFFFC;
+  l.minUniformBufferOffsetAlignment =
+      std::min(l.minUniformBufferOffsetAlignment, 0x100u);
+  l.minStorageBufferOffsetAlignment =
+      std::min(l.minStorageBufferOffsetAlignment, 0x100u);
+  l.maxVertexBuffers = std::min(l.maxVertexBuffers, 8u);
+  l.maxBufferSize = 0x80000000ull;
+  l.maxVertexAttributes = 30;
+  l.maxVertexBufferArrayStride =
+      std::min(l.maxVertexBufferArrayStride, 0x800u);
+  l.maxInterStageShaderVariables = 28;
+  l.maxColorAttachments = std::min(l.maxColorAttachments, 8u);
+  l.maxColorAttachmentBytesPerSample = 0x80;
+  l.maxComputeWorkgroupStorageSize = 0x8000;
+  l.maxComputeInvocationsPerWorkgroup = 0x400;
+  l.maxComputeWorkgroupSizeX = 0x400;
+  l.maxComputeWorkgroupSizeY = 0x400;
+  l.maxComputeWorkgroupSizeZ = std::min(l.maxComputeWorkgroupSizeZ, 0x40u);
+  l.maxComputeWorkgroupsPerDimension =
+      std::min(l.maxComputeWorkgroupsPerDimension, 0xFFFFu);
+  l.maxImmediateSize = 0;
+  l.maxStorageBuffersInVertexStage = 16;
+  l.maxStorageTexturesInVertexStage = 8;
+  l.maxStorageBuffersInFragmentStage = 16;
+  l.maxStorageTexturesInFragmentStage = 8;
+}
+
+}  // namespace webgpu_fingerprint
+
+}  // namespace blink
+
+#endif  // THIRD_PARTY_BLINK_RENDERER_MODULES_WEBGPU_WEBGPU_FINGERPRINT_H_
--- a/third_party/blink/renderer/modules/webgpu/gpu_adapter.cc
+++ b/third_party/blink/renderer/modules/webgpu/gpu_adapter.cc
@@ -22,6 +22,7 @@
 #include "third_party/blink/renderer/modules/webgpu/gpu_supported_features.h"
 #include "third_party/blink/renderer/modules/webgpu/gpu_supported_limits.h"
 #include "third_party/blink/renderer/modules/webgpu/string_utils.h"
+#include "third_party/blink/renderer/modules/webgpu/webgpu_fingerprint.h"
 #include "third_party/blink/renderer/platform/graphics/gpu/webgpu_callback.h"
 #include "third_party/blink/renderer/platform/heap/garbage_collected.h"
 #include "third_party/blink/renderer/platform/runtime_enabled_features.h"
@@ -40,12 +41,35 @@
   const auto features_span = UNSAFE_BUFFERS(base::span<const wgpu::FeatureName>(
       supported_features.features, supported_features.featureCount));
   for (const auto& f : features_span) {
+    // Stealth Chromium: keep only features the persona could plausibly report
+    // (allowlist; runs unconditionally, vendor-observed) that are also
+    // representable in the JS enum.
+    if (!webgpu_fingerprint::IsPlausibleFeature(f)) {
+      continue;
+    }
     auto feature_name_enum_optional =
         GPUSupportedFeatures::ToV8FeatureNameEnum(f);
     if (feature_name_enum_optional) {
       features->AddFeatureName(
           V8GPUFeatureName(feature_name_enum_optional.value()));
+    }
+  }
+  // Stealth Chromium: the NVIDIA persona always advertises shader-f16 and
+  // dual-source-blending, even when the underlying adapter did not report
+  // them (vendor-observed force-add; AddFeatureName is idempotent).
+  if (webgpu_fingerprint::GetVendor() == "nvidia") {
+    constexpr wgpu::FeatureName kForcedFeatures[] = {
+        wgpu::FeatureName::ShaderF16,
+        wgpu::FeatureName::DualSourceBlending,
+    };
+    for (const wgpu::FeatureName f : kForcedFeatures) {
+      auto feature_name_enum_optional =
+          GPUSupportedFeatures::ToV8FeatureNameEnum(f);
+      if (feature_name_enum_optional) {
+        features->AddFeatureName(
+            V8GPUFeatureName(feature_name_enum_optional.value()));
       }
+    }
   }
   return features;
 }
@@ -100,6 +124,28 @@
     device_ = String::Format("0x%04x", info.deviceID);
   } else {
     device_ = String::Format("0x%08x", info.deviceID);
+  }
+  // Stealth Chromium: WebGPU adapter persona. While fingerprinting is active,
+  // vendor/architecture/device agree with the WebGL persona (same identity
+  // seed resolves the same NVIDIA model). The macOS persona reports the
+  // Apple vendor and the "common-3" family architecture and keeps the real
+  // device string (mirrors what Chrome reports on real Macs); empty getter
+  // results keep the real adapter values.
+  const std::string fingerprint_vendor = webgpu_fingerprint::GetVendor();
+  if (!fingerprint_vendor.empty()) {
+    vendor_ = String::FromUTF8(fingerprint_vendor);
+    const std::string fingerprint_architecture =
+        webgpu_fingerprint::GetArchitecture();
+    if (!fingerprint_architecture.empty()) {
+      architecture_ = String::FromUTF8(fingerprint_architecture);
+    }
+    if (const uint32_t fingerprint_device_id =
+            webgpu_fingerprint::GetRawDeviceId()) {
+      device_ = String::Format(fingerprint_device_id <= 0xffff
+                                   ? "0x%04x"
+                                   : "0x%08x",
+                               fingerprint_device_id);
+    }
   }
   description_ = String::FromUTF8(info.device);
   driver_ = String::FromUTF8(info.description);
@@ -117,6 +163,12 @@
 
   GPUSupportedLimits::ComboLimits limits;
   GetHandle().GetLimits(limits.GetLinked());
+  // Stealth Chromium: clamp the advertised limits to the persona table, gated on
+  // the persona being active so real limits are never lowered while
+  // fingerprinting is off.
+  if (!fingerprint_vendor.empty()) {
+    webgpu_fingerprint::ClampLimits(limits);
+  }
   limits_ = MakeGarbageCollected<GPUSupportedLimits>(limits);
 
   info_ = CreateAdapterInfoForAdapter();
--- a/third_party/blink/renderer/modules/webgpu/gpu.cc
+++ b/third_party/blink/renderer/modules/webgpu/gpu.cc
@@ -13,6 +13,7 @@
 #include "gpu/command_buffer/client/webgpu_interface.h"
 #include "gpu/config/gpu_finch_features.h"
 #include "mojo/public/cpp/bindings/remote.h"
+#include "third_party/blink/public/common/fingerprint/fingerprint.h"
 #include "third_party/blink/public/common/thread_safe_browser_interface_broker_proxy.h"
 #include "third_party/blink/public/mojom/gpu/gpu.mojom-blink.h"
 #include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-shared.h"
@@ -221,6 +222,19 @@
     case wgpu::RequestAdapterStatus::Unavailable:
     case wgpu::RequestAdapterStatus::Error:
     case wgpu::RequestAdapterStatus::CallbackCancelled:
+      // Stealth Chromium: WebGPU blocklist bypass. While fingerprinting, still
+      // construct the adapter (its info is fully replaced by the persona
+      // hooks in GPUAdapter's constructor) when dawn returned a usable
+      // handle despite an Unavailable/Error status, so requestAdapter()
+      // resolves with the persona adapter instead of null on GPU-less or
+      // blocklisted hosts. Guarded on the handle: the GPUAdapter
+      // constructor queries dawn and cannot run on a null adapter.
+      if (fingerprint::Enabled() && adapter &&
+          (status == wgpu::RequestAdapterStatus::Unavailable ||
+           status == wgpu::RequestAdapterStatus::Error)) {
+        gpu_adapter = MakeGarbageCollected<GPUAdapter>(
+            this, std::move(adapter), dawn_control_client_, options);
+      }
       break;
   }
   if (error_message.length != 0) {
@@ -427,6 +441,15 @@
 }
 
 wgpu::TextureFormat GPU::GetPreferredCanvasFormat() {
+  // Stealth Chromium: canvas-format consistency. While fingerprinting, every
+  // persona prefers "bgra8unorm" (the macOS/D3D answer) regardless of host
+  // OS — not keyed on --fingerprint-platform. This is the single source for
+  // getPreferredCanvasFormat(), GPUCanvasContext::configure()'s swap-chain
+  // storage, and the non-preferred-format console warning, so the three
+  // surfaces can never disagree under the spoof.
+  if (fingerprint::Enabled()) {
+    return wgpu::TextureFormat::BGRA8Unorm;
+  }
 #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX)
   // Interop of vulkan and GL has mesa driver bugs for BGRA format
   // See anglebug.com/40644739

Original source.

0033: WebGL extensions and precision

The WebGL persona filters selected extensions and supplies values for low/medium shader precision and multisample counts. High precision still queries the driver. These are supporting claims around the GPU name: a detector can compare the advertised capabilities with shader execution and actual resource creation.

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Stealth Chromium contributors
Date: Thu, 1 Jan 2026 00:00:00 +0000
Subject: [PATCH 33] fingerprint: WebGL per-GPU consistency (precision/extensions/formats)
X-Spec: patches/14-webgl-consistency.md
X-Files: third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc third_party/blink/renderer/modules/webgl/webgl2_rendering_context_base.cc

---

--- a/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc
+++ b/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc
@@ -26,6 +26,7 @@
 #include "third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.h"
 
 #include <memory>
+#include <string.h>
 #include <utility>
 
 #include "base/bit_cast.h"
@@ -3635,6 +3636,31 @@
 
 bool WebGLRenderingContextBase::ExtensionSupportedAndAllowed(
     const ExtensionTracker* tracker) {
+  // Stealth Chromium: shape the extension list to the persona GPU. Compressed
+  // texture / multiview / snorm extensions leak the real hardware, and the
+  // timer-query extensions are force-shipped (bypassing the draft/dev
+  // runtime flags) when the backend supports them. Stock gating otherwise.
+  if (IsFingerprintGpuActive()) {
+    const char* name = tracker->ExtensionName();
+    static const char* const kPersonaHiddenExtensions[] = {
+        "EXT_render_snorm",
+        "EXT_texture_norm16",
+        "WEBGL_provoking_vertex",
+        "OVR_multiview2",
+        "WEBGL_compressed_texture_astc",
+        "WEBGL_compressed_texture_etc",
+        "WEBGL_compressed_texture_etc1",
+    };
+    for (const char* const hidden : kPersonaHiddenExtensions) {
+      if (strcmp(name, hidden) == 0) {
+        return false;
+      }
+    }
+    if (strcmp(name, "EXT_disjoint_timer_query") == 0 ||
+        strcmp(name, "EXT_disjoint_timer_query_webgl2") == 0) {
+      return tracker->Supported(this);
+    }
+  }
   if (tracker->Draft() &&
       !RuntimeEnabledFeatures::WebGLDraftExtensionsEnabled())
     return false;
@@ -4340,6 +4366,22 @@
       SynthesizeGLError(GL_INVALID_ENUM, "getShaderPrecisionFormat",
                         "invalid precision type");
       return nullptr;
+  }
+
+  // Stealth Chromium: persona precision for lowp/mediump — the safe cross-GPU
+  // values (binary32 for floats, 31/30/0 for ints). highp keeps querying
+  // the real driver so actual shader compilation behavior is unchanged.
+  if (IsFingerprintGpuActive()) {
+    switch (precision_type) {
+      case GL_LOW_FLOAT:
+      case GL_MEDIUM_FLOAT:
+        return MakeGarbageCollected<WebGLShaderPrecisionFormat>(127, 127, 23);
+      case GL_LOW_INT:
+      case GL_MEDIUM_INT:
+        return MakeGarbageCollected<WebGLShaderPrecisionFormat>(31, 30, 0);
+      default:
+        break;
+    }
   }
 
   GLint range[2] = {0, 0};
--- a/third_party/blink/renderer/modules/webgl/webgl2_rendering_context_base.cc
+++ b/third_party/blink/renderer/modules/webgl/webgl2_rendering_context_base.cc
@@ -20,6 +20,7 @@
 #include "third_party/blink/renderer/core/html/html_image_element.h"
 #include "third_party/blink/renderer/core/html/media/html_video_element.h"
 #include "third_party/blink/renderer/core/imagebitmap/image_bitmap.h"
+#include "third_party/blink/renderer/modules/webgl/gpu_fingerprint.h"
 #include "third_party/blink/renderer/modules/webgl/webgl_active_info.h"
 #include "third_party/blink/renderer/modules/webgl/webgl_buffer.h"
 #include "third_party/blink/renderer/modules/webgl/webgl_fence_sync.h"
@@ -644,6 +645,29 @@
 
   switch (pname) {
     case GL_SAMPLES: {
+      // Stealth Chromium: persona MSAA sample counts, consistent with the spoofed
+      // renderer: macOS persona ships 4x MSAA, the NVIDIA persona 8x, other
+      // desktop personas 16x. Falls through to the real driver query when
+      // GPU spoofing is off.
+      if (IsFingerprintGpuActive()) {
+        int max_samples = 16;
+        if (ResolveFingerprintGpuPlatform() == "macos") {
+          max_samples = 4;
+        } else if (GetGLRendererStringForFingerprint().find("NVIDIA") !=
+                   std::string::npos) {
+          max_samples = 8;
+        }
+        int sample_count = 1;
+        for (int s = max_samples; s > 1; s >>= 1) {
+          ++sample_count;
+        }
+        auto values = base::HeapArray<GLint>::WithSize(sample_count);
+        values[0] = max_samples;
+        for (int i = 1; i < sample_count; ++i) {
+          values[i] = values[i - 1] / 2;
+        }
+        return WebGLAny(script_state, DOMInt32Array::Create(values));
+      }
       GLint length = -1;
       ContextGL()->GetInternalformativ(target, internalformat,
                                        GL_NUM_SAMPLE_COUNTS, 1, &length);

Original source.

0034: Translated shader source

For the Windows translation persona, the debug-shader path synthesizes HLSL-looking output from the supplied GLSL declarations. It does not compile through a Windows D3D backend. The repository explicitly calls the generator simplified; sufficiently varied shader inputs can test how far that approximation holds.

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Stealth Chromium contributors
Date: Thu, 1 Jan 2026 00:00:00 +0000
Subject: [PATCH 34] fingerprint: WEBGL_debug_shaders translated-source synthesizer
X-Spec: patches/13-webgl-vendor-renderer.md
X-Files: third_party/blink/renderer/modules/webgl/hlsl_synthesizer.h third_party/blink/renderer/modules/webgl/webgl_debug_shaders.cc

---

--- /dev/null
+++ b/third_party/blink/renderer/modules/webgl/hlsl_synthesizer.h
@@ -0,0 +1,327 @@
+// Copyright 2026 The Stealth Chromium Authors
+// Use of this source code is governed by a GPLv3 license that can be
+// found in the LICENSE file of the Stealth Chromium distribution.
+
+#ifndef THIRD_PARTY_BLINK_RENDERER_MODULES_WEBGL_HLSL_SYNTHESIZER_H_
+#define THIRD_PARTY_BLINK_RENDERER_MODULES_WEBGL_HLSL_SYNTHESIZER_H_
+
+#include <cstdlib>
+#include <string>
+#include <vector>
+
+#include "base/command_line.h"
+#include "base/strings/string_util.h"
+#include "gpu/GLES2/gl2.h"
+#include "third_party/blink/public/common/switches.h"
+
+// Stealth Chromium: deterministic ANGLE-D3D11-style HLSL translation for
+// WEBGL_debug_shaders.getTranslatedShaderSource() (spec
+// patches/13-webgl-vendor-renderer.md). The windows persona claims the
+// ANGLE D3D11 backend, so its translated sources are HLSL; instead of
+// leaking the real backend's translation we rebuild a persona-plausible
+// one from the GLSL source. Line-by-line text synthesis, a pure function
+// of (source, shader type) — same shader always yields the same text.
+
+namespace blink {
+namespace fingerprint {
+
+// True when the translation persona is "windows" (lowercased
+// --fingerprint-platform; absent/non-ASCII defaults to "windows", the
+// vendor's GetFingerprintPlatform() semantics for this call site).
+inline bool PersonaUsesHlslTranslation() {
+  const base::CommandLine& cmd = *base::CommandLine::ForCurrentProcess();
+  if (cmd.HasSwitch(switches::kFingerprintPlatform)) {
+    const std::string value =
+        cmd.GetSwitchValueASCII(switches::kFingerprintPlatform);
+    if (base::IsStringASCII(value)) {
+      return base::ToLowerASCII(value) == "windows";
+    }
+  }
+  return true;
+}
+
+namespace hlsl_synth {
+
+struct Decl {
+  std::string type;   // HLSL type ("float4", "float4x4", ...).
+  std::string name;   // GLSL identifier.
+  int registers = 1;  // cbuffer registers consumed.
+};
+
+inline bool IsSpace(char c) {
+  return c == ' ' || c == '\t' || c == '\r';
+}
+
+inline std::vector<std::string> Tokenize(const std::string& line) {
+  std::vector<std::string> tokens;
+  std::string current;
+  for (const char c : line) {
+    if (IsSpace(c)) {
+      if (!current.empty()) {
+        tokens.push_back(current);
+        current.clear();
+      }
+    } else {
+      current.push_back(c);
+    }
+  }
+  if (!current.empty()) {
+    tokens.push_back(current);
+  }
+  return tokens;
+}
+
+// GLSL type token -> HLSL type; nullptr when the token is not a type.
+inline const char* MapType(const std::string& token) {
+  static constexpr const struct {
+    const char* glsl;
+    const char* hlsl;
+  } kTypeMap[] = {
+      {"float", "float"},        {"int", "int"},       {"bool", "bool"},
+      {"vec2", "float2"},        {"vec3", "float3"},   {"vec4", "float4"},
+      {"ivec2", "int2"},         {"ivec3", "int3"},    {"ivec4", "int4"},
+      {"bvec2", "bool2"},        {"bvec3", "bool3"},   {"bvec4", "bool4"},
+      {"mat2", "float2x2"},      {"mat3", "float3x3"}, {"mat4", "float4x4"},
+      {"sampler2D", "sampler2D"}, {"samplerCube", "samplerCube"},
+  };
+  for (const auto& entry : kTypeMap) {
+    if (token == entry.glsl) {
+      return entry.hlsl;
+    }
+  }
+  return nullptr;
+}
+
+inline bool IsPrecisionToken(const std::string& token) {
+  return token == "lowp" || token == "mediump" || token == "highp";
+}
+
+// "position[4];", "texcoord;" -> {"position", 4} / {"texcolor", 1}.
+inline Decl ParseDecl(const std::string& hlsl_type,
+                      const std::string& raw_name) {
+  Decl decl;
+  decl.type = hlsl_type;
+  size_t length = 1;
+  size_t end = raw_name.find_first_of("[=,;");
+  decl.name = raw_name.substr(0, end == std::string::npos ? raw_name.size()
+                                                          : end);
+  const size_t bracket = raw_name.find('[');
+  if (bracket != std::string::npos) {
+    const size_t close = raw_name.find(']', bracket);
+    if (close != std::string::npos && close > bracket + 1) {
+      length = static_cast<size_t>(
+          std::atoi(raw_name.substr(bracket + 1, close - bracket - 1).c_str()));
+      if (length == 0) {
+        length = 1;
+      }
+    }
+  }
+  if (hlsl_type == "float2x2") {
+    decl.registers = 2;
+  } else if (hlsl_type == "float3x3") {
+    decl.registers = 3;
+  } else if (hlsl_type == "float4x4") {
+    decl.registers = 4;
+  }
+  decl.registers *= static_cast<int>(length);
+  return decl;
+}
+
+}  // namespace hlsl_synth
+
+// Rebuilds |glsl_source| as an ANGLE-D3D11-flavored HLSL translation.
+// Deliberately simplified relative to the vendor's ~12 KB generator: the
+// observable contract (deterministic HLSL-looking text built from the
+// GLSL declarations, with ANGLE's boilerplate constants) is preserved.
+inline std::string GenerateHlslForShader(const std::string& glsl_source,
+                                         unsigned shader_type) {
+  using hlsl_synth::Decl;
+  using hlsl_synth::IsPrecisionToken;
+  using hlsl_synth::MapType;
+  using hlsl_synth::ParseDecl;
+  using hlsl_synth::Tokenize;
+
+  const bool is_vertex = shader_type != GL_FRAGMENT_SHADER;
+
+  std::vector<Decl> attributes;   // VS_INPUT (vertex "attribute"/"in").
+  std::vector<Decl> varyings;     // VS_OUTPUT / PS_INPUT interface.
+  std::vector<Decl> uniforms;     // _Globals cbuffer members.
+  std::vector<Decl> samplers;     // SamplerState bindings.
+  std::vector<Decl> frag_outputs; // PS_OUTPUT members (fragment "out").
+  std::vector<std::string> body;
+
+  size_t line_start = 0;
+  while (line_start <= glsl_source.size()) {
+    size_t line_end = glsl_source.find('\n', line_start);
+    if (line_end == std::string::npos) {
+      line_end = glsl_source.size();
+    }
+    const std::string line =
+        glsl_source.substr(line_start, line_end - line_start);
+    line_start = line_end + 1;
+
+    const std::vector<std::string> tokens = Tokenize(line);
+    if (tokens.empty() || tokens[0].front() == '#') {
+      continue;  // preprocessor directives are not carried over
+    }
+    if (tokens[0] == "precision" || tokens[0] == "invariant") {
+      continue;  // precision/invariant statements are consumed
+    }
+    if (tokens[0] == "attribute" && tokens.size() >= 3 && MapType(tokens[1])) {
+      Decl decl = ParseDecl(MapType(tokens[1]), tokens[2]);
+      decl.name = "attribute_" + decl.name;
+      attributes.push_back(decl);
+      continue;
+    }
+    if (tokens[0] == "varying" && tokens.size() >= 3 && MapType(tokens[1])) {
+      varyings.push_back(ParseDecl(MapType(tokens[1]), tokens[2]));
+      continue;
+    }
+    if (tokens[0] == "uniform" && tokens.size() >= 3 && MapType(tokens[1])) {
+      Decl decl = ParseDecl(MapType(tokens[1]), tokens[2]);
+      if (decl.type.rfind("sampler", 0) == 0) {
+        samplers.push_back(decl);
+      } else {
+        uniforms.push_back(decl);
+      }
+      continue;
+    }
+    if (tokens[0] == "in" && tokens.size() >= 3 && MapType(tokens[1])) {
+      Decl decl = ParseDecl(MapType(tokens[1]), tokens[2]);
+      if (is_vertex) {
+        decl.name = "attribute_" + decl.name;
+        attributes.push_back(decl);
+      } else {
+        varyings.push_back(decl);
+      }
+      continue;
+    }
+    if (tokens[0] == "out" && tokens.size() >= 3 && MapType(tokens[1])) {
+      Decl decl = ParseDecl(MapType(tokens[1]), tokens[2]);
+      if (is_vertex) {
+        varyings.push_back(decl);
+      } else {
+        frag_outputs.push_back(decl);
+      }
+      continue;
+    }
+
+    // Ordinary statement / function line: keep it, with precision
+    // qualifiers dropped and GLSL types mapped to HLSL ones.
+    std::string rewritten;
+    for (const std::string& token : tokens) {
+      if (IsPrecisionToken(token)) {
+        continue;
+      }
+      if (!rewritten.empty()) {
+        rewritten += ' ';
+      }
+      if (const char* mapped = MapType(token)) {
+        rewritten += mapped;
+      } else {
+        rewritten += token;
+      }
+    }
+    if (!rewritten.empty()) {
+      body.push_back(rewritten);
+    }
+  }
+
+  std::string out;
+  out += "#pragma warning( disable: 3556 3571 )\n";
+  out += "#ifdef ANGLE_ENABLE_LOOP_FLATTEN\n";
+  out += "#define LOOP [loop]\n";
+  out += "#define FLATTEN [flatten]\n";
+  out += "#else\n";
+  out += "#define LOOP\n";
+  out += "#define FLATTEN\n";
+  out += "#endif\n";
+  out += "// INITIAL HLSL BEGIN\n\n";
+
+  if (is_vertex) {
+    out += "@@ VERTEX ATTRIBUTES @@\n";
+    out += "struct VS_INPUT\n{\n";
+    out += "    float3 dx_Position : POSITION0;\n";
+    for (size_t i = 0; i < attributes.size(); ++i) {
+      out += "    " + attributes[i].type + " " + attributes[i].name +
+             " : TEXCOORD" + std::to_string(i) + ";\n";
+    }
+    out += "};\n";
+    out += "@@ VERTEX OUTPUT @@\n\n";
+    out += "struct VS_OUTPUT\n{\n";
+    for (size_t i = 0; i < varyings.size(); ++i) {
+      out += "    " + varyings[i].type + " " + varyings[i].name +
+             " : TEXCOORD" + std::to_string(i) + ";\n";
+    }
+    out += "    float4 gl_Position : SV_POSITION;\n";
+    out += "};\n";
+  } else {
+    out += "@@ PIXEL ATTRIBUTES @@\n";
+    out += "struct PS_INPUT\n{\n";
+    if (varyings.empty()) {
+      out += "    float4 dx_VideoSample : TEXCOORD0;\n";
+    }
+    for (size_t i = 0; i < varyings.size(); ++i) {
+      out += "    " + varyings[i].type + " " + varyings[i].name +
+             " : TEXCOORD" + std::to_string(i) + ";\n";
+    }
+    out += "};\n";
+    out += "@@ PIXEL OUTPUT @@\n\n";
+    out += "struct PS_OUTPUT\n{\n";
+    if (frag_outputs.empty()) {
+      out += "    float4 color : SV_TARGET0;\n";
+    }
+    for (size_t i = 0; i < frag_outputs.size(); ++i) {
+      out += "    " + frag_outputs[i].type + " " + frag_outputs[i].name +
+             " : SV_TARGET" + std::to_string(i) + ";\n";
+    }
+    out += "};\n";
+  }
+
+  out += "cbuffer DriverConstants : register(b1)\n{\n";
+  out += "    float4 dx_ViewAdjust : packoffset(c1);\n";
+  out += is_vertex ? "    float4 dx_ViewCoords : packoffset(c1);\n"
+                   : "    float4 dx_ViewCoords : packoffset(c2);\n";
+  out += "    float3 dx_DepthFront : packoffset(c2);\n";
+  out += "    float2 dx_ViewScale  : packoffset(c3);\n";
+  out += "    float clipControlOrigin : packoffset(c3.z);\n";
+  out += "    float clipControlZeroToOne : packoffset(c3.w);\n";
+  out += "};\n";
+
+  out += "cbuffer _Globals : register(b0)\n{\n";
+  int c_register = 0;
+  for (const Decl& uniform : uniforms) {
+    out += "    " + uniform.type + " " + uniform.name + " : packoffset(c" +
+           std::to_string(c_register) + ");\n";
+    c_register += uniform.registers;
+  }
+  out += "};\n";
+
+  for (size_t i = 0; i < samplers.size(); ++i) {
+    out += "uniform SamplerState sampler_" + samplers[i].name +
+           " : register(s" + std::to_string(i) + ");\n";
+  }
+
+  if (is_vertex) {
+    out += "static float4 gl_Position = float4(0, 0, 0, 0);\n";
+    out += "static float4 gl_Color[1] = { float4(0, 0, 0, 0) };\n";
+  } else {
+    out += "static float4 gl_FragColor = float4(0, 0, 0, 0);\n";
+  }
+
+  out += "@@ MAIN PROLOGUE @@\n";
+  out += is_vertex ? "VS_OUTPUT main(VS_INPUT input){\n"
+                   : "PS_OUTPUT main(PS_INPUT input){\n";
+  for (const std::string& line : body) {
+    out += "    " + line + "\n";
+  }
+  out += "    return generateOutput(input);\n";
+  out += "}\n";
+  out += "// INITIAL HLSL END\n";
+  return out;
+}
+
+}  // namespace fingerprint
+}  // namespace blink
+
+#endif  // THIRD_PARTY_BLINK_RENDERER_MODULES_WEBGL_HLSL_SYNTHESIZER_H_
--- a/third_party/blink/renderer/modules/webgl/webgl_debug_shaders.cc
+++ b/third_party/blink/renderer/modules/webgl/webgl_debug_shaders.cc
@@ -26,6 +26,8 @@
 #include "third_party/blink/renderer/modules/webgl/webgl_debug_shaders.h"
 
 #include "third_party/blink/renderer/modules/webgl/gl_string_query.h"
+#include "third_party/blink/renderer/modules/webgl/gpu_fingerprint.h"
+#include "third_party/blink/renderer/modules/webgl/hlsl_synthesizer.h"
 #include "third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.h"
 #include "third_party/blink/renderer/modules/webgl/webgl_shader.h"
 #include "third_party/blink/renderer/platform/bindings/exception_state.h"
@@ -50,6 +52,14 @@
   if (!scoped.Context()->ValidateWebGLObject("getTranslatedShaderSource",
                                              shader))
     return "";
+  // Stealth Chromium: the windows persona claims the ANGLE D3D11 backend, whose
+  // translations are HLSL. Serve a deterministic ANGLE-style HLSL
+  // translation synthesized from the GLSL source instead of leaking the
+  // real backend's output; other personas keep the real translation.
+  if (IsFingerprintGpuActive() && fingerprint::PersonaUsesHlslTranslation()) {
+    return String::FromUTF8(fingerprint::GenerateHlslForShader(
+        shader->Source().Utf8(), shader->GetType()));
+  }
   GLStringQuery query(scoped.Context()->ContextGL());
   return query.Run<GLStringQuery::TranslatedShaderSourceANGLE>(
       shader->Object());

Original source.

0035: Legacy WebGL spoofing feature

This patch adds an ungoogled-chromium-style WebGL vendor/renderer feature and a chrome://flags entry, below the seeded GPU persona in priority. Read the series through to patch 0037: that later patch removes this entry, its presets, and description strings. The underlying feature remains, but the completed series does not retain this flags UI.

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Stealth Chromium contributors
Date: Thu, 1 Jan 2026 00:00:00 +0000
Subject: [PATCH 35] fingerprint: about:flags 'Spoof WebGL Info' entry
X-Spec: patches/17-aboutflags-spoof-webgl.md
X-Files: third_party/blink/public/common/features.h third_party/blink/common/features.cc third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc chrome/browser/flag_descriptions.h chrome/browser/about_flags.cc chrome/browser/flag-metadata.json chrome/browser/flag-never-expire-list.json

---

--- a/third_party/blink/public/common/features.h
+++ b/third_party/blink/public/common/features.h
@@ -1729,6 +1729,16 @@
     kSpeculativeServiceWorkerWarmUpOnPointerover;
 BLINK_COMMON_EXPORT extern const base::FeatureParam<bool>
     kSpeculativeServiceWorkerWarmUpOnPointerdown;
+
+// Stealth Chromium: about:flags "Spoof WebGL Info" entry (ungoogled-chromium
+// lineage). When enabled, WEBGL_debug_renderer_info queries report the
+// feature-param vendor/renderer strings instead of the real GPU strings.
+// Lower priority than the identity-seed GPU persona (gpu_fingerprint.h).
+BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kSpoofWebGLInfo);
+BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE_PARAM(std::string,
+                                               kSpoofWebGLVendorParam);
+BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE_PARAM(std::string,
+                                               kSpoofWebGLRendererParam);
 
 BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kServiceWorkerSyntheticResponse);
 
--- a/third_party/blink/common/features.cc
+++ b/third_party/blink/common/features.cc
@@ -2230,6 +2230,25 @@
 const base::FeatureParam<bool> kSpeculativeServiceWorkerWarmUpOnPointerdown{
     &kSpeculativeServiceWorkerWarmUp, "sw_warm_up_on_pointerdown", true};
 
+// Stealth Chromium: about:flags "Spoof WebGL Info" entry (ungoogled-chromium
+// lineage). The default " " (single space) keeps the ungoogled behavior: a
+// non-empty placeholder is reported when the feature is enabled without
+// selecting one of the presets, avoiding obvious site breakage.
+BASE_FEATURE(kSpoofWebGLInfo, "SpoofWebGLInfo",
+             base::FEATURE_DISABLED_BY_DEFAULT);
+
+BASE_FEATURE_PARAM(std::string,
+                   kSpoofWebGLVendorParam,
+                   &kSpoofWebGLInfo,
+                   "vendor",
+                   " ");
+
+BASE_FEATURE_PARAM(std::string,
+                   kSpoofWebGLRendererParam,
+                   &kSpoofWebGLInfo,
+                   "renderer",
+                   " ");
+
 // (crbug.com/352578800): Enables building a sysnthetic response by
 // ServiceWorker. For navigation requests, the pre-learned static response
 // header is returned in parallel with dispatching the network request.
--- a/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc
+++ b/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc
@@ -4051,6 +4051,16 @@
         // Stealth Chromium: persona renderer string when GPU spoofing is active.
         if (IsFingerprintGpuActive()) {
           const std::string renderer = GetGLRendererStringForFingerprint();
+          if (!renderer.empty()) {
+            return WebGLAny(script_state, String::FromUTF8(renderer));
+          }
+        }
+        // Stealth Chromium: about:flags "Spoof WebGL Info" fallback (ungoogled
+        // lineage). Only reached when no persona renderer was served, so
+        // the feature is inert for fingerprinted profiles.
+        if (base::FeatureList::IsEnabled(blink::features::kSpoofWebGLInfo)) {
+          const std::string renderer =
+              blink::features::kSpoofWebGLRendererParam.Get();
           if (!renderer.empty()) {
             return WebGLAny(script_state, String::FromUTF8(renderer));
           }
@@ -4067,6 +4077,16 @@
         // Stealth Chromium: persona vendor string when GPU spoofing is active.
         if (IsFingerprintGpuActive()) {
           const std::string vendor = GetGLVendorStringForFingerprint();
+          if (!vendor.empty()) {
+            return WebGLAny(script_state, String::FromUTF8(vendor));
+          }
+        }
+        // Stealth Chromium: about:flags "Spoof WebGL Info" fallback (ungoogled
+        // lineage). Only reached when no persona vendor was served, so the
+        // feature is inert for fingerprinted profiles.
+        if (base::FeatureList::IsEnabled(blink::features::kSpoofWebGLInfo)) {
+          const std::string vendor =
+              blink::features::kSpoofWebGLVendorParam.Get();
           if (!vendor.empty()) {
             return WebGLAny(script_state, String::FromUTF8(vendor));
           }
--- a/chrome/browser/flag_descriptions.h
+++ b/chrome/browser/flag_descriptions.h
@@ -3926,6 +3926,13 @@
     "Visualize overdraw by color-coding elements based on if they have other "
     "elements drawn underneath.";
 
+// Stealth Chromium: "Spoof WebGL Info" (ungoogled-chromium lineage).
+inline constexpr char kSpoofWebglInfoName[] = "Spoof WebGL Info";
+inline constexpr char kSpoofWebglInfoDescription[] =
+    "Return generic values for WebGLDebugRendererInfo to remove a potential "
+    "data leak while preventing potential website breakage. ungoogled-chromium "
+    "flag.";
+
 inline constexpr char kAccessibilityOnScreenModeName[] =
     "On-Screen Only Accessibility Nodes";
 inline constexpr char kAccessibilityOnScreenModeDescription[] =
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -423,6 +423,42 @@
     {"LocalNetworkAccessChecksWarn", "false"}};
 const FeatureEntry::FeatureVariation kLocalNetworkAccessChecksVariations[] = {
     {"(Blocking)", kLocalNetworkAccessChecksBlock, nullptr}};
+
+// Stealth Chromium: vendor/renderer presets for the "Spoof WebGL Info" flag
+// (ungoogled-chromium lineage). Note the param defaults in
+// third_party/blink/common/features.cc are a single space, so enabling the
+// feature without a preset yields the blank behavior rather than the real
+// GPU strings.
+const FeatureEntry::FeatureParam kSpoofWebGL_Blank[] = {
+    {"renderer", " "},
+    {"vendor", " "}};
+const FeatureEntry::FeatureParam kSpoofWebGL_Amd[] = {
+    {"renderer", "Radeon R9 200 Series, or similar"},
+    {"vendor", "AMD"}};
+const FeatureEntry::FeatureParam kSpoofWebGL_Apple[] = {
+    {"renderer", "Apple GPU"},
+    {"vendor", "Apple Inc."}};
+const FeatureEntry::FeatureParam kSpoofWebGL_Intel[] = {
+    {"renderer", "Intel(R) HD Graphics, or similar"},
+    {"vendor", "Intel"}};
+const FeatureEntry::FeatureParam kSpoofWebGL_Mesa[] = {
+    {"renderer", "llvmpipe"},
+    {"vendor", "Mesa"}};
+const FeatureEntry::FeatureParam kSpoofWebGL_Nvidia[] = {
+    {"renderer", "NVIDIA GeForce GTX 980, or similar"},
+    {"vendor", "NVIDIA Corporation"}};
+const FeatureEntry::FeatureParam kSpoofWebGL_Qualcomm[] = {
+    {"renderer", "Adreno (TM) 610"},
+    {"vendor", "Qualcomm"}};
+
+const FeatureEntry::FeatureVariation kSpoofWebGLChoices[] = {
+    {"Blank", kSpoofWebGL_Blank, nullptr},
+    {"AMD Radeon R9 200", kSpoofWebGL_Amd, nullptr},
+    {"Apple", kSpoofWebGL_Apple, nullptr},
+    {"Intel", kSpoofWebGL_Intel, nullptr},
+    {"Mesa LLVMpipe", kSpoofWebGL_Mesa, nullptr},
+    {"NVIDIA GeForce GTX 980", kSpoofWebGL_Nvidia, nullptr},
+    {"Qualcomm Adreno 610", kSpoofWebGL_Qualcomm, nullptr}};
 
 const FeatureEntry::Choice kEnableBenchmarkingChoices[] = {
     {flag_descriptions::kEnableBenchmarkingChoiceDisabled, "", ""},
@@ -12915,6 +12951,16 @@
     {"enable-webmcp-testing", flag_descriptions::kWebMCPTestingName,
      flag_descriptions::kWebMCPTestingDescription, kOsAll,
      FEATURE_VALUE_TYPE(blink::features::kWebMCPTesting)},
+
+    // Stealth Chromium: "Spoof WebGL Info" (ungoogled-chromium lineage). The
+    // presets feed the kSpoofWebGLInfo feature params consumed by the
+    // UNMASKED_{VENDOR,RENDERER}_WEBGL fallback in
+    // WebGLRenderingContextBase::getParameter().
+    {"spoof-webgl-info", flag_descriptions::kSpoofWebglInfoName,
+     flag_descriptions::kSpoofWebglInfoDescription, kOsAll,
+     FEATURE_WITH_PARAMS_VALUE_TYPE(blink::features::kSpoofWebGLInfo,
+                                    kSpoofWebGLChoices,
+                                    "SpoofWebGLInfo")},
 
     // Add new entries above this line.
     // NOTE: Adding a new flag requires adding a corresponding entry to enum
--- a/chrome/browser/flag-metadata.json
+++ b/chrome/browser/flag-metadata.json
@@ -8890,6 +8890,13 @@
     "expiry_milestone": 150
   },
   {
+    "name": "spoof-webgl-info",
+    "owners": [ "stealth-chromium@localhost" ],
+    // Stealth Chromium: permanent flag of this distribution's privacy patch
+    // series; it is not an upstream launch flag and must not expire.
+    "expiry_milestone": -1
+  },
+  {
     "name": "spotlight-never-retain-index",
     "owners": [
       "bling-flags@google.com",
--- a/chrome/browser/flag-never-expire-list.json
+++ b/chrome/browser/flag-never-expire-list.json
@@ -144,6 +144,7 @@
   "show-taps",
   "show-touch-hud",
   "smooth-scrolling",
+  "spoof-webgl-info",
   "strict-origin-isolation",
   "synthesized-restore-session",
   "system-keyboard-lock",

Original source.

0036: SOCKS5 UDP and warm connections

The network stack gains SOCKS5 UDP ASSOCIATE support, datagram framing, QUIC-path integration, and a pool of already greeted/authenticated proxy connections. This changes transport behavior rather than a JavaScript getter. It requires a suitable proxy and network path; the patch alone does not establish equivalent HTTP/3 behavior in every environment.

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Stealth Chromium contributors
Date: Thu, 1 Jan 2026 00:00:00 +0000
Subject: [PATCH 36] net: SOCKS5 UDP ASSOCIATE + warm pool for QUIC/HTTP3 over SOCKS5
X-Spec: patches/38-socks5-udp-associate-warm-pool.md
X-Files: net/socket/socks5_datagram_client_socket.h net/socket/socks5_datagram_client_socket.cc net/socket/socks5_warm_pool.h net/socket/socks5_warm_pool.cc net/quic/quic_session_pool.h net/quic/quic_session_pool.cc net/quic/quic_session_attempt.cc net/http/http_stream_factory_job.cc net/socket/socks_connect_job.h net/socket/socks_connect_job.cc net/log/net_log_event_type_list.h net/BUILD.gn

---

--- /dev/null
+++ b/net/socket/socks5_datagram_client_socket.h
@@ -0,0 +1,249 @@
+// Copyright 2026 The Stealth Chromium Authors
+// Use of this source code is governed by a GPL-3.0 license that can be
+// found in the LICENSE file of the source tree (Stealth Chromium).
+
+// Stealth Chromium (spec: patches/38-socks5-udp-associate-warm-pool.md):
+// SOCKS5 UDP ASSOCIATE datagram client socket. Runs the RFC 1928
+// greeting (plus RFC 1929 username/password auth when the warm pool
+// carries credentials) and the UDP ASSOCIATE command over a TCP control
+// connection to the proxy, then frames every datagram with the SOCKS5
+// UDP header and relays it through the associate target over a plain
+// UDP socket. Lets QUIC/HTTP-3 egress through a single-hop SOCKS5
+// proxy, which stock Chromium cannot do (it has no UDP-over-SOCKS5
+// support and disables QUIC on SOCKS proxies).
+//
+// Class/method names follow the vendor binary's symbol table
+// (SOCKS5DatagramClientSocket::{ConnectInternal, DoLoop,
+// UdpTargetNetLogParams, ...}).
+
+#ifndef NET_SOCKET_SOCKS5_DATAGRAM_CLIENT_SOCKET_H_
+#define NET_SOCKET_SOCKS5_DATAGRAM_CLIENT_SOCKET_H_
+
+#include <stdint.h>
+
+#include <memory>
+#include <optional>
+
+#include "base/memory/raw_ptr.h"
+#include "base/memory/scoped_refptr.h"
+#include "base/values.h"
+#include "net/base/address_list.h"
+#include "net/base/completion_once_callback.h"
+#include "net/base/completion_repeating_callback.h"
+#include "net/base/ip_endpoint.h"
+#include "net/base/net_export.h"
+#include "net/base/network_handle.h"
+#include "net/base/proxy_server.h"
+#include "net/dns/host_resolver.h"
+#include "net/log/net_log_with_source.h"
+#include "net/socket/datagram_client_socket.h"
+#include "net/socket/datagram_socket.h"
+#include "net/traffic_annotation/network_traffic_annotation.h"
+
+namespace net {
+
+class ClientSocketFactory;
+class DrainableIOBuffer;
+class GrowableIOBuffer;
+class IOBuffer;
+class IOBufferWithSize;
+class NetLog;
+class SocketTag;
+class StreamSocket;
+struct NetLogSource;
+
+// A DatagramClientSocket that carries UDP datagrams through a SOCKS5
+// proxy via UDP ASSOCIATE (RFC 1928, CMD 3). Connect() runs the
+// associate flow; once connected, Read()/Write() exchange
+// SOCKS5-UDP-framed (RFC 1928 section 7) datagrams with the relay
+// endpoint the proxy returned. The peer address reported to the QUIC
+// layer is the associate target.
+class NET_EXPORT_PRIVATE SOCKS5DatagramClientSocket
+    : public DatagramClientSocket {
+ public:
+  SOCKS5DatagramClientSocket(DatagramSocket::BindType bind_type,
+                             const ProxyServer& proxy_server,
+                             ClientSocketFactory* client_socket_factory,
+                             HostResolver* host_resolver,
+                             NetLog* net_log,
+                             const NetLogSource& source);
+
+  SOCKS5DatagramClientSocket(const SOCKS5DatagramClientSocket&) = delete;
+  SOCKS5DatagramClientSocket& operator=(const SOCKS5DatagramClientSocket&) =
+      delete;
+
+  ~SOCKS5DatagramClientSocket() override;
+
+  // NetLog parameters for the UDP ASSOCIATE target event
+  // (symbol-observed helper; |net_error| is nullopt while the associate
+  // is in progress).
+  static base::DictValue UdpTargetNetLogParams(std::optional<int> net_error);
+
+  // DatagramClientSocket implementation.
+  int Connect(const IPEndPoint& address) override;
+  int ConnectUsingNetwork(handles::NetworkHandle network,
+                          const IPEndPoint& address) override;
+  int ConnectUsingDefaultNetwork(const IPEndPoint& address) override;
+  int ConnectAsync(const IPEndPoint& address,
+                   CompletionOnceCallback callback) override;
+  int ConnectUsingNetworkAsync(handles::NetworkHandle network,
+                               const IPEndPoint& address,
+                               CompletionOnceCallback callback) override;
+  int ConnectUsingDefaultNetworkAsync(
+      const IPEndPoint& address,
+      CompletionOnceCallback callback) override;
+  handles::NetworkHandle GetBoundNetwork() const override;
+  void ApplySocketTag(const SocketTag& tag) override;
+  int SetMulticastInterface(uint32_t interface_index) override;
+  void EnableRecvOptimization() override;
+
+  // DatagramSocket implementation.
+  void Close() override;
+  int GetPeerAddress(IPEndPoint* address) const override;
+  int GetLocalAddress(IPEndPoint* address) const override;
+  void UseNonBlockingIO() override;
+  int SetDoNotFragment() override;
+  int SetRecvTos() override;
+  int SetTos(DiffServCodePoint dscp, EcnCodePoint ecn) override;
+  void SetMsgConfirm(bool confirm) override;
+  const NetLogWithSource& NetLog() const override;
+  DscpAndEcn GetLastTos() const override;
+
+  // Socket implementation.
+  int Read(IOBuffer* buf,
+           int buf_len,
+           CompletionOnceCallback callback) override;
+  int Write(IOBuffer* buf,
+            int buf_len,
+            CompletionOnceCallback callback,
+            const NetworkTrafficAnnotationTag& traffic_annotation) override;
+  int SetReceiveBufferSize(int32_t size) override;
+  int SetSendBufferSize(int32_t size) override;
+
+ private:
+  enum State {
+    STATE_NONE,
+    STATE_RESOLVE_PROXY,
+    STATE_RESOLVE_PROXY_COMPLETE,
+    STATE_TCP_CONNECT,
+    STATE_TCP_CONNECT_COMPLETE,
+    STATE_GREET_WRITE,
+    STATE_GREET_WRITE_COMPLETE,
+    STATE_GREET_READ,
+    STATE_GREET_READ_COMPLETE,
+    STATE_AUTH_WRITE,
+    STATE_AUTH_WRITE_COMPLETE,
+    STATE_AUTH_READ,
+    STATE_AUTH_READ_COMPLETE,
+    STATE_ASSOCIATE_WRITE,
+    STATE_ASSOCIATE_WRITE_COMPLETE,
+    STATE_ASSOCIATE_READ,
+    STATE_ASSOCIATE_READ_COMPLETE,
+    STATE_UDP_CONNECT,
+    STATE_UDP_CONNECT_COMPLETE,
+  };
+
+  // Runs the full connect flow (symbol-observed entry point): resolve
+  // the proxy, TCP connect, greet(/auth), UDP ASSOCIATE, then connect
+  // the relay UDP socket.
+  int ConnectInternal(DatagramSocket::BindType bind_type,
+                      handles::NetworkHandle network,
+                      const IPEndPoint& address,
+                      CompletionOnceCallback callback);
+
+  void OnIOComplete(int result);
+  int DoLoop(int last_io_result);
+
+  int DoResolveProxy();
+  int DoResolveProxyComplete(int result);
+  int DoTcpConnect();
+  int DoTcpConnectComplete(int result);
+  int DoGreetWrite();
+  int DoGreetWriteComplete(int result);
+  int DoGreetRead();
+  int DoGreetReadComplete(int result);
+  int DoAuthWrite();
+  int DoAuthWriteComplete(int result);
+  int DoAuthRead();
+  int DoAuthReadComplete(int result);
+  int DoAssociateWrite();
+  int DoAssociateWriteComplete(int result);
+  int DoAssociateRead();
+  int DoAssociateReadComplete(int result);
+  int DoUdpConnect();
+  int DoUdpConnectComplete(int result);
+
+  // UDP data-path helpers: strip the SOCKS5 UDP header from a received
+  // datagram (returns the payload size or a net error) and the async
+  // completion wrappers. The framed/raw buffers are members so they
+  // outlive both the synchronous and asynchronous completions of the
+  // underlying relay-socket operations (one outstanding op per
+  // direction).
+  int ProcessIncomingDatagram(const uint8_t* data,
+                              int len,
+                              IOBuffer* user_buf,
+                              int user_buf_len);
+  void OnUdpReadComplete(raw_ptr<IOBuffer> user_buf,
+                         int user_buf_len,
+                         CompletionOnceCallback callback,
+                         int result);
+  void OnUdpWriteComplete(CompletionOnceCallback callback,
+                          int header_len,
+                          int result);
+
+  // Builds the SOCKS5 UDP request header for |target_| into |header|.
+  static size_t BuildUdpHeader(const IPEndPoint& target, uint8_t* header);
+
+  const DatagramSocket::BindType bind_type_;
+  const ProxyServer proxy_server_;
+
+  raw_ptr<ClientSocketFactory> client_socket_factory_;
+  raw_ptr<HostResolver> host_resolver_;
+  NetLogWithSource net_log_;
+
+  State next_state_ = STATE_NONE;
+  CompletionOnceCallback connect_callback_;
+
+  // The network the relay UDP socket must bind to (kInvalidNetworkHandle
+  // for the default).
+  handles::NetworkHandle network_ = handles::kInvalidNetworkHandle;
+
+  // Set right after construction (the QUIC pool calls UseNonBlockingIO
+  // and EnableRecvOptimization before Connect); applied when the relay
+  // UDP socket is created.
+  bool use_non_blocking_io_ = false;
+  bool enable_recv_optimization_ = false;
+
+  std::unique_ptr<HostResolver::ResolveHostRequest> resolve_request_;
+  AddressList proxy_addresses_;
+
+  // TCP control connection to the proxy.
+  std::unique_ptr<StreamSocket> transport_socket_;
+  // True when transport_socket_ came from Socks5WarmPool (greeting and
+  // auth already completed).
+  bool transport_is_warm_ = false;
+  // True when the proxy selected username/password auth.
+  bool need_auth_ = false;
+
+  scoped_refptr<DrainableIOBuffer> write_buf_;
+  scoped_refptr<GrowableIOBuffer> read_buf_;
+
+  // The QUIC server each datagram is addressed to (set by Connect*).
+  IPEndPoint target_address_;
+  // The UDP relay endpoint the proxy returned (the associate target).
+  IPEndPoint associate_target_;
+
+  // The plain UDP socket carrying framed datagrams to/from the relay.
+  std::unique_ptr<DatagramClientSocket> udp_socket_;
+
+  // Buffers for the in-flight Read/Write on |udp_socket_| (raw on the
+  // read side, SOCKS5-UDP-framed on the write side).
+  scoped_refptr<IOBufferWithSize> incoming_read_buf_;
+  scoped_refptr<IOBufferWithSize> outgoing_write_buf_;
+
+  bool connected_ = false;
+};
+
+}  // namespace net
+
+#endif  // NET_SOCKET_SOCKS5_DATAGRAM_CLIENT_SOCKET_H_
--- /dev/null
+++ b/net/socket/socks5_datagram_client_socket.cc
@@ -0,0 +1,930 @@
+// Copyright 2026 The Stealth Chromium Authors
+// Use of this source code is governed by a GPL-3.0 license that can be
+// found in the LICENSE file of the source tree (Stealth Chromium).
+
+// Stealth Chromium (spec: patches/38-socks5-udp-associate-warm-pool.md):
+// SOCKS5 UDP ASSOCIATE implementation. The TCP control-channel state
+// machine (greet / RFC 1929 auth / associate) mirrors the stock
+// SOCKS5ClientSocket handshake loop; the UDP data path frames each
+// datagram per RFC 1928 section 7. Warm sockets from Socks5WarmPool
+// skip the greet/auth states. NetLog: SOCKS5_UDP_ASSOCIATE_TARGET
+// wraps the associate flow and SOCKS5_UDP_SEND_TO_TARGET marks every
+// framed send (both event names are vendor-binary strings).
+
+#include "net/socket/socks5_datagram_client_socket.h"
+
+#include <stdint.h>
+
+#include <array>
+#include <cstring>
+#include <string>
+#include <utility>
+#include <vector>
+
+#include "base/functional/bind.h"
+#include "base/memory/ref_counted.h"
+#include "base/notreached.h"
+#include "base/numerics/byte_conversions.h"
+#include "base/strings/utf_string_conversions.h"
+#include "net/base/io_buffer.h"
+#include "net/base/ip_address.h"
+#include "net/base/net_errors.h"
+#include "net/base/sys_addrinfo.h"
+#include "net/log/net_log_event_type.h"
+#include "net/socket/client_socket_factory.h"
+#include "net/socket/socks5_warm_pool.h"
+#include "net/socket/stream_socket.h"
+
+namespace net {
+
+namespace {
+
+// Stealth Chromium: traffic annotation for the SOCKS5 UDP relay path
+// (symbol-observed in the vendor binary as (anonymous
+// ns)::kSocks5UdpTrafficAnnotation).
+constexpr NetworkTrafficAnnotationTag kSocks5UdpTrafficAnnotation =
+    DefineNetworkTrafficAnnotation("socks5_udp_associate", R"(
+      semantics {
+        sender: "SOCKS5DatagramClientSocket"
+        description:
+          "Relays UDP datagrams (QUIC/HTTP-3 traffic) through a SOCKS5 "
+          "proxy using the protocol's UDP ASSOCIATE command. A TCP "
+          "control connection performs the SOCKS5 greeting, optional "
+          "username/password authentication and the associate request; "
+          "datagrams are then sent to the relay endpoint the proxy "
+          "returned."
+        trigger:
+          "A QUIC connection is attempted while the browser is "
+          "configured to use a SOCKS5 proxy."
+        data: "Arbitrary UDP payloads (QUIC packets) addressed to the "
+          "destination the caller connected to."
+        destination: OTHER
+        destination_other:
+          "The configured SOCKS5 proxy, which relays to the destination."
+      }
+      policy {
+        cookies_allowed: NO
+        setting:
+          "This feature is active only when a SOCKS5 proxy is configured "
+          "via --proxy-server or system proxy settings."
+        policy_exception_justification: "Not implemented."
+      })");
+
+constexpr uint8_t kSOCKS5Version = 0x05;
+constexpr uint8_t kNoAuthMethod = 0x00;
+constexpr uint8_t kUsernamePasswordMethod = 0x02;
+constexpr uint8_t kUsernamePasswordVersion = 0x01;
+constexpr uint8_t kUdpAssociateCommand = 0x03;
+constexpr uint8_t kNullByte = 0x00;
+
+constexpr unsigned int kGreetReplySize = 2;
+constexpr unsigned int kAuthReplySize = 2;
+constexpr unsigned int kAssociateReplyHeaderSize = 5;
+
+// RSV(2) + FRAG(1) + ATYP(1) + ADDR(16) + PORT(2): worst-case UDP header.
+constexpr size_t kMaxUdpHeaderSize = 22;
+
+// Largest UDP payload we are willing to relay in one datagram.
+constexpr int kMaxUdpPayloadSize = 65535 - kMaxUdpHeaderSize;
+
+// Address types (RFC 1928).
+constexpr uint8_t kAtypIpv4 = 0x01;
+constexpr uint8_t kAtypDomain = 0x03;
+constexpr uint8_t kAtypIpv6 = 0x04;
+
+}  // namespace
+
+SOCKS5DatagramClientSocket::SOCKS5DatagramClientSocket(
+    DatagramSocket::BindType bind_type,
+    const ProxyServer& proxy_server,
+    ClientSocketFactory* client_socket_factory,
+    HostResolver* host_resolver,
+    NetLog* net_log,
+    const NetLogSource& source)
+    : bind_type_(bind_type),
+      proxy_server_(proxy_server),
+      client_socket_factory_(client_socket_factory),
+      host_resolver_(host_resolver),
+      net_log_(NetLogWithSource::Make(net_log, source)) {}
+
+SOCKS5DatagramClientSocket::~SOCKS5DatagramClientSocket() {
+  Close();
+}
+
+// static
+base::DictValue SOCKS5DatagramClientSocket::UdpTargetNetLogParams(
+    std::optional<int> net_error) {
+  base::DictValue dict;
+  if (net_error.has_value()) {
+    dict.Set("net_error", *net_error);
+  }
+  return dict;
+}
+
+int SOCKS5DatagramClientSocket::Connect(const IPEndPoint& address) {
+  return ConnectInternal(bind_type_, handles::kInvalidNetworkHandle, address,
+                         CompletionOnceCallback());
+}
+
+int SOCKS5DatagramClientSocket::ConnectUsingNetwork(
+    handles::NetworkHandle network,
+    const IPEndPoint& address) {
+  return ConnectInternal(bind_type_, network, address,
+                         CompletionOnceCallback());
+}
+
+int SOCKS5DatagramClientSocket::ConnectUsingDefaultNetwork(
+    const IPEndPoint& address) {
+  return ConnectInternal(bind_type_, handles::kInvalidNetworkHandle, address,
+                         CompletionOnceCallback());
+}
+
+int SOCKS5DatagramClientSocket::ConnectAsync(const IPEndPoint& address,
+                                             CompletionOnceCallback callback) {
+  return ConnectInternal(bind_type_, handles::kInvalidNetworkHandle, address,
+                         std::move(callback));
+}
+
+int SOCKS5DatagramClientSocket::ConnectUsingNetworkAsync(
+    handles::NetworkHandle network,
+    const IPEndPoint& address,
+    CompletionOnceCallback callback) {
+  return ConnectInternal(bind_type_, network, address, std::move(callback));
+}
+
+int SOCKS5DatagramClientSocket::ConnectUsingDefaultNetworkAsync(
+    const IPEndPoint& address,
+    CompletionOnceCallback callback) {
+  return ConnectInternal(bind_type_, handles::kInvalidNetworkHandle, address,
+                         std::move(callback));
+}
+
+handles::NetworkHandle SOCKS5DatagramClientSocket::GetBoundNetwork() const {
+  return udp_socket_ ? udp_socket_->GetBoundNetwork()
+                     : handles::kInvalidNetworkHandle;
+}
+
+void SOCKS5DatagramClientSocket::ApplySocketTag(const SocketTag& tag) {
+  if (udp_socket_) {
+    udp_socket_->ApplySocketTag(tag);
+  }
+}
+
+int SOCKS5DatagramClientSocket::SetMulticastInterface(
+    uint32_t interface_index) {
+  if (udp_socket_) {
+    return udp_socket_->SetMulticastInterface(interface_index);
+  }
+  return ERR_UNEXPECTED;
+}
+
+void SOCKS5DatagramClientSocket::EnableRecvOptimization() {
+  enable_recv_optimization_ = true;
+  if (udp_socket_) {
+    udp_socket_->EnableRecvOptimization();
+  }
+}
+
+void SOCKS5DatagramClientSocket::Close() {
+  connected_ = false;
+  next_state_ = STATE_NONE;
+  connect_callback_.Reset();
+  resolve_request_.reset();
+  transport_socket_.reset();
+  udp_socket_.reset();
+  write_buf_.reset();
+  read_buf_.reset();
+  incoming_read_buf_.reset();
+  outgoing_write_buf_.reset();
+  transport_is_warm_ = false;
+  need_auth_ = false;
+}
+
+int SOCKS5DatagramClientSocket::GetPeerAddress(IPEndPoint* address) const {
+  if (!connected_) {
+    return ERR_UNEXPECTED;
+  }
+  *address = associate_target_;
+  return OK;
+}
+
+int SOCKS5DatagramClientSocket::GetLocalAddress(IPEndPoint* address) const {
+  if (!udp_socket_) {
+    return ERR_UNEXPECTED;
+  }
+  return udp_socket_->GetLocalAddress(address);
+}
+
+void SOCKS5DatagramClientSocket::UseNonBlockingIO() {
+  use_non_blocking_io_ = true;
+  if (udp_socket_) {
+    udp_socket_->UseNonBlockingIO();
+  }
+}
+
+int SOCKS5DatagramClientSocket::SetDoNotFragment() {
+  if (!udp_socket_) {
+    return ERR_UNEXPECTED;
+  }
+  return udp_socket_->SetDoNotFragment();
+}
+
+int SOCKS5DatagramClientSocket::SetRecvTos() {
+  if (!udp_socket_) {
+    return ERR_UNEXPECTED;
+  }
+  return udp_socket_->SetRecvTos();
+}
+
+int SOCKS5DatagramClientSocket::SetTos(DiffServCodePoint dscp,
+                                       EcnCodePoint ecn) {
+  if (!udp_socket_) {
+    return ERR_UNEXPECTED;
+  }
+  return udp_socket_->SetTos(dscp, ecn);
+}
+
+void SOCKS5DatagramClientSocket::SetMsgConfirm(bool confirm) {
+  if (udp_socket_) {
+    udp_socket_->SetMsgConfirm(confirm);
+  }
+}
+
+const NetLogWithSource& SOCKS5DatagramClientSocket::NetLog() const {
+  return net_log_;
+}
+
+DscpAndEcn SOCKS5DatagramClientSocket::GetLastTos() const {
+  if (!udp_socket_) {
+    return DscpAndEcn();
+  }
+  return udp_socket_->GetLastTos();
+}
+
+int SOCKS5DatagramClientSocket::SetReceiveBufferSize(int32_t size) {
+  if (!udp_socket_) {
+    return ERR_UNEXPECTED;
+  }
+  return udp_socket_->SetReceiveBufferSize(size);
+}
+
+int SOCKS5DatagramClientSocket::SetSendBufferSize(int32_t size) {
+  if (!udp_socket_) {
+    return ERR_UNEXPECTED;
+  }
+  return udp_socket_->SetSendBufferSize(size);
+}
+
+// Returns the number of bytes the SOCKS5 UDP header occupies for
+// |target| (RSV/FRAG/ATYP/addr/port).
+// static
+size_t SOCKS5DatagramClientSocket::BuildUdpHeader(const IPEndPoint& target,
+                                                  uint8_t* header) {
+  size_t offset = 0;
+  header[offset++] = 0x00;  // RSV high.
+  header[offset++] = 0x00;  // RSV low.
+  header[offset++] = 0x00;  // Fragment number; fragmentation unused.
+  const IPAddress& address = target.address();
+  if (address.IsIPv4()) {
+    header[offset++] = kAtypIpv4;
+    std::memcpy(header + offset, address.bytes().data(), 4);
+    offset += 4;
+  } else {
+    header[offset++] = kAtypIpv6;
+    std::memcpy(header + offset, address.bytes().data(), 16);
+    offset += 16;
+  }
+  auto port = base::U16ToBigEndian(target.port());
+  std::memcpy(header + offset, port.data(), port.size());
+  offset += port.size();
+  return offset;
+}
+
+int SOCKS5DatagramClientSocket::ProcessIncomingDatagram(const uint8_t* data,
+                                                        int len,
+                                                        IOBuffer* user_buf,
+                                                        int user_buf_len) {
+  // Strip the SOCKS5 UDP header: RSV(2) FRAG(1) ATYP(1) addr port.
+  if (len < 4) {
+    return ERR_INVALID_RESPONSE;
+  }
+  if (data[2] != 0x00) {
+    // Fragmented datagrams are not supported.
+    return ERR_INVALID_RESPONSE;
+  }
+  const size_t length = static_cast<size_t>(len);
+  size_t offset = 3;
+  const uint8_t address_type = data[offset++];
+  switch (address_type) {
+    case kAtypIpv4:
+      offset += 4;
+      break;
+    case kAtypDomain:
+      if (length < offset + 1) {
+        return ERR_INVALID_RESPONSE;
+      }
+      offset += 1 + data[offset];
+      break;
+    case kAtypIpv6:
+      offset += 16;
+      break;
+    default:
+      return ERR_INVALID_RESPONSE;
+  }
+  offset += 2;  // Source port.
+  if (offset > length) {
+    return ERR_INVALID_RESPONSE;
+  }
+  const size_t payload_len = length - offset;
+  if (static_cast<int>(payload_len) > user_buf_len) {
+    return ERR_MSG_TOO_BIG;
+  }
+  std::memcpy(user_buf->data(), data + offset, payload_len);
+  return static_cast<int>(payload_len);
+}
+
+int SOCKS5DatagramClientSocket::Read(IOBuffer* buf,
+                                     int buf_len,
+                                     CompletionOnceCallback callback) {
+  DCHECK(connected_);
+  DCHECK(!callback.is_null());
+  DCHECK(!incoming_read_buf_);
+
+  incoming_read_buf_ = base::MakeRefCounted<IOBufferWithSize>(
+      kMaxUdpPayloadSize + static_cast<int>(kMaxUdpHeaderSize));
+  int rv = udp_socket_->Read(
+      incoming_read_buf_.get(), incoming_read_buf_->size(),
+      base::BindOnce(&SOCKS5DatagramClientSocket::OnUdpReadComplete,
+                     base::Unretained(this), buf, buf_len,
+                     std::move(callback)));
+  if (rv == ERR_IO_PENDING) {
+    return rv;
+  }
+  // Synchronous completion: strip the header and return the payload
+  // directly (the callback will not run).
+  if (rv > 0) {
+    rv = ProcessIncomingDatagram(
+        reinterpret_cast<const uint8_t*>(incoming_read_buf_->data()), rv, buf,
+        buf_len);
+  }
+  incoming_read_buf_.reset();
+  return rv;
+}
+
+void SOCKS5DatagramClientSocket::OnUdpReadComplete(
+    raw_ptr<IOBuffer> user_buf,
+    int user_buf_len,
+    CompletionOnceCallback callback,
+    int result) {
+  DCHECK_NE(ERR_IO_PENDING, result);
+  scoped_refptr<IOBufferWithSize> incoming = std::move(incoming_read_buf_);
+  if (result <= 0) {
+    std::move(callback).Run(result);
+    return;
+  }
+  std::move(callback).Run(ProcessIncomingDatagram(
+      reinterpret_cast<const uint8_t*>(incoming->data()), result, user_buf,
+      user_buf_len));
+}
+
+int SOCKS5DatagramClientSocket::Write(
+    IOBuffer* buf,
+    int buf_len,
+    CompletionOnceCallback callback,
+    const NetworkTrafficAnnotationTag& traffic_annotation) {
+  DCHECK(connected_);
+  DCHECK(!callback.is_null());
+  DCHECK(!outgoing_write_buf_);
+  if (buf_len > kMaxUdpPayloadSize) {
+    return ERR_MSG_TOO_BIG;
+  }
+
+  // Stealth Chromium: frame the datagram for the associate target and relay
+  // it (netlog type SOCKS5_UDP_SEND_TO_TARGET).
+  outgoing_write_buf_ =
+      base::MakeRefCounted<IOBufferWithSize>(buf_len + kMaxUdpHeaderSize);
+  const size_t header_len =
+      BuildUdpHeader(target_address_,
+                     reinterpret_cast<uint8_t*>(outgoing_write_buf_->data()));
+  std::memcpy(outgoing_write_buf_->data() + header_len, buf->data(), buf_len);
+  net_log_.AddEvent(NetLogEventType::SOCKS5_UDP_SEND_TO_TARGET, [&] {
+    base::DictValue dict;
+    dict.Set("bytes", buf_len);
+    return dict;
+  });
+  int rv = udp_socket_->Write(
+      outgoing_write_buf_.get(), static_cast<int>(header_len + buf_len),
+      base::BindOnce(&SOCKS5DatagramClientSocket::OnUdpWriteComplete,
+                     base::Unretained(this), std::move(callback),
+                     static_cast<int>(header_len)),
+      kSocks5UdpTrafficAnnotation);
+  if (rv == ERR_IO_PENDING) {
+    return rv;
+  }
+  // Synchronous completion: report the user payload size, not the
+  // framed size.
+  outgoing_write_buf_.reset();
+  if (rv > 0) {
+    rv -= static_cast<int>(header_len);
+  }
+  return rv;
+}
+
+void SOCKS5DatagramClientSocket::OnUdpWriteComplete(
+    CompletionOnceCallback callback,
+    int header_len,
+    int result) {
+  DCHECK_NE(ERR_IO_PENDING, result);
+  outgoing_write_buf_.reset();
+  if (result > 0) {
+    result -= header_len;
+  }
+  std::move(callback).Run(result);
+}
+
+int SOCKS5DatagramClientSocket::ConnectInternal(
+    DatagramSocket::BindType bind_type,
+    handles::NetworkHandle network,
+    const IPEndPoint& address,
+    CompletionOnceCallback callback) {
+  DCHECK_EQ(STATE_NONE, next_state_);
+  DCHECK(connect_callback_.is_null());
+
+  target_address_ = address;
+  network_ = network;
+
+  net_log_.BeginEvent(NetLogEventType::SOCKS5_UDP_ASSOCIATE_TARGET);
+  next_state_ = STATE_RESOLVE_PROXY;
+  int rv = DoLoop(OK);
+  if (rv == ERR_IO_PENDING) {
+    connect_callback_ = std::move(callback);
+  } else {
+    // Complete synchronously, mirroring UDPClientSocket: the callback
+    // (if any) is dropped and the result returned to the caller, which
+    // is responsible for running its own completion path. Running the
+    // callback here as well would double-fire the QUIC pool's split
+    // callback.
+    net_log_.EndEvent(NetLogEventType::SOCKS5_UDP_ASSOCIATE_TARGET, [&] {
+      return UdpTargetNetLogParams(rv);
+    });
+  }
+  return rv;
+}
+
+void SOCKS5DatagramClientSocket::OnIOComplete(int result) {
+  int rv = DoLoop(result);
+  if (rv != ERR_IO_PENDING) {
+    net_log_.EndEvent(NetLogEventType::SOCKS5_UDP_ASSOCIATE_TARGET, [&] {
+      return UdpTargetNetLogParams(rv);
+    });
+    if (!connect_callback_.is_null()) {
+      std::move(connect_callback_).Run(rv);
+    }
+  }
+}
+
+int SOCKS5DatagramClientSocket::DoLoop(int last_io_result) {
+  DCHECK_NE(STATE_NONE, next_state_);
+  int rv = last_io_result;
+  do {
+    State state = next_state_;
+    next_state_ = STATE_NONE;
+    switch (state) {
+      case STATE_RESOLVE_PROXY:
+        DCHECK_EQ(OK, rv);
+        rv = DoResolveProxy();
+        break;
+      case STATE_RESOLVE_PROXY_COMPLETE:
+        rv = DoResolveProxyComplete(rv);
+        break;
+      case STATE_TCP_CONNECT:
+        DCHECK_EQ(OK, rv);
+        rv = DoTcpConnect();
+        break;
+      case STATE_TCP_CONNECT_COMPLETE:
+        rv = DoTcpConnectComplete(rv);
+        break;
+      case STATE_GREET_WRITE:
+        DCHECK_EQ(OK, rv);
+        rv = DoGreetWrite();
+        break;
+      case STATE_GREET_WRITE_COMPLETE:
+        rv = DoGreetWriteComplete(rv);
+        break;
+      case STATE_GREET_READ:
+        DCHECK_EQ(OK, rv);
+        rv = DoGreetRead();
+        break;
+      case STATE_GREET_READ_COMPLETE:
+        rv = DoGreetReadComplete(rv);
+        break;
+      case STATE_AUTH_WRITE:
+        DCHECK_EQ(OK, rv);
+        rv = DoAuthWrite();
+        break;
+      case STATE_AUTH_WRITE_COMPLETE:
+        rv = DoAuthWriteComplete(rv);
+        break;
+      case STATE_AUTH_READ:
+        DCHECK_EQ(OK, rv);
+        rv = DoAuthRead();
+        break;
+      case STATE_AUTH_READ_COMPLETE:
+        rv = DoAuthReadComplete(rv);
+        break;
+      case STATE_ASSOCIATE_WRITE:
+        DCHECK_EQ(OK, rv);
+        rv = DoAssociateWrite();
+        break;
+      case STATE_ASSOCIATE_WRITE_COMPLETE:
+        rv = DoAssociateWriteComplete(rv);
+        break;
+      case STATE_ASSOCIATE_READ:
+        DCHECK_EQ(OK, rv);
+        rv = DoAssociateRead();
+        break;
+      case STATE_ASSOCIATE_READ_COMPLETE:
+        rv = DoAssociateReadComplete(rv);
+        break;
+      case STATE_UDP_CONNECT:
+        DCHECK_EQ(OK, rv);
+        rv = DoUdpConnect();
+        break;
+      case STATE_UDP_CONNECT_COMPLETE:
+        rv = DoUdpConnectComplete(rv);
+        break;
+      default:
+        NOTREACHED() << "bad state";
+    }
+  } while (rv != ERR_IO_PENDING && next_state_ != STATE_NONE);
+  return rv;
+}
+
+int SOCKS5DatagramClientSocket::DoResolveProxy() {
+  next_state_ = STATE_RESOLVE_PROXY_COMPLETE;
+  resolve_request_ = host_resolver_->CreateRequest(
+      proxy_server_.host_port_pair(), NetworkAnonymizationKey(), net_log_,
+      std::nullopt);
+  return resolve_request_->Start(base::BindOnce(
+      &SOCKS5DatagramClientSocket::OnIOComplete, base::Unretained(this)));
+}
+
+int SOCKS5DatagramClientSocket::DoResolveProxyComplete(int result) {
+  if (result != OK) {
+    return result;
+  }
+  proxy_addresses_ = resolve_request_->GetAddressResults();
+  resolve_request_.reset();
+  if (proxy_addresses_.empty()) {
+    return ERR_SOCKS_CONNECTION_FAILED;
+  }
+  next_state_ = STATE_TCP_CONNECT;
+  return OK;
+}
+
+int SOCKS5DatagramClientSocket::DoTcpConnect() {
+  next_state_ = STATE_TCP_CONNECT_COMPLETE;
+
+  // Stealth Chromium: prefer a warm socket from Socks5WarmPool — its
+  // greeting/auth have already completed, so jump straight to the
+  // associate request.
+  transport_socket_ = Socks5WarmPool::GetInstance()->TakeWarmSocket();
+  if (transport_socket_) {
+    transport_is_warm_ = true;
+    next_state_ = STATE_ASSOCIATE_WRITE;
+    return OK;
+  }
+
+  transport_socket_ = client_socket_factory_->CreateTransportClientSocket(
+      proxy_addresses_, /*socket_performance_watcher=*/nullptr,
+      /*network_quality_estimator=*/nullptr, net_log_.net_log(),
+      net_log_.source());
+  return transport_socket_->Connect(base::BindOnce(
+      &SOCKS5DatagramClientSocket::OnIOComplete, base::Unretained(this)));
+}
+
+int SOCKS5DatagramClientSocket::DoTcpConnectComplete(int result) {
+  if (result != OK) {
+    return result;
+  }
+  next_state_ = STATE_GREET_WRITE;
+  return OK;
+}
+
+int SOCKS5DatagramClientSocket::DoGreetWrite() {
+  next_state_ = STATE_GREET_WRITE_COMPLETE;
+  if (!write_buf_) {
+    std::vector<uint8_t> greet{kSOCKS5Version, 0x01, kNoAuthMethod};
+    if (Socks5WarmPool::GetProxyCredentials()) {
+      greet[1] = 0x02;
+      greet.push_back(kUsernamePasswordMethod);
+    }
+    auto base_buffer = base::MakeRefCounted<VectorIOBuffer>(std::move(greet));
+    write_buf_ = base::MakeRefCounted<DrainableIOBuffer>(std::move(base_buffer),
+                                                         base_buffer->size());
+  }
+  return transport_socket_->Write(
+      write_buf_.get(), write_buf_->BytesRemaining(),
+      base::BindOnce(&SOCKS5DatagramClientSocket::OnIOComplete,
+                     base::Unretained(this)),
+      kSocks5UdpTrafficAnnotation);
+}
+
+int SOCKS5DatagramClientSocket::DoGreetWriteComplete(int result) {
+  if (result < 0) {
+    return result;
+  }
+  write_buf_->DidConsume(result);
+  if (write_buf_->BytesRemaining() == 0) {
+    write_buf_.reset();
+    next_state_ = STATE_GREET_READ;
+  } else {
+    next_state_ = STATE_GREET_WRITE;
+  }
+  return OK;
+}
+
+int SOCKS5DatagramClientSocket::DoGreetRead() {
+  next_state_ = STATE_GREET_READ_COMPLETE;
+  if (!read_buf_) {
+    read_buf_ = base::MakeRefCounted<GrowableIOBuffer>();
+    read_buf_->SetCapacity(kGreetReplySize);
+  }
+  return transport_socket_->Read(
+      read_buf_.get(), read_buf_->RemainingCapacity(),
+      base::BindOnce(&SOCKS5DatagramClientSocket::OnIOComplete,
+                     base::Unretained(this)));
+}
+
+int SOCKS5DatagramClientSocket::DoGreetReadComplete(int result) {
+  if (result < 0) {
+    return result;
+  }
+  if (result == 0) {
+    net_log_.AddEvent(NetLogEventType::SOCKS_UNEXPECTEDLY_CLOSED_DURING_GREETING);
+    return ERR_SOCKS_CONNECTION_FAILED;
+  }
+  read_buf_->set_offset(read_buf_->offset() + result);
+  if (read_buf_->RemainingCapacity() > 0) {
+    next_state_ = STATE_GREET_READ;
+    return OK;
+  }
+
+  base::span<uint8_t> data = read_buf_->span_before_offset();
+  if (data[0] != kSOCKS5Version) {
+    net_log_.AddEventWithIntParams(NetLogEventType::SOCKS_UNEXPECTED_VERSION,
+                                   "version", data[0]);
+    return ERR_SOCKS_CONNECTION_FAILED;
+  }
+  const uint8_t method = data[1];
+  read_buf_.reset();
+  if (method == kNoAuthMethod) {
+    next_state_ = STATE_ASSOCIATE_WRITE;
+    return OK;
+  }
+  if (method == kUsernamePasswordMethod &&
+      Socks5WarmPool::GetProxyCredentials()) {
+    need_auth_ = true;
+    next_state_ = STATE_AUTH_WRITE;
+    return OK;
+  }
+  net_log_.AddEventWithIntParams(NetLogEventType::SOCKS_UNEXPECTED_AUTH,
+                                 "method", method);
+  return ERR_SOCKS_CONNECTION_FAILED;
+}
+
+int SOCKS5DatagramClientSocket::DoAuthWrite() {
+  next_state_ = STATE_AUTH_WRITE_COMPLETE;
+  if (!write_buf_) {
+    const auto& credentials = Socks5WarmPool::GetProxyCredentials();
+    const std::string username = base::UTF16ToUTF8(credentials->username());
+    const std::string password = base::UTF16ToUTF8(credentials->password());
+    if (username.size() > 0xFF || password.size() > 0xFF) {
+      return ERR_SOCKS_CONNECTION_FAILED;
+    }
+    std::vector<uint8_t> auth;
+    auth.reserve(3 + username.size() + password.size());
+    auth.push_back(kUsernamePasswordVersion);
+    auth.push_back(static_cast<uint8_t>(username.size()));
+    auth.insert(auth.end(), username.begin(), username.end());
+    auth.push_back(static_cast<uint8_t>(password.size()));
+    auth.insert(auth.end(), password.begin(), password.end());
+    auto base_buffer = base::MakeRefCounted<VectorIOBuffer>(std::move(auth));
+    write_buf_ = base::MakeRefCounted<DrainableIOBuffer>(std::move(base_buffer),
+                                                         base_buffer->size());
+  }
+  return transport_socket_->Write(
+      write_buf_.get(), write_buf_->BytesRemaining(),
+      base::BindOnce(&SOCKS5DatagramClientSocket::OnIOComplete,
+                     base::Unretained(this)),
+      kSocks5UdpTrafficAnnotation);
+}
+
+int SOCKS5DatagramClientSocket::DoAuthWriteComplete(int result) {
+  if (result < 0) {
+    return result;
+  }
+  write_buf_->DidConsume(result);
+  if (write_buf_->BytesRemaining() == 0) {
+    write_buf_.reset();
+    next_state_ = STATE_AUTH_READ;
+  } else {
+    next_state_ = STATE_AUTH_WRITE;
+  }
+  return OK;
+}
+
+int SOCKS5DatagramClientSocket::DoAuthRead() {
+  next_state_ = STATE_AUTH_READ_COMPLETE;
+  if (!read_buf_) {
+    read_buf_ = base::MakeRefCounted<GrowableIOBuffer>();
+    read_buf_->SetCapacity(kAuthReplySize);
+  }
+  return transport_socket_->Read(
+      read_buf_.get(), read_buf_->RemainingCapacity(),
+      base::BindOnce(&SOCKS5DatagramClientSocket::OnIOComplete,
+                     base::Unretained(this)));
+}
+
+int SOCKS5DatagramClientSocket::DoAuthReadComplete(int result) {
+  if (result < 0) {
+    return result;
+  }
+  if (result == 0) {
+    return ERR_SOCKS_CONNECTION_FAILED;
+  }
+  read_buf_->set_offset(read_buf_->offset() + result);
+  if (read_buf_->RemainingCapacity() > 0) {
+    next_state_ = STATE_AUTH_READ;
+    return OK;
+  }
+
+  base::span<uint8_t> data = read_buf_->span_before_offset();
+  if (data[0] != kUsernamePasswordVersion || data[1] != 0x00) {
+    net_log_.AddEventWithIntParams(NetLogEventType::SOCKS_UNEXPECTED_AUTH,
+                                   "status", data[1]);
+    return ERR_SOCKS_CONNECTION_FAILED;
+  }
+  read_buf_.reset();
+  next_state_ = STATE_ASSOCIATE_WRITE;
+  return OK;
+}
+
+int SOCKS5DatagramClientSocket::DoAssociateWrite() {
+  next_state_ = STATE_ASSOCIATE_WRITE_COMPLETE;
+  if (!write_buf_) {
+    // CMD 3 (UDP ASSOCIATE) with DST.ADDR/PORT 0.0.0.0:0 — the client
+    // expects the proxy to relay datagrams from the TCP control
+    // connection's source address.
+    const std::vector<uint8_t> request{
+        kSOCKS5Version, kUdpAssociateCommand, kNullByte,
+        kAtypIpv4,      0x00,                 0x00,
+        0x00,           0x00,                 0x00,
+        0x00};
+    auto base_buffer = base::MakeRefCounted<VectorIOBuffer>(request);
+    write_buf_ = base::MakeRefCounted<DrainableIOBuffer>(std::move(base_buffer),
+                                                         base_buffer->size());
+  }
+  return transport_socket_->Write(
+      write_buf_.get(), write_buf_->BytesRemaining(),
+      base::BindOnce(&SOCKS5DatagramClientSocket::OnIOComplete,
+                     base::Unretained(this)),
+      kSocks5UdpTrafficAnnotation);
+}
+
+int SOCKS5DatagramClientSocket::DoAssociateWriteComplete(int result) {
+  if (result < 0) {
+    return result;
+  }
+  write_buf_->DidConsume(result);
+  if (write_buf_->BytesRemaining() == 0) {
+    write_buf_.reset();
+    next_state_ = STATE_ASSOCIATE_READ;
+  } else {
+    next_state_ = STATE_ASSOCIATE_WRITE;
+  }
+  return OK;
+}
+
+int SOCKS5DatagramClientSocket::DoAssociateRead() {
+  next_state_ = STATE_ASSOCIATE_READ_COMPLETE;
+  if (!read_buf_) {
+    read_buf_ = base::MakeRefCounted<GrowableIOBuffer>();
+    read_buf_->SetCapacity(kAssociateReplyHeaderSize);
+  }
+  return transport_socket_->Read(
+      read_buf_.get(), read_buf_->RemainingCapacity(),
+      base::BindOnce(&SOCKS5DatagramClientSocket::OnIOComplete,
+                     base::Unretained(this)));
+}
+
+int SOCKS5DatagramClientSocket::DoAssociateReadComplete(int result) {
+  if (result < 0) {
+    return result;
+  }
+  if (result == 0) {
+    net_log_.AddEvent(
+        NetLogEventType::SOCKS_UNEXPECTEDLY_CLOSED_DURING_HANDSHAKE);
+    return ERR_SOCKS_CONNECTION_FAILED;
+  }
+  read_buf_->set_offset(read_buf_->offset() + result);
+
+  if (read_buf_->offset() == kAssociateReplyHeaderSize) {
+    base::span<uint8_t> data = read_buf_->span_before_offset();
+    if (data[0] != kSOCKS5Version || data[2] != kNullByte) {
+      net_log_.AddEventWithIntParams(NetLogEventType::SOCKS_UNEXPECTED_VERSION,
+                                     "version", data[0]);
+      return ERR_SOCKS_CONNECTION_FAILED;
+    }
+    if (data[1] != 0x00) {
+      net_log_.AddEventWithIntParams(NetLogEventType::SOCKS_SERVER_ERROR,
+                                     "error_code", data[1]);
+      return ERR_SOCKS_CONNECTION_FAILED;
+    }
+    const uint8_t address_type = data[3];
+    int additional_bytes_expected;
+    if (address_type == kAtypDomain) {
+      additional_bytes_expected = data[4];
+    } else if (address_type == kAtypIpv4) {
+      additional_bytes_expected = sizeof(struct in_addr) - 1;
+    } else if (address_type == kAtypIpv6) {
+      additional_bytes_expected = sizeof(struct in6_addr) - 1;
+    } else {
+      net_log_.AddEventWithIntParams(
+          NetLogEventType::SOCKS_UNKNOWN_ADDRESS_TYPE, "address_type",
+          data[3]);
+      return ERR_SOCKS_CONNECTION_FAILED;
+    }
+    additional_bytes_expected += 2;  // Port.
+    read_buf_->SetCapacity(kAssociateReplyHeaderSize +
+                           additional_bytes_expected);
+    next_state_ = STATE_ASSOCIATE_READ;
+    return OK;
+  }
+
+  if (read_buf_->RemainingCapacity() == 0) {
+    // Parse BND.ADDR/BND.PORT — the UDP relay endpoint.
+    base::span<uint8_t> data = read_buf_->span_before_offset();
+    const uint8_t address_type = data[3];
+    const uint8_t* addr = &data[4];
+    size_t addr_len;
+    if (address_type == kAtypIpv4) {
+      addr_len = sizeof(struct in_addr);
+    } else if (address_type == kAtypIpv6) {
+      addr_len = sizeof(struct in6_addr);
+    } else {
+      addr_len = addr[0];
+      addr += 1;
+    }
+    const uint8_t* port_bytes = addr + addr_len;
+    associate_target_ = IPEndPoint(
+        IPAddress(base::span<const uint8_t>(addr, addr_len)),
+        base::U16FromBigEndian(
+            base::span<const uint8_t, 2>(port_bytes, 2)));
+    read_buf_.reset();
+
+    // A reply of 0.0.0.0 means "relay from the same host as the TCP
+    // control connection" (RFC 1928 section 4 practice).
+    if (associate_target_.address().IsIPv4() &&
+        associate_target_.address() == IPAddress(0u, 0u, 0u, 0u)) {
+      IPEndPoint tcp_peer;
+      if (transport_socket_->GetPeerAddress(&tcp_peer) == OK) {
+        associate_target_ =
+            IPEndPoint(tcp_peer.address(), associate_target_.port());
+      }
+    }
+
+    next_state_ = STATE_UDP_CONNECT;
+    return OK;
+  }
+
+  next_state_ = STATE_ASSOCIATE_READ;
+  return OK;
+}
+
+int SOCKS5DatagramClientSocket::DoUdpConnect() {
+  next_state_ = STATE_UDP_CONNECT_COMPLETE;
+  udp_socket_ = client_socket_factory_->CreateDatagramClientSocket(
+      bind_type_, net_log_.net_log(), net_log_.source());
+  if (use_non_blocking_io_) {
+    udp_socket_->UseNonBlockingIO();
+  }
+  if (enable_recv_optimization_) {
+    udp_socket_->EnableRecvOptimization();
+  }
+  if (network_ == handles::kInvalidNetworkHandle) {
+    return udp_socket_->Connect(associate_target_);
+  }
+  return udp_socket_->ConnectUsingNetwork(network_, associate_target_);
+}
+
+int SOCKS5DatagramClientSocket::DoUdpConnectComplete(int result) {
+  if (result != OK) {
+    return result;
+  }
+  connected_ = true;
+  next_state_ = STATE_NONE;
+  return OK;
+}
+
+}  // namespace net
--- /dev/null
+++ b/net/socket/socks5_warm_pool.h
@@ -0,0 +1,165 @@
+// Copyright 2026 The Stealth Chromium Authors
+// Use of this source code is governed by a GPL-3.0 license that can be
+// found in the LICENSE file of the source tree (Stealth Chromium).
+
+// Stealth Chromium (spec: patches/38-socks5-udp-associate-warm-pool.md):
+// SOCKS5 warm connection pool. Keeps a small set of TCP sockets to the
+// SOCKS5 proxy that have already completed the RFC 1928 method
+// negotiation (and RFC 1929 username/password auth when the proxy is
+// credentialed) so consumers — the QUIC UDP-ASSOCIATE datagram socket and
+// the TCP tunnel path in SOCKSConnectJob — can skip per-request proxy
+// authentication. Class/method names follow the vendor binary's symbol
+// table (Socks5WarmPool::{Initialize, StartOneConnect, TakeWarmSocket,
+// PurgeStale, PromoteToWarm, OnTcpConnectComplete, OnGreet*Complete,
+// OnAuth*Complete}).
+
+#ifndef NET_SOCKET_SOCKS5_WARM_POOL_H_
+#define NET_SOCKET_SOCKS5_WARM_POOL_H_
+
+#include <stdint.h>
+
+#include <map>
+#include <memory>
+#include <optional>
+#include <vector>
+
+#include "base/memory/raw_ptr.h"
+#include "base/memory/scoped_refptr.h"
+#include "base/no_destructor.h"
+#include "base/time/time.h"
+#include "net/base/address_list.h"
+#include "net/base/auth.h"
+#include "net/base/host_port_pair.h"
+#include "net/base/net_export.h"
+#include "net/traffic_annotation/network_traffic_annotation.h"
+
+namespace net {
+
+class ClientSocketFactory;
+class DrainableIOBuffer;
+class GrowableIOBuffer;
+class NetLog;
+class StreamSocket;
+
+// Pool of pre-connected (and pre-authenticated) SOCKS5 TCP sockets.
+//
+// The pool is keyed by the proxy configuration passed to Initialize();
+// re-initializing with a different address list drops all state. Entries
+// older than the warm TTL are dropped by PurgeStale().
+class NET_EXPORT_PRIVATE Socks5WarmPool {
+ public:
+  Socks5WarmPool(const Socks5WarmPool&) = delete;
+  Socks5WarmPool& operator=(const Socks5WarmPool&) = delete;
+
+  // Process-wide pool (one SOCKS5 proxy configuration per browser
+  // profile at a time; the vendor build also carries no per-context
+  // pool symbol).
+  static Socks5WarmPool* GetInstance();
+
+  // Configures the pool for |proxy_addresses| and starts background
+  // warm connects. Idempotent while the configuration is unchanged.
+  // Signature as recovered from the vendor symbol table.
+  void Initialize(const AddressList& proxy_addresses,
+                  std::optional<AuthCredentials> credentials,
+                  ClientSocketFactory* client_socket_factory,
+                  NetLog* net_log,
+                  const NetworkTrafficAnnotationTag& traffic_annotation);
+
+  // Removes warm entries that have been idle longer than the TTL.
+  void PurgeStale();
+
+  // Starts one background TCP connect + greeting + auth handshake, if
+  // the pool is below its target size.
+  void StartOneConnect();
+
+  // Returns a socket to the proxy whose SOCKS5 method negotiation (and
+  // username/password auth, if configured) has completed, or nullptr if
+  // none is available. Refills the pool in the background.
+  std::unique_ptr<StreamSocket> TakeWarmSocket();
+
+  // Stock Chromium has no credential source for SOCKS proxies (it does
+  // not implement RFC 1929 at all), so credentials are registered here
+  // by the embedder; every SOCKS5 consumer in this patch reads them
+  // from this single registration point.
+  static void SetProxyCredentials(std::optional<AuthCredentials> credentials);
+  static const std::optional<AuthCredentials>& GetProxyCredentials();
+
+  // Moves a socket whose greeting/auth completed from the pending map
+  // to the warm vector.
+  void PromoteToWarm(StreamSocket* socket);
+
+  // Number of sockets stored (pending + warm); for tests and netlog.
+  size_t GetSizeForTesting() const;
+
+ private:
+  friend class base::NoDestructor<Socks5WarmPool>;
+
+  struct PendingEntry {
+    PendingEntry();
+    PendingEntry(PendingEntry&&);
+    PendingEntry& operator=(PendingEntry&&);
+    ~PendingEntry();
+
+    // Owns the socket between TCP connect and warm promotion.
+    std::unique_ptr<StreamSocket> socket;
+    scoped_refptr<DrainableIOBuffer> write_buf;
+    scoped_refptr<GrowableIOBuffer> read_buf;
+    // Method the proxy selected in its greeting reply (0x00 none,
+    // 0x02 username/password).
+    uint8_t selected_method = 0x00;
+    // Index of the address in |proxy_addresses| being attempted.
+    size_t address_index = 0;
+  };
+
+  struct WarmEntry {
+    WarmEntry(std::unique_ptr<StreamSocket> socket, base::TimeTicks created);
+    WarmEntry(WarmEntry&&);
+    WarmEntry& operator=(WarmEntry&&);
+    ~WarmEntry();
+
+    std::unique_ptr<StreamSocket> socket;
+    base::TimeTicks created;
+  };
+
+  Socks5WarmPool();
+  ~Socks5WarmPool();
+
+  PendingEntry* FindPending(StreamSocket* socket);
+
+  // Handshake continuation callbacks; all take the socket the event
+  // belongs to (symbol-observed signatures).
+  void OnTcpConnectComplete(StreamSocket* socket, int result);
+  void OnGreetWriteComplete(StreamSocket* socket, int result);
+  void OnGreetReadComplete(StreamSocket* socket, int result);
+  void OnAuthWriteComplete(StreamSocket* socket, int result);
+  void OnAuthReadComplete(StreamSocket* socket, int result);
+
+  void DestroyPending(StreamSocket* socket);
+
+  AddressList proxy_addresses_;
+  std::optional<AuthCredentials> credentials_;
+  raw_ptr<ClientSocketFactory> client_socket_factory_ = nullptr;
+  raw_ptr<NetLog> net_log_ = nullptr;
+  // Overwritten by Initialize() before any socket is created.
+  NetworkTrafficAnnotationTag traffic_annotation_ = MISSING_TRAFFIC_ANNOTATION;
+
+  // Symbol-observed container shapes.
+  std::map<StreamSocket*, PendingEntry> pending_;
+  std::vector<WarmEntry> warm_;
+};
+
+// Returns a StreamSocket that finishes the SOCKS5 CONNECT handshake
+// (request/reply only — the method negotiation and, when configured,
+// RFC 1929 auth have already run) over |warm_socket|, tunneling to
+// |destination|. Used by SOCKSConnectJob for sockets taken from
+// Socks5WarmPool; the vendor's exact consumption path is not
+// recoverable from the binary, so it lives here rather than in a
+// modified SOCKS5ClientSocket.
+std::unique_ptr<StreamSocket> CreateSocks5WarmTunnelSocket(
+    std::unique_ptr<StreamSocket> warm_socket,
+    const HostPortPair& destination,
+    const NetworkTrafficAnnotationTag& traffic_annotation);
+
+}  // namespace net
+
+#endif  // NET_SOCKET_SOCKS5_WARM_POOL_H_
--- /dev/null
+++ b/net/socket/socks5_warm_pool.cc
@@ -0,0 +1,674 @@
+// Copyright 2026 The Stealth Chromium Authors
+// Use of this source code is governed by a GPL-3.0 license that can be
+// found in the LICENSE file of the source tree (Stealth Chromium).
+
+// Stealth Chromium (spec: patches/38-socks5-udp-associate-warm-pool.md):
+// SOCKS5 warm pool implementation. Each warm entry runs its own
+// connect/greet(/auth) state machine on a raw TCP socket created by the
+// ClientSocketFactory; completed entries wait in |warm_| until
+// TakeWarmSocket() hands them out. Timing constants are reconstructed
+// (the vendor's exact refill policy was not recoverable) and documented
+// in the spec's "Repro notes".
+
+#include "net/socket/socks5_warm_pool.h"
+
+#include <stdint.h>
+
+#include <array>
+#include <utility>
+
+#include "base/functional/bind.h"
+#include "base/memory/ref_counted.h"
+#include "base/notreached.h"
+#include "base/numerics/byte_conversions.h"
+#include "base/strings/utf_string_conversions.h"
+#include "net/base/io_buffer.h"
+#include "net/base/ip_endpoint.h"
+#include "net/base/net_errors.h"
+#include "net/base/sys_addrinfo.h"
+#include "net/log/net_log_with_source.h"
+#include "net/socket/client_socket_factory.h"
+#include "net/socket/stream_socket.h"
+
+namespace net {
+
+namespace {
+
+// SOCKS5 protocol constants (RFC 1928 / RFC 1929).
+constexpr uint8_t kSOCKS5Version = 0x05;
+constexpr uint8_t kNoAuthMethod = 0x00;
+constexpr uint8_t kUsernamePasswordMethod = 0x02;
+constexpr uint8_t kUsernamePasswordVersion = 0x01;
+
+constexpr unsigned int kGreetReplySize = 2;
+constexpr unsigned int kAuthReplySize = 2;
+
+// Target number of warm sockets kept in |warm_|.
+constexpr size_t kTargetWarmSockets = 2;
+// Concurrent in-flight connect+greet+auth attempts.
+constexpr size_t kMaxPendingSockets = 1;
+// Warm entries older than this are dropped by PurgeStale().
+constexpr base::TimeDelta kWarmTtl = base::Seconds(30);
+
+}  // namespace
+
+Socks5WarmPool::PendingEntry::PendingEntry() = default;
+Socks5WarmPool::PendingEntry::PendingEntry(PendingEntry&&) = default;
+Socks5WarmPool::PendingEntry& Socks5WarmPool::PendingEntry::operator=(
+    PendingEntry&&) = default;
+Socks5WarmPool::PendingEntry::~PendingEntry() = default;
+
+Socks5WarmPool::WarmEntry::WarmEntry(std::unique_ptr<StreamSocket> socket,
+                                     base::TimeTicks created)
+    : socket(std::move(socket)), created(created) {}
+Socks5WarmPool::WarmEntry::WarmEntry(WarmEntry&&) = default;
+Socks5WarmPool::WarmEntry& Socks5WarmPool::WarmEntry::operator=(
+    WarmEntry&&) = default;
+Socks5WarmPool::WarmEntry::~WarmEntry() = default;
+
+Socks5WarmPool::Socks5WarmPool() = default;
+Socks5WarmPool::~Socks5WarmPool() = default;
+
+// static
+Socks5WarmPool* Socks5WarmPool::GetInstance() {
+  static base::NoDestructor<Socks5WarmPool> instance;
+  return instance.get();
+}
+
+// static
+void Socks5WarmPool::SetProxyCredentials(
+    std::optional<AuthCredentials> credentials) {
+  Socks5WarmPool* pool = GetInstance();
+  // Existing warm sockets authenticated with the old credentials; drop
+  // them so nothing stale is handed out.
+  if (pool->credentials_.has_value() != credentials.has_value()) {
+    pool->pending_.clear();
+    pool->warm_.clear();
+  }
+  pool->credentials_ = std::move(credentials);
+}
+
+// static
+const std::optional<AuthCredentials>& Socks5WarmPool::GetProxyCredentials() {
+  return GetInstance()->credentials_;
+}
+
+size_t Socks5WarmPool::GetSizeForTesting() const {
+  return pending_.size() + warm_.size();
+}
+
+void Socks5WarmPool::Initialize(
+    const AddressList& proxy_addresses,
+    std::optional<AuthCredentials> credentials,
+    ClientSocketFactory* client_socket_factory,
+    NetLog* net_log,
+    const NetworkTrafficAnnotationTag& traffic_annotation) {
+  if (proxy_addresses.empty()) {
+    return;
+  }
+  const bool unchanged =
+      client_socket_factory_ == client_socket_factory &&
+      proxy_addresses_.size() == proxy_addresses.size() &&
+      !proxy_addresses_.empty() &&
+      proxy_addresses_.front() == proxy_addresses.front() &&
+      credentials_.has_value() == credentials.has_value();
+  if (unchanged) {
+    // Already primed for this configuration; just top up.
+    PurgeStale();
+    StartOneConnect();
+    return;
+  }
+
+  pending_.clear();
+  warm_.clear();
+  proxy_addresses_ = proxy_addresses;
+  credentials_ = std::move(credentials);
+  client_socket_factory_ = client_socket_factory;
+  net_log_ = net_log;
+  traffic_annotation_ = traffic_annotation;
+
+  StartOneConnect();
+}
+
+void Socks5WarmPool::StartOneConnect() {
+  if (!client_socket_factory_ || proxy_addresses_.empty()) {
+    return;
+  }
+  if (warm_.size() + pending_.size() >=
+      kTargetWarmSockets + kMaxPendingSockets) {
+    return;
+  }
+
+  auto entry = std::make_unique<PendingEntry>();
+  // Warm connects start from the first address (the pool is an
+  // optimization; the primary connect path keeps its own happy-eyeballs
+  // behavior).
+  entry->address_index = 0;
+  AddressList address_list(proxy_addresses_.front());
+  auto transport = client_socket_factory_->CreateTransportClientSocket(
+      address_list, /*socket_performance_watcher=*/nullptr,
+      /*network_quality_estimator=*/nullptr, net_log_, NetLogSource());
+  StreamSocket* socket = transport.get();
+  entry->socket = std::move(transport);
+  pending_.emplace(socket, std::move(*entry.release()));
+
+  int rv = socket->Connect(base::BindOnce(
+      &Socks5WarmPool::OnTcpConnectComplete, base::Unretained(this), socket));
+  if (rv != ERR_IO_PENDING) {
+    OnTcpConnectComplete(socket, rv);
+  }
+}
+
+std::unique_ptr<StreamSocket> Socks5WarmPool::TakeWarmSocket() {
+  PurgeStale();
+  StartOneConnect();
+  if (warm_.empty()) {
+    return nullptr;
+  }
+  std::unique_ptr<StreamSocket> socket = std::move(warm_.front().socket);
+  warm_.erase(warm_.begin());
+  StartOneConnect();
+  return socket;
+}
+
+void Socks5WarmPool::PurgeStale() {
+  const base::TimeTicks now = base::TimeTicks::Now();
+  std::erase_if(warm_, [&](const WarmEntry& entry) {
+    return now - entry.created > kWarmTtl;
+  });
+}
+
+void Socks5WarmPool::PromoteToWarm(StreamSocket* socket) {
+  auto it = pending_.find(socket);
+  if (it == pending_.end()) {
+    return;
+  }
+  PendingEntry entry = std::move(it->second);
+  pending_.erase(it);
+  warm_.emplace_back(std::move(entry.socket), base::TimeTicks::Now());
+}
+
+Socks5WarmPool::PendingEntry* Socks5WarmPool::FindPending(
+    StreamSocket* socket) {
+  auto it = pending_.find(socket);
+  return it == pending_.end() ? nullptr : &it->second;
+}
+
+void Socks5WarmPool::DestroyPending(StreamSocket* socket) {
+  pending_.erase(socket);
+}
+
+void Socks5WarmPool::OnTcpConnectComplete(StreamSocket* socket, int result) {
+  PendingEntry* entry = FindPending(socket);
+  if (!entry) {
+    return;
+  }
+  if (result != OK) {
+    DestroyPending(socket);
+    return;
+  }
+
+  // Build the greeting: offered methods are "no auth" plus
+  // username/password when credentials are configured.
+  std::vector<uint8_t> greet{kSOCKS5Version, 0x01, kNoAuthMethod};
+  if (credentials_) {
+    greet[1] = 0x02;
+    greet.push_back(kUsernamePasswordMethod);
+  }
+  auto base_buffer = base::MakeRefCounted<VectorIOBuffer>(std::move(greet));
+  entry->write_buf = base::MakeRefCounted<DrainableIOBuffer>(
+      std::move(base_buffer), base_buffer->size());
+
+  int rv = socket->Write(
+      entry->write_buf.get(), entry->write_buf->BytesRemaining(),
+      base::BindOnce(&Socks5WarmPool::OnGreetWriteComplete,
+                     base::Unretained(this), socket),
+      traffic_annotation_);
+  if (rv != ERR_IO_PENDING) {
+    OnGreetWriteComplete(socket, rv);
+  }
+}
+
+void Socks5WarmPool::OnGreetWriteComplete(StreamSocket* socket, int result) {
+  PendingEntry* entry = FindPending(socket);
+  if (!entry) {
+    return;
+  }
+  if (result < 0) {
+    DestroyPending(socket);
+    return;
+  }
+  entry->write_buf->DidConsume(result);
+  if (entry->write_buf->BytesRemaining() > 0) {
+    int rv = socket->Write(
+        entry->write_buf.get(), entry->write_buf->BytesRemaining(),
+        base::BindOnce(&Socks5WarmPool::OnGreetWriteComplete,
+                       base::Unretained(this), socket),
+        traffic_annotation_);
+    if (rv == ERR_IO_PENDING) {
+      return;
+    }
+    OnGreetWriteComplete(socket, rv);
+    return;
+  }
+  entry->write_buf.reset();
+  entry->read_buf = base::MakeRefCounted<GrowableIOBuffer>();
+  entry->read_buf->SetCapacity(kGreetReplySize);
+  int rv = socket->Read(
+      entry->read_buf.get(), entry->read_buf->RemainingCapacity(),
+      base::BindOnce(&Socks5WarmPool::OnGreetReadComplete,
+                     base::Unretained(this), socket));
+  if (rv != ERR_IO_PENDING) {
+    OnGreetReadComplete(socket, rv);
+  }
+}
+
+void Socks5WarmPool::OnGreetReadComplete(StreamSocket* socket, int result) {
+  PendingEntry* entry = FindPending(socket);
+  if (!entry) {
+    return;
+  }
+  if (result < 0) {
+    DestroyPending(socket);
+    return;
+  }
+  if (result == 0) {
+    // Unexpected close during greeting.
+    DestroyPending(socket);
+    return;
+  }
+  entry->read_buf->set_offset(entry->read_buf->offset() + result);
+  if (entry->read_buf->RemainingCapacity() > 0) {
+    int rv = socket->Read(
+        entry->read_buf.get(), entry->read_buf->RemainingCapacity(),
+        base::BindOnce(&Socks5WarmPool::OnGreetReadComplete,
+                       base::Unretained(this), socket));
+    if (rv == ERR_IO_PENDING) {
+      return;
+    }
+    OnGreetReadComplete(socket, rv);
+    return;
+  }
+
+  base::span<uint8_t> data = entry->read_buf->span_before_offset();
+  if (data[0] != kSOCKS5Version) {
+    DestroyPending(socket);
+    return;
+  }
+  const uint8_t method = data[1];
+  if (method == kUsernamePasswordMethod && credentials_) {
+    // RFC 1929 username/password subnegotiation.
+    entry->selected_method = method;
+    const std::string username = base::UTF16ToUTF8(credentials_->username());
+    const std::string password = base::UTF16ToUTF8(credentials_->password());
+    if (username.size() > 0xFF || password.size() > 0xFF) {
+      DestroyPending(socket);
+      return;
+    }
+    std::vector<uint8_t> auth;
+    auth.reserve(3 + username.size() + password.size());
+    auth.push_back(kUsernamePasswordVersion);
+    auth.push_back(static_cast<uint8_t>(username.size()));
+    auth.insert(auth.end(), username.begin(), username.end());
+    auth.push_back(static_cast<uint8_t>(password.size()));
+    auth.insert(auth.end(), password.begin(), password.end());
+    auto base_buffer = base::MakeRefCounted<VectorIOBuffer>(std::move(auth));
+    entry->write_buf = base::MakeRefCounted<DrainableIOBuffer>(
+        std::move(base_buffer), base_buffer->size());
+    int rv = socket->Write(
+        entry->write_buf.get(), entry->write_buf->BytesRemaining(),
+        base::BindOnce(&Socks5WarmPool::OnAuthWriteComplete,
+                       base::Unretained(this), socket),
+        traffic_annotation_);
+    if (rv != ERR_IO_PENDING) {
+      OnAuthWriteComplete(socket, rv);
+    }
+    return;
+  }
+  if (method != kNoAuthMethod) {
+    // No acceptable methods.
+    DestroyPending(socket);
+    return;
+  }
+
+  entry->selected_method = kNoAuthMethod;
+  entry->read_buf.reset();
+  PromoteToWarm(socket);
+}
+
+void Socks5WarmPool::OnAuthWriteComplete(StreamSocket* socket, int result) {
+  PendingEntry* entry = FindPending(socket);
+  if (!entry) {
+    return;
+  }
+  if (result < 0) {
+    DestroyPending(socket);
+    return;
+  }
+  entry->write_buf->DidConsume(result);
+  if (entry->write_buf->BytesRemaining() > 0) {
+    int rv = socket->Write(
+        entry->write_buf.get(), entry->write_buf->BytesRemaining(),
+        base::BindOnce(&Socks5WarmPool::OnAuthWriteComplete,
+                       base::Unretained(this), socket),
+        traffic_annotation_);
+    if (rv == ERR_IO_PENDING) {
+      return;
+    }
+    OnAuthWriteComplete(socket, rv);
+    return;
+  }
+  entry->write_buf.reset();
+  entry->read_buf = base::MakeRefCounted<GrowableIOBuffer>();
+  entry->read_buf->SetCapacity(kAuthReplySize);
+  int rv = socket->Read(
+      entry->read_buf.get(), entry->read_buf->RemainingCapacity(),
+      base::BindOnce(&Socks5WarmPool::OnAuthReadComplete,
+                     base::Unretained(this), socket));
+  if (rv != ERR_IO_PENDING) {
+    OnAuthReadComplete(socket, rv);
+  }
+}
+
+void Socks5WarmPool::OnAuthReadComplete(StreamSocket* socket, int result) {
+  PendingEntry* entry = FindPending(socket);
+  if (!entry) {
+    return;
+  }
+  if (result <= 0) {
+    DestroyPending(socket);
+    return;
+  }
+  entry->read_buf->set_offset(entry->read_buf->offset() + result);
+  if (entry->read_buf->RemainingCapacity() > 0) {
+    int rv = socket->Read(
+        entry->read_buf.get(), entry->read_buf->RemainingCapacity(),
+        base::BindOnce(&Socks5WarmPool::OnAuthReadComplete,
+                       base::Unretained(this), socket));
+    if (rv == ERR_IO_PENDING) {
+      return;
+    }
+    OnAuthReadComplete(socket, rv);
+    return;
+  }
+
+  base::span<uint8_t> data = entry->read_buf->span_before_offset();
+  // Version must be 1; a non-zero status means authentication failed.
+  if (data[0] != kUsernamePasswordVersion || data[1] != 0x00) {
+    DestroyPending(socket);
+    return;
+  }
+  entry->read_buf.reset();
+  PromoteToWarm(socket);
+}
+
+// Socks5WarmTunnelClientSocket finishes a SOCKS5 CONNECT over a socket
+// that has already completed method negotiation (and auth). It mirrors
+// SOCKS5ClientSocket's request/response handling without re-sending the
+// greeting.
+class Socks5WarmTunnelClientSocket : public StreamSocket {
+ public:
+  Socks5WarmTunnelClientSocket(
+      std::unique_ptr<StreamSocket> transport_socket,
+      const HostPortPair& destination,
+      const NetworkTrafficAnnotationTag& traffic_annotation)
+      : io_callback_(base::BindRepeating(&Socks5WarmTunnelClientSocket::
+                                             OnIOComplete,
+                                         base::Unretained(this))),
+        transport_socket_(std::move(transport_socket)),
+        destination_(destination),
+        net_log_(transport_socket_->NetLog()),
+        traffic_annotation_(traffic_annotation) {}
+
+  Socks5WarmTunnelClientSocket(const Socks5WarmTunnelClientSocket&) = delete;
+  Socks5WarmTunnelClientSocket& operator=(const Socks5WarmTunnelClientSocket&) =
+      delete;
+
+  ~Socks5WarmTunnelClientSocket() override { Disconnect(); }
+
+  // StreamSocket implementation.
+  int Connect(CompletionOnceCallback callback) override {
+    DCHECK_EQ(STATE_NONE, next_state_);
+    if (completed_handshake_) {
+      return OK;
+    }
+    next_state_ = STATE_REQUEST_WRITE;
+    int rv = DoLoop(OK);
+    if (rv == ERR_IO_PENDING) {
+      user_callback_ = std::move(callback);
+    }
+    return rv;
+  }
+
+  void Disconnect() override {
+    completed_handshake_ = false;
+    transport_socket_->Disconnect();
+    next_state_ = STATE_NONE;
+    user_callback_.Reset();
+  }
+
+  bool IsConnected() const override {
+    return completed_handshake_ && transport_socket_->IsConnected();
+  }
+
+  bool IsConnectedAndIdle() const override {
+    return completed_handshake_ && transport_socket_->IsConnectedAndIdle();
+  }
+
+  const NetLogWithSource& NetLog() const override { return net_log_; }
+
+  bool WasEverUsed() const override {
+    return transport_socket_->WasEverUsed();
+  }
+
+  NextProto GetNegotiatedProtocol() const override {
+    return transport_socket_->GetNegotiatedProtocol();
+  }
+
+  bool GetSSLInfo(SSLInfo* ssl_info) override {
+    return transport_socket_->GetSSLInfo(ssl_info);
+  }
+
+  int64_t GetTotalReceivedBytes() const override {
+    return transport_socket_->GetTotalReceivedBytes();
+  }
+
+  void ApplySocketTag(const SocketTag& tag) override {
+    transport_socket_->ApplySocketTag(tag);
+  }
+
+  int Read(IOBuffer* buf,
+           int buf_len,
+           CompletionOnceCallback callback) override {
+    DCHECK(completed_handshake_);
+    return transport_socket_->Read(buf, buf_len, std::move(callback));
+  }
+
+  int Write(IOBuffer* buf,
+            int buf_len,
+            CompletionOnceCallback callback,
+            const NetworkTrafficAnnotationTag& traffic_annotation) override {
+    DCHECK(completed_handshake_);
+    return transport_socket_->Write(buf, buf_len, std::move(callback),
+                                    traffic_annotation);
+  }
+
+  int SetReceiveBufferSize(int32_t size) override {
+    return transport_socket_->SetReceiveBufferSize(size);
+  }
+
+  int SetSendBufferSize(int32_t size) override {
+    return transport_socket_->SetSendBufferSize(size);
+  }
+
+  int GetPeerAddress(IPEndPoint* address) const override {
+    return transport_socket_->GetPeerAddress(address);
+  }
+
+  int GetLocalAddress(IPEndPoint* address) const override {
+    return transport_socket_->GetLocalAddress(address);
+  }
+
+ private:
+  enum State {
+    STATE_NONE,
+    STATE_REQUEST_WRITE,
+    STATE_REQUEST_WRITE_COMPLETE,
+    STATE_REQUEST_READ,
+    STATE_REQUEST_READ_COMPLETE,
+  };
+
+  void OnIOComplete(int result) {
+    int rv = DoLoop(result);
+    if (rv != ERR_IO_PENDING && !user_callback_.is_null()) {
+      std::move(user_callback_).Run(rv);
+    }
+  }
+
+  int DoLoop(int last_io_result) {
+    int rv = last_io_result;
+    do {
+      State state = next_state_;
+      next_state_ = STATE_NONE;
+      switch (state) {
+        case STATE_REQUEST_WRITE:
+          DCHECK_EQ(OK, rv);
+          rv = DoRequestWrite();
+          break;
+        case STATE_REQUEST_WRITE_COMPLETE:
+          rv = DoRequestWriteComplete(rv);
+          break;
+        case STATE_REQUEST_READ:
+          DCHECK_EQ(OK, rv);
+          rv = DoRequestRead();
+          break;
+        case STATE_REQUEST_READ_COMPLETE:
+          rv = DoRequestReadComplete(rv);
+          break;
+        default:
+          NOTREACHED() << "bad state";
+      }
+    } while (rv != ERR_IO_PENDING && next_state_ != STATE_NONE);
+    return rv;
+  }
+
+  int DoRequestWrite() {
+    if (0xFF < destination_.host().size()) {
+      return ERR_SOCKS_CONNECTION_FAILED;
+    }
+    next_state_ = STATE_REQUEST_WRITE_COMPLETE;
+    if (!write_buf_) {
+      std::vector<uint8_t> request;
+      request.reserve(7 + destination_.host().size());
+      request.push_back(0x05);
+      request.push_back(0x01);  // CONNECT command.
+      request.push_back(0x00);  // Reserved.
+      request.push_back(0x03);  // Domain name addressing.
+      const auto& host = destination_.host();
+      request.push_back(static_cast<uint8_t>(host.size()));
+      request.insert(request.end(), host.begin(), host.end());
+      auto nw_port = base::U16ToBigEndian(destination_.port());
+      request.insert(request.end(), nw_port.begin(), nw_port.end());
+      auto base_buffer =
+          base::MakeRefCounted<VectorIOBuffer>(std::move(request));
+      write_buf_ = base::MakeRefCounted<DrainableIOBuffer>(
+          std::move(base_buffer), base_buffer->size());
+    }
+    return transport_socket_->Write(write_buf_.get(),
+                                    write_buf_->BytesRemaining(), io_callback_,
+                                    traffic_annotation_);
+  }
+
+  int DoRequestWriteComplete(int result) {
+    if (result < 0) {
+      return result;
+    }
+    write_buf_->DidConsume(result);
+    if (write_buf_->BytesRemaining() == 0) {
+      write_buf_.reset();
+      next_state_ = STATE_REQUEST_READ;
+    } else {
+      next_state_ = STATE_REQUEST_WRITE;
+    }
+    return OK;
+  }
+
+  int DoRequestRead() {
+    next_state_ = STATE_REQUEST_READ_COMPLETE;
+    if (!read_buf_) {
+      read_buf_ = base::MakeRefCounted<GrowableIOBuffer>();
+      read_buf_->SetCapacity(kReadHeaderSize);
+    }
+    return transport_socket_->Read(read_buf_.get(),
+                                   read_buf_->RemainingCapacity(),
+                                   io_callback_);
+  }
+
+  int DoRequestReadComplete(int result) {
+    if (result < 0) {
+      return result;
+    }
+    if (result == 0) {
+      return ERR_SOCKS_CONNECTION_FAILED;
+    }
+    read_buf_->set_offset(read_buf_->offset() + result);
+
+    if (read_buf_->offset() == kReadHeaderSize) {
+      base::span<uint8_t> data = read_buf_->span_before_offset();
+      if (data[0] != 0x05 || data[2] != 0x00) {
+        return ERR_SOCKS_CONNECTION_FAILED;
+      }
+      if (data[1] != 0x00) {
+        return ERR_SOCKS_CONNECTION_FAILED;
+      }
+      const uint8_t address_type = data[3];
+      int additional_bytes_expected;
+      if (address_type == 0x03) {
+        additional_bytes_expected = data[4];
+      } else if (address_type == 0x01) {
+        additional_bytes_expected = sizeof(struct in_addr) - 1;
+      } else if (address_type == 0x04) {
+        additional_bytes_expected = sizeof(struct in6_addr) - 1;
+      } else {
+        return ERR_SOCKS_CONNECTION_FAILED;
+      }
+      additional_bytes_expected += 2;  // Port.
+      read_buf_->SetCapacity(kReadHeaderSize + additional_bytes_expected);
+      next_state_ = STATE_REQUEST_READ;
+      return OK;
+    }
+
+    if (read_buf_->RemainingCapacity() == 0) {
+      completed_handshake_ = true;
+      read_buf_.reset();
+      next_state_ = STATE_NONE;
+      return OK;
+    }
+
+    next_state_ = STATE_REQUEST_READ;
+    return OK;
+  }
+
+  static constexpr unsigned int kReadHeaderSize = 5;
+
+  CompletionRepeatingCallback io_callback_;
+  std::unique_ptr<StreamSocket> transport_socket_;
+  State next_state_ = STATE_NONE;
+  CompletionOnceCallback user_callback_;
+  scoped_refptr<DrainableIOBuffer> write_buf_;
+  scoped_refptr<GrowableIOBuffer> read_buf_;
+  bool completed_handshake_ = false;
+  const HostPortPair destination_;
+  NetLogWithSource net_log_;
+  NetworkTrafficAnnotationTag traffic_annotation_;
+};
+
+std::unique_ptr<StreamSocket> CreateSocks5WarmTunnelSocket(
+    std::unique_ptr<StreamSocket> warm_socket,
+    const HostPortPair& destination,
+    const NetworkTrafficAnnotationTag& traffic_annotation) {
+  return std::make_unique<Socks5WarmTunnelClientSocket>(
+      std::move(warm_socket), destination, traffic_annotation);
+}
+
+}  // namespace net
--- a/net/quic/quic_session_pool.h
+++ b/net/quic/quic_session_pool.h
@@ -462,7 +462,11 @@
 
   // Creates a datagram socket. |source| is the NetLogSource for the entity
   // trying to create the socket, if it has one.
+  // Stealth Chromium (spec patches/38-socks5-udp-associate-warm-pool.md):
+  // takes the session key so a single-hop SOCKS5 proxy chain can be
+  // routed onto a SOCKS5 UDP-ASSOCIATE datagram socket.
   std::unique_ptr<DatagramClientSocket> CreateSocket(
+      const QuicSessionKey& session_key,
       NetLog* net_log,
       const NetLogSource& source);
 
--- a/net/quic/quic_session_pool.cc
+++ b/net/quic/quic_session_pool.cc
@@ -74,6 +74,7 @@
 #include "net/socket/next_proto.h"
 #include "net/socket/socket_performance_watcher.h"
 #include "net/socket/socket_performance_watcher_factory.h"
+#include "net/socket/socks5_datagram_client_socket.h"
 #include "net/socket/udp_client_socket.h"
 #include "net/spdy/multiplexed_session_creation_initiator.h"
 #include "net/third_party/quiche/src/quiche/quic/core/crypto/crypto_protocol.h"
@@ -870,8 +871,17 @@
   std::unique_ptr<Job> job;
   // Connect start time, but only for direct connections to a proxy.
   std::optional<base::TimeTicks> proxy_connect_start_time = std::nullopt;
-  if (session_key.proxy_chain().is_direct()) {
-    if (session_key.session_usage() == SessionUsage::kProxy) {
+  // Stealth Chromium (spec patches/38-socks5-udp-associate-warm-pool.md): a
+  // single-hop SOCKS5 chain runs the direct flow — the destination is
+  // resolved here and CreateSocket() hands the attempt a SOCKS5
+  // UDP-ASSOCIATE socket that relays through the proxy. ProxyJob (QUIC
+  // to a MASQUE proxy) is not applicable to SOCKS5.
+  const bool quic_over_socks5 =
+      session_key.proxy_chain().is_single_proxy() &&
+      session_key.proxy_chain().First().scheme() == ProxyServer::SCHEME_SOCKS5;
+  if (session_key.proxy_chain().is_direct() || quic_over_socks5) {
+    if (session_key.proxy_chain().is_direct() &&
+        session_key.session_usage() == SessionUsage::kProxy) {
       proxy_connect_start_time = base::TimeTicks::Now();
     }
     job = std::make_unique<DirectJob>(
@@ -1298,8 +1308,26 @@
 }
 
 std::unique_ptr<DatagramClientSocket> QuicSessionPool::CreateSocket(
+    const QuicSessionKey& session_key,
     NetLog* net_log,
     const NetLogSource& source) {
+  // Stealth Chromium (spec patches/38-socks5-udp-associate-warm-pool.md):
+  // QUIC/HTTP-3 over a single-hop SOCKS5 proxy rides on a SOCKS5
+  // UDP-ASSOCIATE datagram socket (TCP control channel for
+  // greet/auth/associate, SOCKS5-UDP-framed datagrams to the relay)
+  // instead of a raw UDP socket. Stock Chromium cannot carry UDP
+  // through SOCKS5 and disables QUIC on SOCKS proxies entirely.
+  if (session_key.proxy_chain().is_single_proxy() &&
+      session_key.proxy_chain().First().scheme() ==
+          ProxyServer::SCHEME_SOCKS5) {
+    auto socket = std::make_unique<SOCKS5DatagramClientSocket>(
+        DatagramSocket::DEFAULT_BIND, session_key.proxy_chain().First(),
+        client_socket_factory_, host_resolver_, net_log, source);
+    if (params_.enable_socket_recv_optimization) {
+      socket->EnableRecvOptimization();
+    }
+    return socket;
+  }
   auto socket = client_socket_factory_->CreateDatagramClientSocket(
       DatagramSocket::DEFAULT_BIND, net_log, source);
   if (params_.enable_socket_recv_optimization) {
@@ -1752,7 +1780,8 @@
   // TODO(crbug.com/40256842): This logic only knows how to try one IP
   // endpoint.
   std::unique_ptr<DatagramClientSocket> socket(
-      CreateSocket(net_log.net_log(), net_log.source()));
+      // Stealth Chromium: see CreateSocket (SOCKS5 UDP-ASSOCIATE routing).
+      CreateSocket(key.session_key(), net_log.net_log(), net_log.source()));
 
   // If migrate_sessions_on_network_change_v2 is on, passing in
   // handles::kInvalidNetworkHandle will bind the socket to the default network.
@@ -1794,7 +1823,8 @@
   // TODO(crbug.com/40256842): This logic only knows how to try one IP
   // endpoint.
   std::unique_ptr<DatagramClientSocket> socket(
-      CreateSocket(net_log.net_log(), net_log.source()));
+      // Stealth Chromium: see CreateSocket (SOCKS5 UDP-ASSOCIATE routing).
+      CreateSocket(key.session_key(), net_log.net_log(), net_log.source()));
   DatagramClientSocket* socket_ptr = socket.get();
   CompletionOnceCallback connect_and_configure_callback = base::BindOnce(
       &QuicSessionPool::FinishCreateSession, weak_factory_.GetWeakPtr(),
--- a/net/quic/quic_session_attempt.cc
+++ b/net/quic/quic_session_attempt.cc
@@ -195,7 +195,17 @@
         std::move(local_endpoint_), std::move(ip_endpoint_),
         std::move(proxy_stream_), std::move(user_agent), net_log(), network_);
   } else {
-    if (base::FeatureList::IsEnabled(net::features::kAsyncQuicSession)) {
+    // Stealth Chromium (spec patches/38-socks5-udp-associate-warm-pool.md):
+    // SOCKS5 UDP-ASSOCIATE sockets connect asynchronously by nature
+    // (TCP control handshake to the proxy before the relay UDP socket
+    // exists), so always create those sessions through the async path;
+    // the sync path cannot wait for the associate flow.
+    const bool quic_over_socks5 =
+        key().session_key().proxy_chain().is_single_proxy() &&
+        key().session_key().proxy_chain().First().scheme() ==
+            ProxyServer::SCHEME_SOCKS5;
+    if (base::FeatureList::IsEnabled(net::features::kAsyncQuicSession) ||
+        quic_over_socks5) {
       return pool()->CreateSessionAsync(
           base::BindOnce(&QuicSessionAttempt::OnCreateSessionComplete,
                          weak_ptr_factory_.GetWeakPtr()),
--- a/net/http/http_stream_factory_job.cc
+++ b/net/http/http_stream_factory_job.cc
@@ -709,8 +709,13 @@
 int HttpStreamFactory::Job::DoInitConnectionImpl() {
   DCHECK(!connection_->is_initialized());
 
+  // Stealth Chromium (spec patches/38-socks5-udp-associate-warm-pool.md): QUIC
+  // is allowed over a single-hop SOCKS5 proxy via UDP ASSOCIATE.
+  const bool quic_over_socks5 =
+      proxy_info_.proxy_chain().is_single_proxy() &&
+      proxy_info_.proxy_chain().First().scheme() == ProxyServer::SCHEME_SOCKS5;
   if (using_quic_ && !proxy_info_.is_direct() &&
-      !proxy_info_.proxy_chain().Last().is_quic()) {
+      !proxy_info_.proxy_chain().Last().is_quic() && !quic_over_socks5) {
     // QUIC can not be spoken to non-QUIC proxies.  This error should not be
     // user visible, because the non-alternative Job should be resumed.
     return ERR_NO_SUPPORTED_PROXIES;
@@ -841,7 +846,14 @@
     // mechanisms would be worse than simply using H/1 or H/2 to reach the
     // destination. The error for an invalid condition should not be user
     // visible, because the non-alternative Job should be resumed.
-    if (proxy_chain.AnyProxy(
+    // Stealth Chromium (spec patches/38-socks5-udp-associate-warm-pool.md):
+    // single-hop SOCKS5 chains are exempt — QUIC rides over SOCKS5
+    // UDP ASSOCIATE (see QuicSessionPool::CreateSocket).
+    const bool quic_over_socks5 =
+        proxy_chain.is_single_proxy() &&
+        proxy_chain.First().scheme() == ProxyServer::SCHEME_SOCKS5;
+    if (!quic_over_socks5 &&
+        proxy_chain.AnyProxy(
             [](const ProxyServer& s) { return !s.is_quic(); })) {
       return ERR_NO_SUPPORTED_PROXIES;
     }
--- a/net/socket/socks_connect_job.h
+++ b/net/socket/socks_connect_job.h
@@ -145,6 +145,12 @@
   std::unique_ptr<StreamSocket> socket_;
   raw_ptr<SOCKSClientSocket> socks_socket_ptr_;
 
+  // Stealth Chromium (spec patches/38-socks5-udp-associate-warm-pool.md):
+  // SOCKS5 TCP socket taken from Socks5WarmPool (method negotiation and,
+  // when configured, username/password auth already completed). When
+  // set, DoSOCKSConnect finishes only the CONNECT request over it.
+  std::unique_ptr<StreamSocket> warm_socket_;
+
   ResolveErrorInfo resolve_error_info_;
 };
 
--- a/net/socket/socks_connect_job.cc
+++ b/net/socket/socks_connect_job.cc
@@ -8,6 +8,8 @@
 #include <utility>
 
 #include "base/functional/bind.h"
+#include "net/base/address_list.h"
+#include "net/base/ip_endpoint.h"
 #include "net/base/net_errors.h"
 #include "net/log/net_log_source_type.h"
 #include "net/log/net_log_with_source.h"
@@ -15,7 +17,9 @@
 #include "net/socket/client_socket_handle.h"
 #include "net/socket/connect_job_params.h"
 #include "net/socket/socks5_client_socket.h"
+#include "net/socket/socks5_warm_pool.h"
 #include "net/socket/socks_client_socket.h"
+#include "net/socket/stream_socket.h"
 #include "net/socket/transport_connect_job.h"
 
 namespace net {
@@ -154,6 +158,22 @@
   DCHECK(!transport_connect_job_);
 
   next_state_ = STATE_TRANSPORT_CONNECT_COMPLETE;
+
+  // Stealth Chromium (spec patches/38-socks5-udp-associate-warm-pool.md): if
+  // the SOCKS5 warm pool has a pre-connected (greeted/authenticated)
+  // TCP socket to the proxy, skip the transport connect entirely and
+  // run only the remaining CONNECT request over it. The pool is primed
+  // by DoSOCKSConnect below, so this bootstraps after the first SOCKS5
+  // connect of a session.
+  if (socks_params_->is_socks_v5()) {
+    warm_socket_ = Socks5WarmPool::GetInstance()->TakeWarmSocket();
+    if (warm_socket_) {
+      ResetTimer(kSOCKSConnectJobTimeout);
+      next_state_ = STATE_SOCKS_CONNECT;
+      return OK;
+    }
+  }
+
   transport_connect_job_ = std::make_unique<TransportConnectJob>(
       priority(), socket_tag(), common_connect_job_params(),
       socks_params_->transport_params(), this, &net_log());
@@ -174,10 +194,38 @@
 int SOCKSConnectJob::DoSOCKSConnect() {
   next_state_ = STATE_SOCKS_CONNECT_COMPLETE;
 
+  // Stealth Chromium (spec patches/38-socks5-udp-associate-warm-pool.md): a
+  // socket taken from Socks5WarmPool already finished the SOCKS5
+  // greeting (and username/password auth when configured); finish only
+  // the CONNECT request over it.
+  if (socks_params_->is_socks_v5() && warm_socket_) {
+    socket_ = CreateSocks5WarmTunnelSocket(
+        std::move(warm_socket_), socks_params_->destination(),
+        socks_params_->traffic_annotation());
+    return socket_->Connect(
+        base::BindOnce(&SOCKSConnectJob::OnIOComplete, base::Unretained(this)));
+  }
+
   // Add a SOCKS connection on top of the tcp socket.
   if (socks_params_->is_socks_v5()) {
+    std::unique_ptr<StreamSocket> transport =
+        transport_connect_job_->PassSocket();
+
+    // Stealth Chromium (spec patches/38-socks5-udp-associate-warm-pool.md):
+    // prime the warm pool with the proxy address this job connected
+    // to, so later SOCKS5 consumers (TCP tunnels and QUIC
+    // UDP-ASSOCIATE sockets) find pre-greeted, pre-authenticated
+    // sockets instead of re-running proxy auth per request.
+    IPEndPoint proxy_peer;
+    if (transport->GetPeerAddress(&proxy_peer) == OK) {
+      Socks5WarmPool::GetInstance()->Initialize(
+          AddressList(proxy_peer), Socks5WarmPool::GetProxyCredentials(),
+          client_socket_factory(), net_log().net_log(),
+          socks_params_->traffic_annotation());
+    }
+
     socket_ = std::make_unique<SOCKS5ClientSocket>(
-        transport_connect_job_->PassSocket(), socks_params_->destination(),
+        std::move(transport), socks_params_->destination(),
         socks_params_->traffic_annotation());
   } else {
     auto socks_socket = std::make_unique<SOCKSClientSocket>(
--- a/net/log/net_log_event_type_list.h
+++ b/net/log/net_log_event_type_list.h
@@ -3247,6 +3247,21 @@
 EVENT_TYPE(SOCKS5_HANDSHAKE_READ)
 
 // ------------------------------------------------------------------------
+// SOCKS5DatagramClientSocket (Stealth Chromium)
+// ------------------------------------------------------------------------
+
+// The start/end of a SOCKS5 UDP ASSOCIATE flow that establishes the UDP
+// relay target for QUIC/HTTP-3 over a SOCKS5 proxy. The END event has a
+// "net_error" parameter on failure, produced by
+// SOCKS5DatagramClientSocket::UdpTargetNetLogParams().
+EVENT_TYPE(SOCKS5_UDP_ASSOCIATE_TARGET)
+
+// A datagram framed with the SOCKS5 UDP header (RFC 1928 section 7) was
+// sent to the associate target. The event has a "bytes" parameter with
+// the payload size.
+EVENT_TYPE(SOCKS5_UDP_SEND_TO_TARGET)
+
+// ------------------------------------------------------------------------
 // HTTP Authentication
 // ------------------------------------------------------------------------
 //
--- a/net/BUILD.gn
+++ b/net/BUILD.gn
@@ -1014,6 +1014,10 @@
     "socket/socket_tag.h",
     "socket/socks5_client_socket.cc",
     "socket/socks5_client_socket.h",
+    "socket/socks5_datagram_client_socket.cc",
+    "socket/socks5_datagram_client_socket.h",
+    "socket/socks5_warm_pool.cc",
+    "socket/socks5_warm_pool.h",
     "socket/socks_client_socket.cc",
     "socket/socks_client_socket.h",
     "socket/socks_connect_job.cc",

Original source.

0037: Per-host connection limit

A separate --max-connections-per-host switch changes the normal socket-pool group limit, with a flags choice of 15. This is an opt-in connection policy, not a seed-derived persona value, and it does not describe multiplexed HTTP/2 or HTTP/3 stream concurrency. It also removes patch 0035’s WebGL flags UI.

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Stealth Chromium contributors
Date: Thu, 1 Jan 2026 00:00:00 +0000
Subject: [PATCH 37] bromite-lineage: --max-connections-per-host switch + about:flags entry
X-Spec: patches/40-carried-base-patches.md
X-Files: components/network_session_configurator/common/network_switch_list.h chrome/browser/browser_process_impl.cc chrome/browser/BUILD.gn chrome/browser/about_flags.cc chrome/browser/flag_descriptions.h

---

--- a/components/network_session_configurator/common/network_switch_list.h
+++ b/components/network_session_configurator/common/network_switch_list.h
@@ -19,6 +19,10 @@
 // Enables the QUIC protocol.  This is a temporary testing flag.
 NETWORK_SWITCH(kEnableQuic, "enable-quic")
 
+// Stealth Chromium (Bromite lineage): allows specifying a higher number of
+// maximum connections per host (15 instead of 6, mirroring Mozilla).
+NETWORK_SWITCH(kMaxConnectionsPerHost, "max-connections-per-host")
+
 // Ignores certificate-related errors.
 // Note: In tests using net::EmbeddedTestServer with a custom hostname not
 // covered by the default test certs, using this switch is usually incorrect.
--- a/chrome/browser/browser_process_impl.cc
+++ b/chrome/browser/browser_process_impl.cc
@@ -22,6 +22,7 @@
 #include "base/functional/callback.h"
 #include "base/functional/callback_helpers.h"
 #include "base/location.h"
+#include "base/logging.h"
 #include "base/memory/ptr_util.h"
 #include "base/metrics/histogram_functions.h"
 #include "base/metrics/histogram_macros.h"
@@ -29,6 +30,7 @@
 #include "base/notreached.h"
 #include "base/path_service.h"
 #include "base/run_loop.h"
+#include "base/strings/string_number_conversions.h"
 #include "base/synchronization/waitable_event.h"
 #include "base/task/sequenced_task_runner.h"
 #include "base/task/single_thread_task_runner.h"
@@ -119,6 +121,7 @@
 #include "components/metrics/metrics_service.h"
 #include "components/metrics_services_manager/metrics_services_manager.h"
 #include "components/metrics_services_manager/metrics_services_manager_client.h"
+#include "components/network_session_configurator/common/network_switches.h"
 #include "components/network_time/network_time_tracker.h"
 #include "components/os_crypt/async/browser/os_crypt_async.h"
 #include "components/permissions/permissions_client.h"
@@ -156,6 +159,7 @@
 #include "extensions/common/constants.h"
 #include "media/media_buildflags.h"
 #include "mojo/public/cpp/bindings/pending_receiver.h"
+#include "net/socket/client_socket_pool_manager.h"
 #include "printing/buildflags/buildflags.h"
 #include "services/network/public/cpp/features.h"
 #include "services/network/public/cpp/network_switches.h"
@@ -471,6 +475,26 @@
   // whenever the preference or its controlling policy changes.
   pref_change_registrar_.Add(metrics::prefs::kMetricsReportingEnabled,
                              base::BindRepeating(&ApplyMetricsReportingPolicy));
+
+  // Stealth Chromium (Bromite lineage): --max-connections-per-host overrides the
+  // hardcoded HTTP/1.1 per-host pool limit (stock: 6).
+  int max_connections_per_host = 0;
+  const std::string connections_switch_value =
+      base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
+          switches::kMaxConnectionsPerHost);
+  if (!connections_switch_value.empty() &&
+      !base::StringToInt(connections_switch_value,
+                         &max_connections_per_host)) {
+    LOG(DFATAL) << "--" << switches::kMaxConnectionsPerHost
+                << " expected integer; got "" << connections_switch_value
+                << """;
+    max_connections_per_host = 0;
+  }
+  if (max_connections_per_host > 0) {
+    net::ClientSocketPoolManager::set_max_sockets_per_group_for_test(
+        net::HttpNetworkSession::SocketPoolType::kNormal,
+        static_cast<size_t>(max_connections_per_host));
+  }
 
   DCHECK(!webrtc_event_log_manager_);
   webrtc_event_log_manager_ = WebRtcEventLogManager::CreateSingletonInstance();
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -2219,6 +2219,7 @@
     "//components/net_log",
     "//components/network_hints/common:mojo_bindings",
     "//components/network_session_configurator/browser",
+    "//components/network_session_configurator/common",
     "//components/network_time",
     "//components/network_time/time_tracker",
     "//components/no_state_prefetch/browser",
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -418,48 +418,16 @@
     {flag_descriptions::kPullToRefreshEnabledTouchscreen,
      switches::kPullToRefresh, "2"}};
 #endif  // USE_AURA
+
+const FeatureEntry::Choice kMaxConnectionsPerHostChoices[] = {
+    {flags_ui::kGenericExperimentChoiceDefault, "", ""},
+    {"15", switches::kMaxConnectionsPerHost, "15"}};
 
 const FeatureEntry::FeatureParam kLocalNetworkAccessChecksBlock[] = {
     {"LocalNetworkAccessChecksWarn", "false"}};
 const FeatureEntry::FeatureVariation kLocalNetworkAccessChecksVariations[] = {
     {"(Blocking)", kLocalNetworkAccessChecksBlock, nullptr}};
 
-// Stealth Chromium: vendor/renderer presets for the "Spoof WebGL Info" flag
-// (ungoogled-chromium lineage). Note the param defaults in
-// third_party/blink/common/features.cc are a single space, so enabling the
-// feature without a preset yields the blank behavior rather than the real
-// GPU strings.
-const FeatureEntry::FeatureParam kSpoofWebGL_Blank[] = {
-    {"renderer", " "},
-    {"vendor", " "}};
-const FeatureEntry::FeatureParam kSpoofWebGL_Amd[] = {
-    {"renderer", "Radeon R9 200 Series, or similar"},
-    {"vendor", "AMD"}};
-const FeatureEntry::FeatureParam kSpoofWebGL_Apple[] = {
-    {"renderer", "Apple GPU"},
-    {"vendor", "Apple Inc."}};
-const FeatureEntry::FeatureParam kSpoofWebGL_Intel[] = {
-    {"renderer", "Intel(R) HD Graphics, or similar"},
-    {"vendor", "Intel"}};
-const FeatureEntry::FeatureParam kSpoofWebGL_Mesa[] = {
-    {"renderer", "llvmpipe"},
-    {"vendor", "Mesa"}};
-const FeatureEntry::FeatureParam kSpoofWebGL_Nvidia[] = {
-    {"renderer", "NVIDIA GeForce GTX 980, or similar"},
-    {"vendor", "NVIDIA Corporation"}};
-const FeatureEntry::FeatureParam kSpoofWebGL_Qualcomm[] = {
-    {"renderer", "Adreno (TM) 610"},
-    {"vendor", "Qualcomm"}};
-
-const FeatureEntry::FeatureVariation kSpoofWebGLChoices[] = {
-    {"Blank", kSpoofWebGL_Blank, nullptr},
-    {"AMD Radeon R9 200", kSpoofWebGL_Amd, nullptr},
-    {"Apple", kSpoofWebGL_Apple, nullptr},
-    {"Intel", kSpoofWebGL_Intel, nullptr},
-    {"Mesa LLVMpipe", kSpoofWebGL_Mesa, nullptr},
-    {"NVIDIA GeForce GTX 980", kSpoofWebGL_Nvidia, nullptr},
-    {"Qualcomm Adreno 610", kSpoofWebGL_Qualcomm, nullptr}};
-
 const FeatureEntry::Choice kEnableBenchmarkingChoices[] = {
     {flag_descriptions::kEnableBenchmarkingChoiceDisabled, "", ""},
     {flag_descriptions::kEnableBenchmarkingChoiceDefaultFeatureStates,
@@ -12952,15 +12920,10 @@
      flag_descriptions::kWebMCPTestingDescription, kOsAll,
      FEATURE_VALUE_TYPE(blink::features::kWebMCPTesting)},
 
-    // Stealth Chromium: "Spoof WebGL Info" (ungoogled-chromium lineage). The
-    // presets feed the kSpoofWebGLInfo feature params consumed by the
-    // UNMASKED_{VENDOR,RENDERER}_WEBGL fallback in
-    // WebGLRenderingContextBase::getParameter().
-    {"spoof-webgl-info", flag_descriptions::kSpoofWebglInfoName,
-     flag_descriptions::kSpoofWebglInfoDescription, kOsAll,
-     FEATURE_WITH_PARAMS_VALUE_TYPE(blink::features::kSpoofWebGLInfo,
-                                    kSpoofWebGLChoices,
-                                    "SpoofWebGLInfo")},
+    {"max-connections-per-host",
+     flag_descriptions::kMaxConnectionsPerHostName,
+     flag_descriptions::kMaxConnectionsPerHostDescription, kOsAll,
+     MULTI_VALUE_TYPE(kMaxConnectionsPerHostChoices)},
 
     // Add new entries above this line.
     // NOTE: Adding a new flag requires adding a corresponding entry to enum
--- a/chrome/browser/flag_descriptions.h
+++ b/chrome/browser/flag_descriptions.h
@@ -2769,6 +2769,12 @@
 inline constexpr char kLogJsConsoleMessagesDescription[] =
     "Enable logging JS console messages in system logs, please note that they "
     "may contain PII.";
+
+inline constexpr char kMaxConnectionsPerHostName[] =
+    "Maximum connections per host";
+inline constexpr char kMaxConnectionsPerHostDescription[] =
+    "Customize maximum allowed connections per host. ungoogled-chromium "
+    "flag, Bromite feature.";
 
 inline constexpr char kMediaRouterCastAllowAllIPsName[] =
     "Connect to Cast devices on all IP addresses";
@@ -3926,13 +3932,6 @@
     "Visualize overdraw by color-coding elements based on if they have other "
     "elements drawn underneath.";
 
-// Stealth Chromium: "Spoof WebGL Info" (ungoogled-chromium lineage).
-inline constexpr char kSpoofWebglInfoName[] = "Spoof WebGL Info";
-inline constexpr char kSpoofWebglInfoDescription[] =
-    "Return generic values for WebGLDebugRendererInfo to remove a potential "
-    "data leak while preventing potential website breakage. ungoogled-chromium "
-    "flag.";
-
 inline constexpr char kAccessibilityOnScreenModeName[] =
     "On-Screen Only Accessibility Nodes";
 inline constexpr char kAccessibilityOnScreenModeDescription[] =

Original source.

0038: V8 console and exception instrumentation

V8’s inspector stops forwarding console/exception messages to the Runtime agent while the renderer enables the stealth flag. The patch gates both live delivery and replay on Runtime.enable, addressing a stack-formatting side effect of inspecting logged errors. The Console domain remains; clients relying on Runtime events lose that event stream.

The live-delivery gate is:

-        session->runtimeAgent()->messageAdded(message.get());
+        if (!v8_flags.fingerprint_console_stealth) {
+          session->runtimeAgent()->messageAdded(message.get());
+        }
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Stealth Chromium contributors
Date: Thu, 1 Jan 2026 00:00:00 +0000
Subject: [PATCH 38/38] fingerprint: suppress Runtime console/exception inspector events (CDP stealth)
X-Spec: patches/41-console-instrumentation-suppression.md
X-Files: v8/src/inspector/v8-console-message.cc v8/src/inspector/v8-runtime-agent-impl.cc v8/src/flags/flag-definitions.h content/renderer/renderer_main.cc

---

--- a/v8/src/inspector/v8-console-message.cc
+++ b/v8/src/inspector/v8-console-message.cc
@@ -10,6 +10,7 @@
 #include "include/v8-microtask-queue.h"
 #include "include/v8-primitive-object.h"
 #include "src/debug/debug-interface.h"
+#include "src/flags/flags.h"
 #include "src/inspector/inspected-context.h"
 #include "src/inspector/protocol/Protocol.h"
 #include "src/inspector/string-util.h"
@@ -582,7 +583,15 @@
       contextGroupId, [&message](V8InspectorSessionImpl* session) {
         if (message->origin() == V8MessageOrigin::kConsole)
           session->consoleAgent()->messageAdded(message.get());
-        session->runtimeAgent()->messageAdded(message.get());
+        // Stealth Chromium: while fingerprint-console-stealth is on, the Runtime
+        // agent is not notified, so Runtime.consoleAPICalled /
+        // Runtime.exceptionThrown are never emitted. An attached client that
+        // console.log()s an Error therefore cannot observe the inspector
+        // touching Error.stack via Error.prepareStackTrace. The Console
+        // domain (Console.messageAdded) is intentionally kept working.
+        if (!v8_flags.fingerprint_console_stealth) {
+          session->runtimeAgent()->messageAdded(message.get());
+        }
       });
   if (!inspector->hasConsoleMessageStorage(contextGroupId)) return;
 
--- a/v8/src/inspector/v8-runtime-agent-impl.cc
+++ b/v8/src/inspector/v8-runtime-agent-impl.cc
@@ -42,6 +42,7 @@
 #include "include/v8-inspector.h"
 #include "include/v8-microtask-queue.h"
 #include "src/debug/debug-interface.h"
+#include "src/flags/flags.h"
 #include "src/inspector/injected-script.h"
 #include "src/inspector/inspected-context.h"
 #include "src/inspector/protocol/Protocol.h"
@@ -1116,11 +1117,17 @@
   // Make a copy of the message to avoid a UAF.
   const auto& messages = storage->messages();
   const size_t size = messages.size();
-  for (size_t i = 0; i < size; ++i) {
-    if (i >= messages.size()) break;
-    V8ConsoleMessage message = *messages[i];
-    if (!reportMessage(&message, false)) {
-      break;
+  // Stealth Chromium: the replay path is gated together with the live fanout in
+  // V8ConsoleMessageStorage::addMessage. Without this, a client could
+  // recover the suppressed event stream by toggling Runtime.disable /
+  // Runtime.enable (observed on the vendor build this series models).
+  if (!v8_flags.fingerprint_console_stealth) {
+    for (size_t i = 0; i < size; ++i) {
+      if (i >= messages.size()) break;
+      V8ConsoleMessage message = *messages[i];
+      if (!reportMessage(&message, false)) {
+        break;
+      }
     }
   }
   return Response::Success();
--- a/v8/src/flags/flag-definitions.h
+++ b/v8/src/flags/flag-definitions.h
@@ -4184,6 +4184,15 @@
 DEFINE_IMPLICATION(ll_prof, log)
 DEFINE_IMPLICATION(gdbjit, log)
 
+// Stealth Chromium: suppress DevTools Runtime-domain console/exception
+// instrumentation (Runtime.consoleAPICalled, Runtime.exceptionThrown) so an
+// attached CDP client cannot observe the inspector touching Error.stack
+// (the Error.prepareStackTrace + console.log(new Error()) detection).
+// Set from content/renderer/renderer_main.cc whenever the fingerprint
+// identity system is active; defaults to off (stock behavior).
+DEFINE_BOOL(fingerprint_console_stealth, false,
+            "suppress Runtime console/exception inspector events")
+
 // Cleanup...
 #undef FLAG_FULL
 #undef FLAG_READONLY
--- a/content/renderer/renderer_main.cc
+++ b/content/renderer/renderer_main.cc
@@ -47,6 +47,7 @@
 #include "content/renderer/render_process_impl.h"
 #include "content/renderer/render_thread_impl.h"
 #include "content/renderer/renderer_main_platform_delegate.h"
+#include "include/v8.h"
 #include "media/media_buildflags.h"
 #include "mojo/public/cpp/bindings/direct_receiver.h"
 #include "mojo/public/cpp/bindings/interface_endpoint_client.h"
@@ -55,6 +56,7 @@
 #include "services/tracing/public/cpp/trace_startup.h"
 #include "skia/ext/font_utils.h"
 #include "third_party/blink/public/common/features.h"
+#include "third_party/blink/public/common/fingerprint/fingerprint.h"
 #include "third_party/blink/public/common/switches.h"
 #include "third_party/blink/public/platform/platform.h"
 #include "third_party/blink/public/platform/scheduler/web_thread_scheduler.h"
@@ -177,6 +179,16 @@
     if (!locale.empty()) {
       base::i18n::SetICUDefaultLocale(locale);
     }
+  }
+
+  // Stealth Chromium: while fingerprinting is active, suppress the DevTools
+  // Runtime-domain console/exception instrumentation (Runtime.
+  // consoleAPICalled and Runtime.exceptionThrown). V8's inspector cannot
+  // read Chromium switches, so the gate is passed as a v8 flag, set here
+  // before the first isolate exists in this process (worker isolates in
+  // renderer processes included). --fingerprint=off keeps stock behavior.
+  if (blink::fingerprint::Enabled()) {
+    v8::V8::SetFlagsFromString("--fingerprint-console-stealth");
   }
 
 #if BUILDFLAG(IS_MAC)

Original source.

Coherent personas and launch overrides

These later patches coordinate some of the defaults above and close gaps in how an identity survives user-agent overrides and font queries.

0039: Joint hardware personas

RAM, CPU threads, screen dimensions, and GPU identity now draw from one device profile selected by seed and platform. This replaces the earlier independent defaults, reducing mismatched hardware combinations and keeping WebGL and WebGPU on the same GPU model. Explicit switches can still break those pairings; screen defaults still need a platform switch. The curated Windows and Linux profiles remain NVIDIA-only, and the host still does the rendering.

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Stealth Chromium contributors
Date: Thu, 1 Jan 2026 00:00:00 +0000
Subject: [PATCH 0039] fingerprint: jointly-sampled hardware device profiles
X-Spec: Pro-build joint hardware personas (CHANGELOG 0.4.8, 148.0.7778.215.5); docs/features/joint-hardware-personas.md
X-Files: third_party/blink/renderer/core/fingerprint/device_profiles.h third_party/blink/renderer/core/fingerprint/screen_dimensions.h third_party/blink/renderer/core/frame/navigator_concurrent_hardware.cc third_party/blink/renderer/core/frame/navigator_device_memory.cc third_party/blink/renderer/modules/webgl/gpu_fingerprint.cc third_party/blink/renderer/modules/webgpu/webgpu_fingerprint.h

---

--- /dev/null
+++ b/third_party/blink/renderer/core/fingerprint/device_profiles.h
@@ -0,0 +1,151 @@
+// Copyright 2026 The Stealth Chromium Authors
+// Use of this source code is governed by a GPLv3 license that can be
+// found in the LICENSE file of the Stealth Chromium distribution.
+
+#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_FINGERPRINT_DEVICE_PROFILES_H_
+#define THIRD_PARTY_BLINK_RENDERER_CORE_FINGERPRINT_DEVICE_PROFILES_H_
+
+#include <cstdint>
+#include <iterator>
+#include <string_view>
+
+#include "third_party/blink/public/common/fingerprint/fingerprint.h"
+
+// Stealth Chromium: jointly-sampled hardware device profiles.
+//
+// The vendor build derives every hardware value of an identity from "the
+// most common real-world hardware values ... chosen together so they form
+// a popular, self-consistent device with no internal contradictions"
+// (CHANGELOG 0.4.8). One deterministic selection per (seed, platform)
+// picks a complete profile below, and the persona-default branches of
+// deviceMemory (0004), hardwareConcurrency (0005), the screen dimensions
+// (0007) and the WebGL / WebGPU GPU personas (0016/0032) all read that one
+// entry, replacing the former independent per-field hash defaults which
+// could combine into machines nobody ships.
+//
+// GPU selection reuses the existing persona databases: nvidia_device_id
+// is a PCI id from kNvidiaGpuModels (modules/webgl/gpu_fingerprint.cc and
+// modules/webgpu/webgpu_fingerprint.h share one table; ids are unique),
+// apple_soc is a 0016-style SoC name. No GPU strings live here.
+//
+// Precedence at every consumer: explicit --fingerprint-* override >
+// profile > stock. With fingerprinting disabled ActiveDeviceProfile()
+// returns nullptr and no profile code executes.
+namespace blink::fingerprint {
+
+struct DeviceProfile {
+  int screen_width;  // CSS pixels; what window.screen reports under the persona
+  int screen_height;
+  int color_depth;           // 24 for every entry, matching stock Chrome
+  float device_memory_gb;    // navigator.deviceMemory
+  int hardware_concurrency;  // navigator.hardwareConcurrency (logical cores)
+  uint32_t nvidia_device_id;  // kNvidiaGpuModels entry; 0 on the macOS persona
+  const char* apple_soc;      // macOS persona SoC name; "" everywhere else
+};
+
+// Popular Windows pairings; desktops first, then laptops (1536x864 is a
+// 1920x1080 panel at Windows' 125% scaling, 1366x768 the budget panel).
+inline constexpr DeviceProfile kWindowsDeviceProfiles[] = {
+    {1920, 1080, 24, 8.0f, 8, 0x2507, ""},    // RTX 3050 desktop
+    {1920, 1080, 24, 8.0f, 12, 0x2582, ""},   // RTX 3050 desktop
+    {1920, 1080, 24, 16.0f, 12, 0x2487, ""},  // RTX 3060 desktop
+    {2560, 1440, 24, 16.0f, 12, 0x2486, ""},  // RTX 3060 Ti desktop
+    {2560, 1440, 24, 16.0f, 16, 0x2484, ""},  // RTX 3070 desktop
+    {2560, 1440, 24, 32.0f, 16, 0x2786, ""},  // RTX 4070 desktop
+    {2560, 1440, 24, 16.0f, 16, 0x2C05, ""},  // RTX 5070 Ti desktop
+    {3840, 2160, 24, 32.0f, 16, 0x2704, ""},  // RTX 4080 desktop
+    {3840, 2160, 24, 32.0f, 16, 0x2684, ""},  // RTX 4090 desktop
+    {1920, 1080, 24, 16.0f, 16, 0x2882, ""},  // RTX 4060 desktop
+    {1536, 864, 24, 8.0f, 8, 0x25A2, ""},     // RTX 3050 Laptop GPU
+    {1536, 864, 24, 8.0f, 12, 0x25A0, ""},    // RTX 3050 Ti Laptop GPU
+    {1366, 768, 24, 8.0f, 8, 0x25EC, ""},     // RTX 3050 6GB Laptop GPU
+    {1920, 1080, 24, 8.0f, 12, 0x2520, ""},   // RTX 3060 Laptop GPU
+    {1920, 1080, 24, 16.0f, 12, 0x28E1, ""},  // RTX 4050 Laptop GPU
+    {1920, 1080, 24, 16.0f, 16, 0x28A0, ""},  // RTX 4060 Laptop GPU
+    {2560, 1440, 24, 32.0f, 16, 0x2820, ""},  // RTX 4070 Laptop GPU
+    {1920, 1080, 24, 32.0f, 16, 0x249C, ""},  // RTX 3080 Laptop GPU
+};
+
+// Apple-silicon Macs at their default scaled resolution (window.screen
+// reports the "looks like" size, not the panel size); desktops with
+// common external displays last.
+inline constexpr DeviceProfile kMacOsDeviceProfiles[] = {
+    {1440, 900, 24, 8.0f, 8, 0, "M1"},         // MacBook Air 13" M1
+    {1440, 900, 24, 16.0f, 8, 0, "M1"},        // MacBook Air 13" M1, 16 GB
+    {1470, 956, 24, 8.0f, 8, 0, "M2"},         // MacBook Air 13" M2
+    {1470, 956, 24, 8.0f, 8, 0, "M3"},         // MacBook Air 15" M3
+    {1470, 956, 24, 16.0f, 8, 0, "M3"},        // MacBook Air 13" M3, 16 GB
+    {1512, 982, 24, 16.0f, 10, 0, "M1 Pro"},   // MacBook Pro 14" M1 Pro
+    {1512, 982, 24, 16.0f, 10, 0, "M2 Pro"},   // MacBook Pro 14" M2 Pro
+    {1512, 982, 24, 16.0f, 10, 0, "M4"},       // MacBook Pro 14" M4
+    {1512, 982, 24, 16.0f, 12, 0, "M2 Pro"},   // MacBook Pro 14" M2 Pro
+    {1728, 1117, 24, 16.0f, 12, 0, "M3 Pro"},  // MacBook Pro 16" M3 Pro
+    {1728, 1117, 24, 32.0f, 12, 0, "M2 Max"},  // MacBook Pro 16" M2 Max
+    {1728, 1117, 24, 32.0f, 16, 0, "M3 Max"},  // MacBook Pro 16" M3 Max
+    {1728, 1117, 24, 32.0f, 16, 0, "M4 Max"},  // MacBook Pro 16" M4 Max
+    {1920, 1080, 24, 8.0f, 8, 0, "M1"},        // Mac mini M1
+    {1920, 1080, 24, 8.0f, 8, 0, "M2"},        // Mac mini M2
+    {2560, 1440, 24, 16.0f, 10, 0, "M4"},      // Mac mini M4
+    {3840, 2160, 24, 32.0f, 12, 0, "M2 Max"},  // Mac Studio M2 Max
+};
+
+// Linux desktops and Linux-native laptops. The pool is NVIDIA-only: the
+// 0016/0032 Linux vendor and renderer strings are NVIDIA-shaped, and
+// reusing them verbatim is what keeps WebGL, WebGPU and this table
+// coherent.
+inline constexpr DeviceProfile kLinuxDeviceProfiles[] = {
+    {1920, 1080, 24, 8.0f, 8, 0x2507, ""},    // RTX 3050 desktop
+    {1920, 1080, 24, 16.0f, 8, 0x2582, ""},   // RTX 3050 desktop
+    {1920, 1080, 24, 16.0f, 12, 0x2487, ""},  // RTX 3060 desktop
+    {2560, 1440, 24, 16.0f, 12, 0x2486, ""},  // RTX 3060 Ti desktop
+    {2560, 1440, 24, 32.0f, 16, 0x2484, ""},  // RTX 3070 desktop
+    {2560, 1440, 24, 32.0f, 16, 0x2786, ""},  // RTX 4070 desktop
+    {1920, 1080, 24, 32.0f, 16, 0x2882, ""},  // RTX 4060 desktop
+    {3840, 2160, 24, 32.0f, 16, 0x2684, ""},  // RTX 4090 desktop
+    {1920, 1080, 24, 8.0f, 12, 0x2520, ""},   // RTX 3060 Laptop GPU
+    {1920, 1080, 24, 16.0f, 12, 0x28E1, ""},  // RTX 4050 Laptop GPU
+    {1920, 1080, 24, 16.0f, 16, 0x28A0, ""},  // RTX 4060 Laptop GPU
+    {2560, 1440, 24, 16.0f, 16, 0x249C, ""},  // RTX 3080 Laptop GPU
+    {1536, 864, 24, 8.0f, 8, 0x25A2, ""},     // RTX 3050 Laptop GPU
+    {1920, 1080, 24, 8.0f, 8, 0x25EC, ""},    // RTX 3050 6GB Laptop GPU
+};
+
+// The active joint persona, or nullptr when no identity seed is set (the
+// callers' stock fallthrough). Cached like the accessors in
+// fingerprint.h: the command line is immutable by the time renderer code
+// runs. An absent or unrecognized --fingerprint-platform resolves to the
+// Linux tables, matching the GPU persona default in 0016/0032.
+inline const DeviceProfile* ActiveDeviceProfile() {
+  static const DeviceProfile* profile = [] -> const DeviceProfile* {
+    if (!Seed()) {
+      return nullptr;
+    }
+    const DeviceProfile* table = kLinuxDeviceProfiles;
+    size_t count = std::size(kLinuxDeviceProfiles);
+    std::string_view key = "linux";
+    switch (SpoofedPlatform()) {
+      case Platform::kWindows:
+        table = kWindowsDeviceProfiles;
+        count = std::size(kWindowsDeviceProfiles);
+        key = "windows";
+        break;
+      case Platform::kMacOs:
+        table = kMacOsDeviceProfiles;
+        count = std::size(kMacOsDeviceProfiles);
+        key = "macos";
+        break;
+      case Platform::kNone:
+      case Platform::kLinux:
+        break;
+    }
+    // Same seed + same platform ⇒ same profile, always; the platform key
+    // keeps the per-table indices independent.
+    const uint64_t hash = Mix(HashFor("device-profile") ^ Hash(key));
+    return &table[hash % count];
+  }();
+  return profile;
+}
+
+}  // namespace blink::fingerprint
+
+#endif  // THIRD_PARTY_BLINK_RENDERER_CORE_FINGERPRINT_DEVICE_PROFILES_H_
--- a/third_party/blink/renderer/core/fingerprint/screen_dimensions.h
+++ b/third_party/blink/renderer/core/fingerprint/screen_dimensions.h
@@ -8,14 +8,16 @@
 #include <optional>
 
 #include "third_party/blink/public/common/fingerprint/fingerprint.h"
+#include "third_party/blink/renderer/core/fingerprint/device_profiles.h"
 
 // Screen-dimension ladder shared by window.screen (core/frame/screen.cc) and
 // CSS media queries (core/css/media_values.cc) so JS and CSS agree.
 //
 // Resolution order per dimension (mirrors the vendor build):
 //   1. --fingerprint-screen-width / --fingerprint-screen-height
-//   2. platform default when both --fingerprint and --fingerprint-platform
-//      are present: macos 1440x900, anything else 1920x1080
+//   2. joint device profile (device_profiles.h) when both --fingerprint and
+//      --fingerprint-platform are present; the same profile also drives RAM,
+//      CPU cores, and the GPU persona
 //   3. nullopt → caller falls back to stock behavior
 namespace blink::fingerprint {
 
@@ -30,7 +32,9 @@
     return static_cast<int>(*w);
   }
   if (HasPlatformDefault()) {
-    return SpoofedPlatform() == Platform::kMacOs ? 1440 : 1920;
+    if (const DeviceProfile* profile = ActiveDeviceProfile()) {
+      return profile->screen_width;
+    }
   }
   return std::nullopt;
 }
@@ -40,7 +44,9 @@
     return static_cast<int>(*h);
   }
   if (HasPlatformDefault()) {
-    return SpoofedPlatform() == Platform::kMacOs ? 900 : 1080;
+    if (const DeviceProfile* profile = ActiveDeviceProfile()) {
+      return profile->screen_height;
+    }
   }
   return std::nullopt;
 }
--- a/third_party/blink/renderer/core/frame/navigator_concurrent_hardware.cc
+++ b/third_party/blink/renderer/core/frame/navigator_concurrent_hardware.cc
@@ -6,12 +6,14 @@
 
 #include "base/system/sys_info.h"
 #include "third_party/blink/public/common/fingerprint/fingerprint.h"
+#include "third_party/blink/renderer/core/fingerprint/device_profiles.h"
 
 namespace blink {
 
 unsigned NavigatorConcurrentHardware::hardwareConcurrency() const {
-  // Stealth Chromium: explicit thread-count override; 8-thread persona default
-  // when only the identity seed is present.
+  // Stealth Chromium: explicit thread-count override; the core count comes
+  // from the joint device profile so it matches the persona's GPU, RAM, and
+  // screen.
   if (auto count =
           fingerprint::SwitchUint(switches::kFingerprintHardwareConcurrency)) {
     if (*count != 0) {
@@ -19,6 +21,10 @@
     }
   }
   if (fingerprint::Seed()) {
+    if (const fingerprint::DeviceProfile* profile =
+            fingerprint::ActiveDeviceProfile()) {
+      return static_cast<unsigned>(profile->hardware_concurrency);
+    }
     return 8u;
   }
   return static_cast<unsigned>(base::SysInfo::NumberOfProcessors());
--- a/third_party/blink/renderer/core/frame/navigator_device_memory.cc
+++ b/third_party/blink/renderer/core/frame/navigator_device_memory.cc
@@ -10,19 +10,25 @@
 #include "third_party/blink/public/common/fingerprint/fingerprint.h"
 #include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-shared.h"
 #include "third_party/blink/renderer/core/dom/document.h"
+#include "third_party/blink/renderer/core/fingerprint/device_profiles.h"
 #include "third_party/blink/renderer/core/frame/local_dom_window.h"
 
 namespace blink {
 
 float NavigatorDeviceMemory::deviceMemory() const {
   // Stealth Chromium: unbucketed override (launcher passes a realistic bucketed
-  // value); 8 GiB persona default when only the identity seed is present.
+  // value); RAM comes from the joint device profile so it matches the
+  // persona's GPU, cores, and screen.
   if (auto gb = fingerprint::SwitchDouble(switches::kFingerprintDeviceMemory)) {
     if (*gb > 0.0 && !std::isnan(*gb)) {
       return static_cast<float>(*gb);
     }
   }
   if (fingerprint::Seed()) {
+    if (const fingerprint::DeviceProfile* profile =
+            fingerprint::ActiveDeviceProfile()) {
+      return profile->device_memory_gb;
+    }
     return 8.0f;
   }
   return ApproximatedDeviceMemory::GetApproximatedDeviceMemory();
--- a/third_party/blink/renderer/modules/webgl/gpu_fingerprint.cc
+++ b/third_party/blink/renderer/modules/webgl/gpu_fingerprint.cc
@@ -5,12 +5,15 @@
 #include "third_party/blink/renderer/modules/webgl/gpu_fingerprint.h"
 
 #include <cstdint>
+#include <string_view>
 #include <vector>
 
 #include "base/command_line.h"
+#include "base/strings/string_number_conversions.h"
 #include "base/strings/string_util.h"
 #include "third_party/blink/public/common/fingerprint/fingerprint.h"
 #include "third_party/blink/public/common/switches.h"
+#include "third_party/blink/renderer/core/fingerprint/device_profiles.h"
 
 namespace blink {
 
@@ -83,13 +86,24 @@
     {"GeForce RTX 5090 Laptop GPU", "0x00002C58"},
 };
 
-constexpr size_t kNvidiaGpuModelCount = std::size(kNvidiaGpuModels);
+// Stealth Chromium: joint-profile lookup (0039). PCI ids are unique across
+// the table, so a device profile's id resolves exactly one model — the
+// same entry modules/webgpu/webgpu_fingerprint.h resolves by value.
+uint32_t ModelDeviceId(const GpuModel& model) {
+  uint32_t device_id = 0;
+  base::HexStringToUInt(std::string_view(model.device_id).substr(2),
+                        &device_id);
+  return device_id;
+}
 
-// Apple SoCs for the macOS persona.
-constexpr const char* kAppleGpuModels[] = {
-    "M1", "M1 Pro", "M2", "M2 Max", "M2 Pro",
-    "M3", "M3 Max", "M3 Pro", "M4", "M4 Max", "M4 Pro",
-};
+const GpuModel* FindNvidiaModel(uint32_t device_id) {
+  for (const GpuModel& model : kNvidiaGpuModels) {
+    if (ModelDeviceId(model) == device_id) {
+      return &model;
+    }
+  }
+  return nullptr;
+}
 
 constexpr char kWindowsVendorString[] = "NVIDIA";
 constexpr char kLinuxVendorString[] = "NVIDIA Corporation";
@@ -99,9 +113,13 @@
 
 bool IsFingerprintGpuActive() {
   const base::CommandLine& cmd = *base::CommandLine::ForCurrentProcess();
-  return cmd.HasSwitch(switches::kFingerprintGpuRenderer) ||
-         cmd.HasSwitch(switches::kFingerprintGpuVendor) ||
-         cmd.HasSwitch(switches::kFingerprint);
+  // Stealth Chromium: an explicit --fingerprint off-value disables the GPU
+  // persona (explicit GPU switches included) along with the rest of the
+  // system; the switch's mere presence is not enough.
+  return fingerprint::Enabled() &&
+         (cmd.HasSwitch(switches::kFingerprintGpuRenderer) ||
+          cmd.HasSwitch(switches::kFingerprintGpuVendor) ||
+          cmd.HasSwitch(switches::kFingerprint));
 }
 
 std::string ResolveFingerprintGpuPlatform() {
@@ -110,7 +128,11 @@
     const std::string value =
         cmd.GetSwitchValueASCII(switches::kFingerprintPlatform);
     if (base::IsStringASCII(value)) {
-      return base::ToLowerASCII(value);
+      const std::string platform = base::ToLowerASCII(value);
+      // Stealth Chromium: "darwin" is a macOS alias in SpoofedPlatform();
+      // resolve it here too so the joint profile's Apple SoC never meets an
+      // NVIDIA vendor string.
+      return platform == "darwin" ? "macos" : platform;
     }
   }
   return "linux";
@@ -123,7 +145,7 @@
         cmd.GetSwitchValueASCII(switches::kFingerprintGpuVendor);
     return base::IsStringASCII(value) ? value : std::string();
   }
-  if (!cmd.HasSwitch(switches::kFingerprint)) {
+  if (!fingerprint::Enabled() || !cmd.HasSwitch(switches::kFingerprint)) {
     return std::string();
   }
   const std::string platform = ResolveFingerprintGpuPlatform();
@@ -146,9 +168,9 @@
       value.clear();
     }
     have_renderer = true;
-  } else if (cmd.HasSwitch(switches::kFingerprint)) {
-    value = fingerprint::SeedString();
-  } else {
+  } else if (!fingerprint::Enabled() ||
+             !cmd.HasSwitch(switches::kFingerprint)) {
+    // Stealth Chromium: --fingerprint=off disables the persona entirely.
     return std::string();
   }
 
@@ -174,22 +196,28 @@
     return value;
   }
 
-  // Seed path: deterministic index into the model database.
-  const uint32_t hash =
-      static_cast<uint32_t>(fingerprint::HashFor("gpu_renderer"));
+  // Seed path: the joint device profile (0039) picks the model, so the GPU
+  // always matches the persona's screen, RAM, and core count.
+  const fingerprint::DeviceProfile* profile =
+      fingerprint::ActiveDeviceProfile();
+  if (!profile) {
+    return std::string();
+  }
   if (platform == "macos") {
     return "ANGLE (Apple, ANGLE Metal Renderer: Apple " +
-           std::string(kAppleGpuModels[hash % std::size(kAppleGpuModels)]) +
-           ", Unspecified Version)";
+           std::string(profile->apple_soc) + ", Unspecified Version)";
   }
-  const GpuModel& model = kNvidiaGpuModels[hash % kNvidiaGpuModelCount];
+  const GpuModel* model = FindNvidiaModel(profile->nvidia_device_id);
+  if (!model) {
+    return std::string();
+  }
   if (platform == "linux") {
     return "ANGLE (" + std::string(kLinuxVendorString) + ", NVIDIA " +
-           model.name + kLinuxGpuSuffix + ")";
+           model->name + kLinuxGpuSuffix + ")";
   }
   // Windows persona: full ANGLE D3D11 renderer string.
   return "ANGLE (" + std::string(kWindowsVendorString) + ", NVIDIA " +
-         model.name + " (" + model.device_id +
+         model->name + " (" + model->device_id +
          ") Direct3D11 vs_5_0 ps_5_0, D3D11)";
 }
 
--- a/third_party/blink/renderer/modules/webgpu/webgpu_fingerprint.h
+++ b/third_party/blink/renderer/modules/webgpu/webgpu_fingerprint.h
@@ -17,10 +17,11 @@
 // the vendor build).
 //
 // The NVIDIA model selection mirrors modules/webgl/gpu_fingerprint.cc
-// (patch 0016): same database order, same seed salt ("gpu_renderer"), same
-// first-match substring lookup for --fingerprint-gpu-renderer. The two
-// tables MUST stay in sync so WebGL UNMASKED_RENDERER_WEBGL and the WebGPU
-// adapter info can never disagree for a given identity.
+// (patch 0016): same database, and — since patch 0039 — the same joint
+// device profile (core/fingerprint/device_profiles.h) picks the entry for
+// both personas, so WebGL UNMASKED_RENDERER_WEBGL and the WebGPU adapter
+// info can never disagree for a given identity. --fingerprint-gpu-renderer
+// keeps its first-match substring lookup.
 
 #include <algorithm>
 #include <cstdint>
@@ -31,6 +32,7 @@
 #include "base/strings/string_util.h"
 #include "third_party/blink/public/common/fingerprint/fingerprint.h"
 #include "third_party/blink/public/common/switches.h"
+#include "third_party/blink/renderer/core/fingerprint/device_profiles.h"
 #include "third_party/blink/renderer/modules/webgpu/gpu_supported_limits.h"
 #include "third_party/blink/renderer/platform/graphics/gpu/webgpu_cpp.h"
 
@@ -119,7 +121,11 @@
     const std::string value =
         cmd.GetSwitchValueASCII(switches::kFingerprintPlatform);
     if (base::IsStringASCII(value)) {
-      return base::ToLowerASCII(value);
+      const std::string platform = base::ToLowerASCII(value);
+      // Stealth Chromium: "darwin" is a macOS alias in SpoofedPlatform();
+      // resolve it here too so the joint profile's Apple SoC never meets an
+      // NVIDIA persona.
+      return platform == "darwin" ? "macos" : platform;
     }
   }
   return "linux";
@@ -127,8 +133,9 @@
 
 // Index into kNvidiaGpuModels: an explicit --fingerprint-gpu-renderer whose
 // value contains a model name selects that model (first match wins, same
-// iteration order as the WebGL persona); otherwise the identity seed hashes
-// to a stable index. nullopt = no persona model (custom renderer string).
+// iteration order as the WebGL persona); otherwise the joint device profile
+// (0039) selects the model by its unique PCI id. nullopt = no persona model
+// (custom renderer string or macOS persona).
 inline std::optional<size_t> ResolveNvidiaModelIndex() {
   const base::CommandLine& cmd = *base::CommandLine::ForCurrentProcess();
   if (cmd.HasSwitch(switches::kFingerprintGpuRenderer)) {
@@ -144,9 +151,17 @@
     }
     return std::nullopt;
   }
-  const uint32_t hash =
-      static_cast<uint32_t>(fingerprint::HashFor("gpu_renderer"));
-  return hash % kNvidiaGpuModelCount;
+  const fingerprint::DeviceProfile* profile =
+      fingerprint::ActiveDeviceProfile();
+  if (!profile || profile->nvidia_device_id == 0) {
+    return std::nullopt;
+  }
+  for (size_t i = 0; i < kNvidiaGpuModelCount; ++i) {
+    if (kNvidiaGpuModels[i].device_id == profile->nvidia_device_id) {
+      return i;
+    }
+  }
+  return std::nullopt;
 }
 
 // Persona vendor: "" = no spoof (fingerprinting off), else "apple" on the

Original source.

0040: One reported Chrome version

A shared version helper supplies the Chrome version for the user agent, client hints, --version, and chrome://version while fingerprinting is enabled. --fingerprint-report-version can replace the compiled default, avoiding disagreements between these reports. Changing the number leaves the Chromium implementation unchanged: a page can still compare the claimed version with available features. Other browser brands retain separate version defaults.

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Stealth Chromium contributors
Date: Thu, 1 Jan 2026 00:00:00 +0000
Subject: [PATCH 40/40] fingerprint: reported Chrome version decoupled from build base
X-Spec: Pro-build version tracking (CHANGELOG 0.4.12/0.5.2); docs/features/reported-version-override.md
X-Files: base/version_info/version_info.h base/version_info/version_info.cc components/version_info/version_info_with_user_agent.h components/version_info/version_info_with_user_agent.cc components/embedder_support/user_agent_utils.cc content/browser/renderer_host/render_process_host_impl.cc third_party/blink/common/switches.cc third_party/blink/public/common/switches.h third_party/blink/public/common/fingerprint/reported_version.h

---

--- a/base/version_info/version_info.h
+++ b/base/version_info/version_info.h
@@ -26,9 +26,11 @@
 }
 
 // Returns the version number, e.g. "6.0.490.1".
-constexpr std::string_view GetVersionNumber() {
-  return PRODUCT_VERSION;
-}
+// Stealth Chromium: not constexpr — the reported Chrome version is decoupled
+// from the build base (series/0040). Resolves --fingerprint-report-version,
+// else a rebase-time Chrome-stable default, whenever fingerprinting is on;
+// returns PRODUCT_VERSION (stock) whenever fingerprinting is off.
+std::string_view GetVersionNumber();
 
 // Returns the major component (aka the milestone) of the version as an int,
 // e.g. 6 when the version is "6.0.490.1".
--- a/base/version_info/version_info.cc
+++ b/base/version_info/version_info.cc
@@ -6,13 +6,61 @@
 
 #include <string>
 
+#include "base/command_line.h"
 #include "base/no_destructor.h"
 #include "base/strings/strcat.h"
 #include "base/strings/string_number_conversions.h"
+#include "base/strings/string_util.h"
 #include "base/version.h"
 
 namespace version_info {
 
+namespace {
+
+// Stealth Chromium: reported-version override (series/0040). base/ must not
+// depend on blink, so the switch names defined in
+// third_party/blink/public/common/switches.h are spelled out here; keep them
+// in sync.
+constexpr char kFingerprintSwitch[] = "fingerprint";
+constexpr char kFingerprintReportVersionSwitch[] = "fingerprint-report-version";
+
+// Default reported version: current Chrome stable at the last series rebase.
+// TODO(stealth): bump at each rebase (see docs/REBASING.md).
+constexpr char kDefaultReportedChromeVersion[] = "157.0.8103.78";
+
+bool FingerprintingEnabled() {
+  const base::CommandLine& command_line =
+      *base::CommandLine::ForCurrentProcess();
+  if (!command_line.HasSwitch(kFingerprintSwitch)) {
+    return false;
+  }
+  const std::string value = base::ToLowerASCII(
+      command_line.GetSwitchValueASCII(kFingerprintSwitch));
+  return value != "off" && value != "false" && value != "0" &&
+         value != "disable" && value != "disabled";
+}
+
+std::string ReportedVersionNumber() {
+  if (!FingerprintingEnabled()) {
+    return PRODUCT_VERSION;
+  }
+  const std::string override_value =
+      base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
+          kFingerprintReportVersionSwitch);
+  // Loose validation: any dotted numeric form base::Version accepts.
+  if (base::Version(override_value).IsValid()) {
+    return override_value;
+  }
+  return kDefaultReportedChromeVersion;
+}
+
+}  // namespace
+
+std::string_view GetVersionNumber() {
+  static const std::string reported = ReportedVersionNumber();
+  return reported;
+}
+
 int GetMajorVersionNumberAsInt() {
   DCHECK(GetVersion().IsValid());
   return GetVersion().components()[0];
--- a/components/version_info/version_info_with_user_agent.h
+++ b/components/version_info/version_info_with_user_agent.h
@@ -18,9 +18,10 @@
 
 // Returns the product name and version information for the User-Agent header,
 // in the format: Chrome/<major_version>.<minor_version>.<build>.<patch>.
-constexpr std::string_view GetProductNameAndVersionForUserAgent() {
-  return "Chrome/" PRODUCT_VERSION;
-}
+// Stealth Chromium: not constexpr — the token follows the reported Chrome
+// version (series/0040); equals "Chrome/" PRODUCT_VERSION whenever
+// fingerprinting is off. Implementation in version_info_with_user_agent.cc.
+std::string_view GetProductNameAndVersionForUserAgent();
 
 }  // namespace version_info
 
--- a/components/version_info/version_info_with_user_agent.cc
+++ b/components/version_info/version_info_with_user_agent.cc
@@ -13,4 +13,13 @@
   return base::StrCat({"Chrome/", GetMajorVersionNumber(), ".0.0.0"});
 }
 
+// Stealth Chromium: reported-version UA token (series/0040); the underlying
+// GetVersionNumber() returns PRODUCT_VERSION when fingerprinting is off, so
+// the token is byte-identical to the stock compile-time form then.
+std::string_view GetProductNameAndVersionForUserAgent() {
+  static const std::string product =
+      base::StrCat("Chrome/", GetVersionNumber());
+  return product;
+}
+
 }  // namespace version_info
--- a/components/embedder_support/user_agent_utils.cc
+++ b/components/embedder_support/user_agent_utils.cc
@@ -33,6 +33,7 @@
 #include "components/version_info/version_info.h"
 #include "net/http/http_util.h"
 #include "third_party/blink/public/common/features.h"
+#include "third_party/blink/public/common/fingerprint/reported_version.h"
 #include "third_party/blink/public/common/switches.h"
 #include "third_party/blink/public/common/user_agent/user_agent_metadata.h"
 
@@ -316,8 +317,14 @@
   // token after the Chrome token, like the real browsers do.
   if (std::string os_token = GetFingerprintOsToken(); !os_token.empty()) {
     std::string user_agent = BuildUserAgentFromOSAndProduct(os_token, product);
-    FingerprintBrandPersona persona =
-        GetFingerprintBrandPersona(std::string(version_info::GetVersionNumber()));
+    // Stealth Chromium: persona version fields come from the one reported
+    // Chrome version (series/0040); stock build version when it abstains.
+    const std::string reported_version =
+        blink::fingerprint::ReportedChromeVersion();
+    FingerprintBrandPersona persona = GetFingerprintBrandPersona(
+        reported_version.empty()
+            ? std::string(version_info::GetVersionNumber())
+            : reported_version);
     if (!persona.ua_suffix.empty()) {
       user_agent.append(persona.ua_suffix).append(persona.version);
     }
@@ -776,7 +783,16 @@
   // seeded by the Chromium major version (matches stock Chrome formatting).
   // full_version/model/mobile/bitness/wow64 keep their stock values.
   {
-    const std::string chromium_full(version_info::GetVersionNumber());
+    // Stealth Chromium: every persona version field derives from the one
+    // reported Chrome version (series/0040); stock build version when it
+    // abstains. The GREASE seed follows the same major via
+    // version_info::GetMajorVersionNumber().
+    const std::string reported_version =
+        blink::fingerprint::ReportedChromeVersion();
+    const std::string chromium_full =
+        reported_version.empty()
+            ? std::string(version_info::GetVersionNumber())
+            : reported_version;
     const int seed = version_info::GetMajorVersionNumber();
     FingerprintBrandPersona persona = GetFingerprintBrandPersona(chromium_full);
 
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -3723,6 +3723,7 @@
       blink::switches::kFingerprintNoise,
       blink::switches::kFingerprintPlatform,
       blink::switches::kFingerprintPlatformVersion,
+      blink::switches::kFingerprintReportVersion,
       blink::switches::kFingerprintScreenHeight,
       blink::switches::kFingerprintScreenWidth,
       blink::switches::kFingerprintStorageQuota,
--- a/third_party/blink/common/switches.cc
+++ b/third_party/blink/common/switches.cc
@@ -184,6 +184,7 @@
 const char kFingerprintNoise[] = "fingerprint-noise";
 const char kFingerprintPlatform[] = "fingerprint-platform";
 const char kFingerprintPlatformVersion[] = "fingerprint-platform-version";
+const char kFingerprintReportVersion[] = "fingerprint-report-version";
 const char kFingerprintScreenHeight[] = "fingerprint-screen-height";
 const char kFingerprintScreenWidth[] = "fingerprint-screen-width";
 const char kFingerprintStorageQuota[] = "fingerprint-storage-quota";
--- a/third_party/blink/public/common/switches.h
+++ b/third_party/blink/public/common/switches.h
@@ -77,6 +77,7 @@
 BLINK_COMMON_EXPORT extern const char kFingerprintNoise[];
 BLINK_COMMON_EXPORT extern const char kFingerprintPlatform[];
 BLINK_COMMON_EXPORT extern const char kFingerprintPlatformVersion[];
+BLINK_COMMON_EXPORT extern const char kFingerprintReportVersion[];
 BLINK_COMMON_EXPORT extern const char kFingerprintScreenHeight[];
 BLINK_COMMON_EXPORT extern const char kFingerprintScreenWidth[];
 BLINK_COMMON_EXPORT extern const char kFingerprintStorageQuota[];
--- /dev/null
+++ b/third_party/blink/public/common/fingerprint/reported_version.h
@@ -0,0 +1,37 @@
+// Copyright 2026 The Stealth Chromium Authors
+// Use of this source code is governed by a GPLv3 license that can be
+// found in the LICENSE file of the Stealth Chromium distribution.
+
+#ifndef THIRD_PARTY_BLINK_PUBLIC_COMMON_FINGERPRINT_REPORTED_VERSION_H_
+#define THIRD_PARTY_BLINK_PUBLIC_COMMON_FINGERPRINT_REPORTED_VERSION_H_
+
+#include <string>
+
+#include "base/version_info/version_info.h"
+#include "third_party/blink/public/common/fingerprint/fingerprint.h"
+
+// Reported Chrome version, decoupled from the build base (series/0040).
+//
+// A browser frozen on an old Chromium base that reports a year-stale version
+// is a cheap bot signal, so the reported version tracks real Chrome instead
+// of the build base. The single source is version_info::GetVersionNumber(),
+// patched to resolve, in order: --fingerprint-report-version (loosely
+// validated dotted-numeric), else a compile-time default equal to Chrome
+// stable at the last series rebase, else the stock build version.
+//
+// Returns "" when fingerprinting is off so call sites fall back to their
+// stock values byte-for-byte.
+namespace blink::fingerprint {
+
+inline std::string ReportedChromeVersion() {
+  if (!Enabled()) {
+    return std::string();
+  }
+  // base/ cannot depend on blink, so the switch parsing and the default
+  // constant live in base/version_info/version_info.cc.
+  return std::string(version_info::GetVersionNumber());
+}
+
+}  // namespace blink::fingerprint
+
+#endif  // THIRD_PARTY_BLINK_PUBLIC_COMMON_FINGERPRINT_REPORTED_VERSION_H_

Original source.

0041: User-agent overrides across frames

A bare CDP user-agent override now derives matching client-hint metadata and travels through page-wide renderer preferences, including frames in other processes. This addresses a top frame reporting the override while an iframe reports the original persona, or the top frame losing its client hints. Separate navigator.platform reporting and some iframe navigation headers can still disagree. Explicit CDP platform or language parameters keep the stock override path.

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Stealth Chromium contributors
Date: Thu, 1 Jan 2026 00:00:00 +0000
Subject: [PATCH 0041] fingerprint: coherent identity across frames under CDP user-agent overrides
X-Spec: Pro-build CDP UA-override coherence (CHANGELOG 0.5.2); docs/features/cdp-ua-override-coherence.md
X-Files: content/browser/devtools/protocol/emulation_handler.cc content/browser/devtools/protocol/emulation_handler.h content/renderer/render_frame_impl.cc third_party/blink/public/common/fingerprint/cdp_ua_override.h

---

--- a/content/browser/devtools/protocol/emulation_handler.cc
+++ b/content/browser/devtools/protocol/emulation_handler.cc
@@ -39,6 +39,8 @@
 #include "services/device/public/mojom/pressure_update.mojom.h"
 #include "services/device/public/mojom/sensor.mojom-shared.h"
 #include "services/network/public/cpp/client_hints.h"
+#include "third_party/blink/public/common/fingerprint/cdp_ua_override.h"
+#include "third_party/blink/public/common/fingerprint/fingerprint.h"
 #include "third_party/blink/public/mojom/device_posture/device_posture_provider.mojom.h"
 #include "third_party/blink/public/mojom/page/widget.mojom-shared.h"
 #include "ui/display/mojom/screen_orientation.mojom.h"
@@ -167,6 +169,15 @@
     UpdateTouchEventEmulationState();
   }
   user_agent_ = std::string();
+  // Stealth Chromium: drop the WebContents-level user-agent override
+  // installed by SetUserAgentOverride() (0041).
+  if (stealth_ua_override_active_) {
+    stealth_ua_override_active_ = false;
+    if (host_) {
+      GetWebContents()->SetUserAgentOverride(blink::UserAgentOverride(),
+                                             /*override_in_new_tabs=*/false);
+    }
+  }
   if (device_emulation_enabled_) {
     device_emulation_enabled_ = false;
     UpdateDeviceEmulationState();
@@ -865,6 +876,40 @@
   accept_language_ = accept_lang;
 
   user_agent_metadata_ = std::nullopt;
+
+  // Stealth Chromium: CDP user-agent override coherence (0041). A bare
+  // override string (what Puppeteer sends on every page session) normally
+  // blanks navigator.userAgentData in the top local root while same-process
+  // iframes and OOPIFs keep reporting the persona/stock identity. Derive a
+  // full persona-coherent metadata from the override string and route the
+  // whole override through the WebContents renderer preferences, which reach
+  // every frame of the page. The command is then handled here (no
+  // fall-through) so the renderer-side emulation agent does not blank the
+  // metadata again. Explicit acceptLanguage/platform/metadata parameters
+  // keep the stock renderer-side path.
+  WebContentsImpl* stealth_contents =
+      blink::fingerprint::Enabled() && host_ ? GetWebContents() : nullptr;
+  const bool stealth_route =
+      stealth_contents && !platform.has_value() && !accept_language.has_value();
+  if (stealth_route && !ua_metadata_override) {
+    if (user_agent.empty()) {
+      if (stealth_ua_override_active_) {
+        stealth_contents->SetUserAgentOverride(blink::UserAgentOverride(),
+                                               /*override_in_new_tabs=*/false);
+        stealth_ua_override_active_ = false;
+      }
+      return Response::FallThrough();
+    }
+    user_agent_metadata_ =
+        blink::fingerprint::DeriveUserAgentMetadataFromOverride(
+            user_agent, GetContentClient()->browser()->GetUserAgentMetadata());
+    stealth_contents->SetUserAgentOverride(
+        blink::UserAgentOverride{user_agent, user_agent_metadata_},
+        /*override_in_new_tabs=*/true);
+    stealth_ua_override_active_ = true;
+    return Response::Success();
+  }
+
   if (!ua_metadata_override) {
     return Response::FallThrough();
   }
@@ -876,8 +921,16 @@
 
   Emulation::UserAgentMetadata& ua_metadata = *ua_metadata_override;
   blink::UserAgentMetadata new_ua_metadata;
+  // Stealth Chromium: with fingerprinting on, fields the client omitted fall
+  // back to the derivation from the override string (persona-filled) instead
+  // of the raw persona, so a partial metadata cannot disagree with the
+  // override string.
   blink::UserAgentMetadata default_ua_metadata =
-      GetContentClient()->browser()->GetUserAgentMetadata();
+      stealth_route
+          ? blink::fingerprint::DeriveUserAgentMetadataFromOverride(
+                user_agent,
+                GetContentClient()->browser()->GetUserAgentMetadata())
+          : GetContentClient()->browser()->GetUserAgentMetadata();
 
   if (ua_metadata.HasBrands()) {
     for (const auto& bv : *ua_metadata.GetBrands(nullptr)) {
@@ -970,6 +1023,30 @@
 
   // All checks OK, can update user_agent_metadata_.
   user_agent_metadata_.emplace(std::move(new_ua_metadata));
+  if (stealth_route) {
+    // Stealth Chromium: propagate the client metadata to every frame through
+    // the WebContents renderer preferences (see comment above), filling
+    // platform fields the client left empty from the override-string
+    // derivation so they cannot blank navigator.userAgentData.
+    if (user_agent_metadata_->platform.empty()) {
+      user_agent_metadata_->platform = default_ua_metadata.platform;
+    }
+    if (user_agent_metadata_->platform_version.empty()) {
+      user_agent_metadata_->platform_version =
+          default_ua_metadata.platform_version;
+    }
+    if (user_agent_metadata_->architecture.empty()) {
+      user_agent_metadata_->architecture = default_ua_metadata.architecture;
+    }
+    if (user_agent_metadata_->model.empty()) {
+      user_agent_metadata_->model = default_ua_metadata.model;
+    }
+    stealth_contents->SetUserAgentOverride(
+        blink::UserAgentOverride{user_agent, user_agent_metadata_},
+        /*override_in_new_tabs=*/true);
+    stealth_ua_override_active_ = true;
+    return Response::Success();
+  }
   return Response::FallThrough();
 }
 
--- a/content/browser/devtools/protocol/emulation_handler.h
+++ b/content/browser/devtools/protocol/emulation_handler.h
@@ -189,6 +189,9 @@
   // In that case nullopt will disable sending of client hints, and a
   // non-nullopt value will be sent.
   std::optional<blink::UserAgentMetadata> user_agent_metadata_;
+  // Stealth Chromium: true while this handler routed a CDP user-agent
+  // override through the WebContents renderer preferences (0041).
+  bool stealth_ua_override_active_ = false;
   std::string accept_language_;
   // If |prefers_color_scheme_| is either "light" or "dark", it is used to
   // override the "prefers-color-scheme" client hint header, when present.
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -152,6 +152,7 @@
 #include "third_party/blink/public/common/context_menu_data/context_menu_data.h"
 #include "third_party/blink/public/common/context_menu_data/untrustworthy_context_menu_params.h"
 #include "third_party/blink/public/common/features.h"
+#include "third_party/blink/public/common/fingerprint/fingerprint.h"
 #include "third_party/blink/public/common/input/web_keyboard_event.h"
 #include "third_party/blink/public/common/interest_group/ad_auction_constants.h"
 #include "third_party/blink/public/common/loader/loader_constants.h"
@@ -4799,6 +4800,15 @@
 
 bool RenderFrameImpl::ShouldUseUserAgentOverride() const {
   auto* web_view = GetWebView();
+  // Stealth Chromium: apply a renderer-preferences user-agent override in
+  // every frame while fingerprinting is on, so the CDP override routed
+  // through WebContents (0041) reads identically in same-process iframes
+  // and OOPIFs regardless of per-navigation override flags.
+  if (blink::fingerprint::Enabled() &&
+      !web_view->GetRendererPreferences()
+           .user_agent_override.ua_string_override.empty()) {
+    return true;
+  }
   // TODO(nasko): When the top-level frame is remote, there is no
   // WebDocumentLoader associated with it, so the checks below are not valid.
   // Temporarily return early and fix properly as part of
--- /dev/null
+++ b/third_party/blink/public/common/fingerprint/cdp_ua_override.h
@@ -0,0 +1,308 @@
+// Copyright 2026 The Stealth Chromium Authors
+// Use of this source code is governed by a GPLv3 license that can be
+// found in the LICENSE file of the Stealth Chromium distribution.
+
+#ifndef THIRD_PARTY_BLINK_PUBLIC_COMMON_FINGERPRINT_CDP_UA_OVERRIDE_H_
+#define THIRD_PARTY_BLINK_PUBLIC_COMMON_FINGERPRINT_CDP_UA_OVERRIDE_H_
+
+#include <array>
+#include <cstring>
+#include <string>
+#include <vector>
+
+#include "third_party/blink/public/common/user_agent/user_agent_metadata.h"
+
+// Stealth Chromium (0041): coherent identity across frames under CDP
+// user-agent overrides. `Emulation.setUserAgentOverride` normally carries
+// only a UA string (e.g. Puppeteer); stock Chromium leaves the client-hints
+// metadata blank or persona/stock depending on the frame. This derivation
+// turns the override string into a full UserAgentMetadata so every frame of
+// the page reports one identity.
+//
+// The override string wins for everything it implies (brand, full version,
+// OS, mobile, model); `persona` — the 0010 persona metadata — fills what it
+// cannot imply (bitness, wow64, form factors, and the tuned platform detail
+// fields when the string's OS matches the persona platform). The brand lists
+// are rebuilt with the GREASE algorithm seeded by the override's major
+// version, matching what stock Chromium of that version would send. Pure and
+// deterministic: the same string and persona give the same metadata on every
+// launch, on every platform.
+
+namespace blink::fingerprint {
+
+namespace cdp_ua_internal {
+
+inline std::string VersionTokenAfter(const std::string& ua, size_t start) {
+  std::string version;
+  for (size_t i = start; i < ua.size(); ++i) {
+    if ((ua[i] >= '0' && ua[i] <= '9') || ua[i] == '.') {
+      version += ua[i];
+    } else {
+      break;
+    }
+  }
+  while (!version.empty() && version.back() == '.') {
+    version.pop_back();
+  }
+  bool has_digit = false;
+  for (char c : version) {
+    if (c >= '0' && c <= '9') {
+      has_digit = true;
+      break;
+    }
+  }
+  return has_digit ? version : std::string();
+}
+
+inline std::string MajorOf(const std::string& version) {
+  const size_t dot = version.find('.');
+  return dot == std::string::npos ? version : version.substr(0, dot);
+}
+
+inline int MajorSeed(const std::string& major) {
+  int seed = 0;
+  for (char c : major) {
+    if (c < '0' || c > '9') {
+      continue;
+    }
+    seed = seed * 10 + (c - '0');
+    if (seed > 1000000) {
+      break;  // Any realistic major version stays far below this clamp.
+    }
+  }
+  return seed;
+}
+
+// Mirrors GetGreasedUserAgentBrandVersion()/GetProcessedGreasedBrandVersion()
+// from components/embedder_support/user_agent_utils.cc, seeded by the
+// override's major version instead of the build's.
+inline UserAgentBrandVersion GreasedBrandVersion(int seed, bool full_version) {
+  static constexpr const char* kChars[] = {" ", "(", ":", "-", ".", "/",
+                                           ")", ";", "=", "?", "_"};
+  static constexpr const char* kVersions[] = {"8", "99", "24"};
+  const std::string version = kVersions[seed % 3];
+  return {std::string("Not") + kChars[seed % 11] + "A" +
+              kChars[(seed + 1) % 11] + "Brand",
+          full_version ? version + ".0.0.0" : version};
+}
+
+// Mirrors ShuffleBrandList()/GetRandomOrder() for the fixed 3-entry list
+// used here (major-version-seeded stable permutation).
+inline UserAgentBrandList ShuffleBrandList3(UserAgentBrandList list,
+                                            int seed) {
+  static constexpr std::array<std::array<size_t, 3>, 6> kOrders{
+      {{0, 1, 2}, {0, 2, 1}, {1, 0, 2}, {1, 2, 0}, {2, 0, 1}, {2, 1, 0}}};
+  const auto& order = kOrders[seed % 6];
+  UserAgentBrandList shuffled(list.size());
+  for (size_t i = 0; i < order.size(); ++i) {
+    shuffled[order[i]] = std::move(list[i]);
+  }
+  return shuffled;
+}
+
+// Platform version implied by an Android token ("Android 13" -> "13.0.0").
+inline std::string AndroidPlatformVersion(const std::string& ua) {
+  const size_t token = ua.find("Android ");
+  if (token == std::string::npos) {
+    return std::string();
+  }
+  const std::string version = VersionTokenAfter(ua, token + 8);
+  if (version.empty()) {
+    return std::string();
+  }
+  return MajorOf(version) + ".0.0";
+}
+
+// Device model: the parenthetical segment after the Android version token,
+// up to " Build/", the next ';' or the closing ')'. Empty when not spelled
+// out.
+inline std::string AndroidModel(const std::string& ua) {
+  const size_t token = ua.find("Android ");
+  if (token == std::string::npos) {
+    return std::string();
+  }
+  size_t start = ua.find(';', token);
+  if (start == std::string::npos) {
+    return std::string();
+  }
+  ++start;
+  while (start < ua.size() && ua[start] == ' ') {
+    ++start;
+  }
+  size_t end = ua.find(" Build/", start);
+  const size_t semi = ua.find(';', start);
+  const size_t paren = ua.find(')', start);
+  if (semi != std::string::npos && (end == std::string::npos || semi < end)) {
+    end = semi;
+  }
+  if (paren != std::string::npos && (end == std::string::npos || paren < end)) {
+    end = paren;
+  }
+  if (end == std::string::npos || end <= start) {
+    return std::string();
+  }
+  return ua.substr(start, end - start);
+}
+
+// Platform version implied by an iOS token ("OS 17_2" -> "17.2.0").
+inline std::string IosPlatformVersion(const std::string& ua) {
+  const size_t token = ua.find("OS ");
+  if (token == std::string::npos) {
+    return std::string();
+  }
+  std::string version;
+  for (size_t i = token + 3; i < ua.size(); ++i) {
+    if ((ua[i] >= '0' && ua[i] <= '9') || ua[i] == '_') {
+      version += ua[i] == '_' ? '.' : ua[i];
+    } else {
+      break;
+    }
+  }
+  if (version.empty()) {
+    return std::string();
+  }
+  // "17_2" arrived as "17.2"; pad to major.minor.patch.
+  size_t dots = 0;
+  for (char c : version) {
+    if (c == '.') {
+      ++dots;
+    }
+  }
+  if (dots == 0) {
+    return version + ".0.0";
+  }
+  if (dots == 1) {
+    return version + ".0";
+  }
+  return version;
+}
+
+}  // namespace cdp_ua_internal
+
+inline UserAgentMetadata DeriveUserAgentMetadataFromOverride(
+    const std::string& user_agent,
+    const UserAgentMetadata& persona) {
+  using namespace cdp_ua_internal;
+
+  UserAgentMetadata metadata = persona;
+
+  // Brand and full version: the last recognized browser token in the string
+  // wins (Edge/Opera/etc. append their token after the Chrome one).
+  struct BrandToken {
+    const char* token;
+    const char* brand;
+  };
+  static constexpr BrandToken kBrandTokens[] = {
+      {"EdgiOS/", "Microsoft Edge"},   {"EdgA/", "Microsoft Edge"},
+      {"Edg/", "Microsoft Edge"},      {"OPR/", "Opera"},
+      {"OPX/", "Opera"},               {"Vivaldi/", "Vivaldi"},
+      {"SamsungBrowser/", "Samsung Internet"}, {"CriOS/", "Google Chrome"},
+      {"Chrome/", "Google Chrome"},    {"Chromium/", "Chromium"},
+  };
+  std::string brand;
+  std::string full_version;
+  size_t best = 0;
+  for (const auto& entry : kBrandTokens) {
+    const size_t pos = user_agent.rfind(entry.token);
+    if (pos == std::string::npos || pos < best) {
+      continue;
+    }
+    const std::string version =
+        VersionTokenAfter(user_agent, pos + std::strlen(entry.token));
+    if (version.empty()) {
+      continue;
+    }
+    best = pos;
+    brand = entry.brand;
+    full_version = version;
+  }
+
+  if (!full_version.empty()) {
+    const std::string major = MajorOf(full_version);
+    const int seed = MajorSeed(major);
+    metadata.full_version = full_version;
+    metadata.brand_full_version_list =
+        ShuffleBrandList3({GreasedBrandVersion(seed, /*full_version=*/true),
+                           {brand, full_version},
+                           {"Chromium", full_version}},
+                          seed);
+    metadata.brand_version_list =
+        ShuffleBrandList3({GreasedBrandVersion(seed, /*full_version=*/false),
+                           {brand, major},
+                           {"Chromium", major}},
+                          seed);
+  }
+
+  // OS-CPU parenthetical. The classic UA freezes or omits most platform
+  // detail, so unmatched fields fall back to the persona; when the string's
+  // OS differs from the persona platform, defaults mirror the 0010 persona
+  // table for that OS.
+  std::string platform;
+  std::string platform_version;
+  std::string architecture;
+  std::string model;
+  bool mobile = false;
+  if (user_agent.find("Windows") != std::string::npos) {
+    platform = "Windows";
+    platform_version = "19.0.0";
+    architecture = "x86";
+  } else if (user_agent.find("Android") != std::string::npos) {
+    platform = "Android";
+    platform_version = AndroidPlatformVersion(user_agent);
+    if (platform_version.empty()) {
+      platform_version = "13.0.0";
+    }
+    architecture = "arm";
+    model = AndroidModel(user_agent);
+    mobile = true;
+  } else if (user_agent.find("iPhone") != std::string::npos ||
+             user_agent.find("iPad") != std::string::npos) {
+    platform = "iOS";
+    platform_version = IosPlatformVersion(user_agent);
+    if (platform_version.empty()) {
+      platform_version = "16.6.0";
+    }
+    architecture = "arm";
+    mobile = true;
+  } else if (user_agent.find("CrOS ") != std::string::npos) {
+    platform = "ChromeOS";
+    const size_t token = user_agent.find("CrOS ");
+    platform_version = VersionTokenAfter(user_agent, token + 5);
+    if (platform_version.empty()) {
+      platform_version = "14541.0.0";
+    }
+    architecture = "x86";
+  } else if (user_agent.find("Macintosh") != std::string::npos ||
+             user_agent.find("Mac OS X") != std::string::npos) {
+    platform = "macOS";
+    platform_version = "15.2.0";  // UA token is frozen at 10_15_7.
+    architecture = "arm";
+  } else if (user_agent.find("X11;") != std::string::npos ||
+             user_agent.find("Linux x86_64") != std::string::npos ||
+             user_agent.find("(X11;") != std::string::npos ||
+             user_agent.find("Linux;") != std::string::npos) {
+    platform = "Linux";
+    platform_version = "6.11.0";
+    architecture = "x86";
+  }
+
+  if (!platform.empty()) {
+    metadata.platform = platform;
+    if (platform != persona.platform) {
+      // The override implies a different OS than the persona: rewrite the
+      // fields the persona had tuned for its own platform.
+      metadata.platform_version = platform_version;
+      metadata.architecture = architecture;
+      metadata.mobile = mobile;
+      if (!model.empty()) {
+        metadata.model = model;
+      }
+    }
+  }
+
+  return metadata;
+}
+
+}  // namespace blink::fingerprint
+
+#endif  // THIRD_PARTY_BLINK_PUBLIC_COMMON_FINGERPRINT_CDP_UA_OVERRIDE_H_

Original source.

0042: Host-font isolation

FontCache replaces patch 0022’s host-font filter with a persona allowlist, also accepting basic families and fonts supplied through the configured directory. Unlisted local families fail matching for CSS, availability checks, and local() sources, preventing extra installed fonts from leaking through that lookup. Webfonts keep working. The permissioned queryLocalFonts() API still enumerates the host inventory, and per-character glyph fallback remains outside this gate.

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Stealth Chromium contributors
Date: Thu, 1 Jan 2026 00:00:00 +0000
Subject: [PATCH 0042] fingerprint: host-font isolation behind the persona allowlist
X-Spec: Pro-build host-font isolation (CHANGELOG 0.5.8, 0.7.x); workspace EMPIRICAL.md document.fonts.check leak; docs/features/host-font-isolation.md
X-Files: third_party/blink/renderer/platform/fonts/font_cache.cc third_party/blink/renderer/platform/fonts/fingerprint_host_font_isolation.h docs/features/host-font-isolation.md

---

--- a/third_party/blink/renderer/platform/fonts/font_cache.cc
+++ b/third_party/blink/renderer/platform/fonts/font_cache.cc
@@ -48,6 +48,7 @@
 #include "third_party/blink/renderer/platform/font_family_names.h"
 #include "third_party/blink/renderer/platform/fonts/alternate_font_family.h"
 #include "third_party/blink/renderer/platform/fonts/fingerprint_font_databases.h"
+#include "third_party/blink/renderer/platform/fonts/fingerprint_host_font_isolation.h"
 #include "third_party/blink/renderer/platform/fonts/font_cache_client.h"
 #include "third_party/blink/renderer/platform/fonts/font_data_cache.h"
 #include "third_party/blink/renderer/platform/fonts/font_description.h"
@@ -143,14 +144,16 @@
   }
 #endif
 
-  // Stealth Chromium: font platform spoofing (patches/18-fonts.md). Under a
-  // cross-platform persona, families that exist only on the host OS are
-  // reported unavailable (as the spoofed OS would), and Windows-only
-  // families are re-aimed at metric-compatible local fonts. Everything
-  // else proceeds through the stock cache.
+  // Stealth Chromium: font platform spoofing + host-font isolation
+  // (patches/18-fonts.md, docs/features/host-font-isolation.md). Under an
+  // active persona, a family resolves only when the persona OS ships it,
+  // --fingerprint-fonts-dir provides it, or it is a generic/basic family;
+  // everything else is reported unavailable exactly as a missing font
+  // would be, and Windows-only families are re-aimed at metric-compatible
+  // local fonts.
   FontFaceCreationParams effective_params(creation_params);
-  if (fingerprint_fonts::ResolveSpoofedFamily(creation_params,
-                                              effective_params) ==
+  if (fingerprint_fonts::ResolveIsolatedFamily(creation_params,
+                                               effective_params) ==
       fingerprint_fonts::FontLookupDecision::kUnavailable) {
     return nullptr;
   }
--- /dev/null
+++ b/third_party/blink/renderer/platform/fonts/fingerprint_host_font_isolation.h
@@ -0,0 +1,81 @@
+// Copyright 2026 The Stealth Chromium Authors
+// Use of this source code is governed by a GPLv3 license that can be
+// found in the LICENSE file of the Stealth Chromium distribution.
+
+#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_FONTS_FINGERPRINT_HOST_FONT_ISOLATION_H_
+#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_FONTS_FINGERPRINT_HOST_FONT_ISOLATION_H_
+
+#include <string>
+
+#include "base/strings/string_util.h"
+#include "third_party/blink/public/common/fingerprint/fingerprint.h"
+#include "third_party/blink/renderer/platform/fonts/fingerprint_font_databases.h"
+#include "third_party/blink/renderer/platform/fonts/font_face_creation_params.h"
+#include "third_party/blink/renderer/platform/wtf/text/atomic_string.h"
+#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
+
+// Stealth Chromium: host-font isolation (docs/features/host-font-isolation.md,
+// vendor CHANGELOG 0.5.8 / 0.7.x). 0022 spoofed the reported platform and
+// blocked families that are host-only per the recovered inventories, but the
+// gate was fail-open: families outside every recovered inventory (any
+// user-installed host font) still resolved through the stock fontconfig
+// path, and only cross-platform personas were gated. This header hardens
+// the same FontCache::GetFontPlatformData hook into a persona allowlist:
+// availability follows the persona inventory alone, so no surface below
+// the cache (document.fonts.check, CSS matching, measureText, src:local())
+// can observe which families the host actually has. 0022's
+// ResolveSpoofedFamily is kept verbatim for spec provenance and is
+// superseded by ResolveIsolatedFamily below.
+namespace blink::fingerprint_fonts {
+
+// 0042's hardened form of ResolveSpoofedFamily. Differences, all
+// deliberate:
+//  - No host-platform filter: same-platform personas clamp to their list
+//    too, exactly like cross-platform ones.
+//  - Fail closed: a family that is in no persona inventory resolves as
+//    "not installed" instead of falling through to the host.
+// Windows aliasing and the generic/basic exemptions are unchanged.
+inline FontLookupDecision ResolveIsolatedFamily(
+    const FontFaceCreationParams& creation_params,
+    FontFaceCreationParams& out_params) {
+  if (!fingerprint::Enabled() ||
+      creation_params.CreationType() != kCreateFontByFamily) {
+    return FontLookupDecision::kStock;
+  }
+  const fingerprint::Platform spoofed = fingerprint::SpoofedPlatform();
+  if (spoofed == fingerprint::Platform::kNone) {
+    return FontLookupDecision::kStock;
+  }
+
+  // The allowlist is static per persona (availability follows the persona,
+  // not the seed). Every set consulted below is a base::NoDestructor
+  // static built once; the checks are O(log n) string lookups, noise next
+  // to the fontconfig/Skia match this gate guards.
+  const std::string family =
+      base::ToLowerASCII(creation_params.Family().Utf8());
+  if (IsBasicFont(family)) {
+    return FontLookupDecision::kProceed;
+  }
+
+  const bool known_on_spoofed =
+      GetPlatformFonts(spoofed).count(family) > 0 || FontsDirProvides(family);
+  if (!known_on_spoofed) {
+    // Not in the persona inventory: behave exactly as if not installed.
+    return FontLookupDecision::kUnavailable;
+  }
+
+  if (spoofed == fingerprint::Platform::kWindows) {
+    const auto& aliases = WindowsAliases();
+    const auto it = aliases.find(family);
+    if (it != aliases.end()) {
+      // Intern the substituted name so subsequent matching uses it.
+      out_params = FontFaceCreationParams(
+          AtomicString(String::FromUTF8(it->second)));
+    }
+  }
+  return FontLookupDecision::kProceed;
+}
+
+}  // namespace blink::fingerprint_fonts
+
+#endif  // THIRD_PARTY_BLINK_RENDERER_PLATFORM_FONTS_FINGERPRINT_HOST_FONT_ISOLATION_H_
--- /dev/null
+++ b/docs/features/host-font-isolation.md
@@ -0,0 +1,187 @@
+# Host-font isolation (0042)
+
+Closes the series' documented persona gap: under an active fingerprint
+persona, the *reported* font platform and the persona font lists were
+already spoofed (0022), but the host's actually-installed fonts stayed
+observable through font availability. A page could ask for a family that
+exists on the host but not on the persona OS and watch it resolve —
+`document.fonts.check`, text-measurement probing, and `@font-face
+src: local()` all answered from the host install set. 0042 makes font
+availability follow the persona inventory alone.
+
+## Motivation
+
+Vendor evidence (CloakBrowser Pro `CHANGELOG.md`):
+
+- 0.5.8 (2026-08-18): "improved host-font isolation for cross-platform
+  personas."
+- 0.7.2 (2026-11-10): "the Windows persona's system and code fonts now
+  match real Windows by default."
+
+Workspace evidence (`patches/EMPIRICAL.md`, new observation 2):
+
+> `document.fonts.check('72px "Ubuntu"')` still returns **true under the
+> Windows persona** — the font DB patch (18) acts at FontCache matching
+> level; `fonts.check` consults a path that reports local availability.
+> Potential persona leak (class: plugins/codec gaps). MEASUREMENTS still
+> shift per persona (metric deltas observed).
+
+0022's gate was fail-open: a family was blocked only when it appeared in
+the *recovered host inventory* but not in the persona list. The recovered
+inventories are samples (e.g. 47 names for Linux), so any host font
+outside the sample — every user-installed font — resolved through the
+stock fontconfig path, and only cross-platform personas were gated.
+
+How the leak reads out at 146 (verified against stock Chrome):
+
+- `document.fonts.check('12px <family>')` with no `@font-face` for
+  `<family>` returns true regardless of installation — but with a
+  same-family webfont shim (`@font-face { font-family: X; src: url(...) }`
+  that never loads), `check('12px X')` returns **true when X is installed
+  locally** (platform availability short-circuits the load check) and
+  **false when it is not**. That is a per-family availability oracle.
+- `measureText`/layout: a family that resolves to a real host font
+  measures differently from one that falls back — the "MEASUREMENTS still
+  shift" observation.
+- `@font-face { src: local("X") }` + `document.fonts.load('12px X')`:
+  the promise settles `loaded` vs `error` exactly by local availability
+  (`LocalFontFaceSource::IsValid`).
+
+## Mechanism
+
+### Choke point
+
+`FontCache::GetFontPlatformData` (`third_party/blink/renderer/platform/
+fonts/font_cache.cc`) — the single funnel every family-keyed platform
+font lookup passes through at 146, regardless of API:
+
+| Surface | Path to the choke point |
+|---|---|
+| CSS `font-family` matching / layout / canvas `measureText` | `CSSFontSelector::GetFontData` → `FontCache::GetFontData` → `GetFontPlatformData` |
+| `document.fonts.check` | `FontFaceSet::check` → `CSSFontSelectorBase::IsPlatformFamilyMatchAvailable` → `FontCache::IsPlatformFamilyMatchAvailable` → `GetFontPlatformData` |
+| `@font-face src: local()` / `document.fonts.load` | `LocalFontFaceSource::IsValid`/`CreateFontData` → `FontCache::IsPlatformFontUniqueNameMatchAvailable` → `GetFontPlatformData` |
+| `system-ui` | `FontCache::SystemFontPlatformData` recurses into `GetFontPlatformData` with the host system family |
+
+Lower alternatives exist (`CreateFontPlatformData`/`CreateTypeface` in
+`platform/fonts/skia/font_cache_skia.cc`) but they are per-port (the mac
+port compiles `font_cache_coretext.cc` instead) and sit below the
+platform-data cache, so a gate there needs one copy per port and only
+runs on cache misses. Higher alternatives (`CSSFontSelector`,
+`FontFaceSet::check`) would need one patch per surface and would miss
+the plain CSS path. One choke point beats per-API patches. 0022 already
+routed `GetFontPlatformData` through `fingerprint_fonts::ResolveSpoofedFamily`;
+0042 swaps that call for `fingerprint_fonts::ResolveIsolatedFamily`
+(`fingerprint_host_font_isolation.h`) at the same site. The decision
+lives in a new header that reuses 0022's inventories, basic set,
+fonts-dir scan, and alias map verbatim — `fingerprint_font_databases.h`
+stays byte-identical, matching the series' one-surface-one-header idiom
+(cf. 0026, 0032, 0034), and `ResolveSpoofedFamily` remains in it for
+spec provenance.
+
+### Allowlist
+
+When `fingerprint::Enabled()` and a persona platform is active
+(`SpoofedPlatform() != kNone`), a family-keyed lookup resolves only if:
+
+1. it is in the persona's recovered inventory
+   (`fingerprint_fonts::GetPlatformFonts(spoofed)`), or
+2. `--fingerprint-fonts-dir` ships a file whose basename matches it
+   (`FontsDirProvides`, scanned once), or
+3. it is a generic/basic family (`IsBasicFont`: `serif`, `sans-serif`,
+   `monospace`, `cursive`, `fantasy`, `system-ui`, `-webkit-standard`,
+   `math`, plus the always-safe set `arial`, `courier new`, `roboto`,
+   `sans`, `times new roman`, `blinkmacsystemfont`, `noto color emoji`,
+   `dejavu math tex gyre`, `franklin gothic[- medium]`,
+   `microsoft sans serif`).
+
+Everything else returns `kUnavailable` → `nullptr`, which is bit-for-bit
+what stock Chromium returns for a family that is not installed. Unknown
+families fail closed; the host inventory is not consulted at all, so
+same-platform personas (e.g. `--fingerprint-platform=linux` on a Linux
+host) clamp to the persona list exactly like cross-platform ones.
+Families in the Windows persona list are still re-aimed at
+metric-compatible local fonts by 0022's alias map (unchanged). In-buffer
+webfonts (`kCreateFontByFciIdAndTtcIndex`) never take the family path and
+are untouched — remote `@font-face` fonts keep working whatever their
+family name.
+
+Determinism: availability follows the persona, not the seed. No per-seed
+derivation anywhere in this patch.
+
+### Cost
+
+The gate runs on every `GetFontPlatformData` call: two cached static
+switch reads, one lowercase/UTF-8 copy (already paid by 0022), and
+O(log n) lookups in `base::NoDestructor` sets built once (≤ 554 entries,
+~10 string compares). This is noise next to the fontconfig/Skia match it
+guards, and it is *cheaper* than 0022's rule, which additionally probed
+the host inventory on every miss.
+
+## Surfaces covered
+
+- **CSS font matching**: non-allowlisted families fall through to the
+  next family in the stack, then the stock fallback chain — the standard
+  missing-font path.
+- **`document.fonts.check`**: the availability bit it consults
+  (`IsPlatformFamilyMatchAvailable`) now reports the persona, so the
+  shim-based oracle above answers for "Ubuntu" exactly as a real Windows
+  box would (false, with the shim). Without a shim, stock semantics
+  return true for every family — on the persona too — which also matches
+  stock-on-the-persona-OS.
+- **`measureText`/layout/canvas**: non-allowlisted families measure and
+  render with the fallback, so text-width probing cannot distinguish
+  "host has this font" from "nobody has this font".
+- **`src: local(...)`/`fonts.load`**: unique-name (PostScript/full name)
+  lookups go through the same family gate, so `local()` sources for
+  non-allowlisted names fail and the face falls to its next source. This
+  also means PostScript-name forms of *persona* families (e.g.
+  `local("ArialMT")`) fall back to the next `src` entry, since the
+  inventories carry family names — strict, and deliberate: the unique
+  name path is the enumeration oracle.
+- **`window.queryLocalFonts`** (Local Font Access): shipped-stable at
+  146 (`runtime_enabled_features.json5`, desktop) but requires a secure
+  context, user activation, and an explicit permission grant, so it is
+  not a passive fingerprinting vector. It enumerates the host list
+  directly and is **not** persona-filtered by this patch — out of the
+  file lane; follow-up patch would filter `FontMetadata` results through
+  the same allowlist.
+- **Per-character glyph fallback**
+  (`FontCache::FallbackFontForCharacter` → fontconfig) is deliberately
+  not gated: it serves script coverage, not family naming, and blocking
+  it would produce tofu. Its metric fingerprint is handled by 0031.
+
+## Rendering consequence (intended)
+
+Pages that ask for host-only exotic fonts now render them with the
+fallback chain. That degradation *is* host-font isolation — the vendor's
+documented semantics — and it matches what the same page would look like
+on a real machine running the persona OS. Generic families and the
+last-resort spine (`sans`, `arial`, `legacyMakeTypeface`) are all in the
+always-allow set, so no page can end up without renderable text.
+
+## Off semantics
+
+`--fingerprint=off|false|0|disable|disabled` (or no persona switch)
+⇒ `Enabled()`/`SpoofedPlatform()` gate returns `kStock` before any
+string work ⇒ byte-for-byte stock font behavior, including fontconfig's
+usual substitution. No new switch is introduced; persona configuration
+is `--fingerprint` + `--fingerprint-platform` + optional
+`--fingerprint-fonts-dir`, all pre-existing from 0001/0022.
+
+## Test plan sketch
+
+- Linux host, `--fingerprint=1 --fingerprint-platform=windows`:
+  - `check('12px Segoe UI')` (persona list) → true; shim-oracle
+    `check('12px Ubuntu')` with a never-loading same-family `@font-face`
+    → false (matches real Windows).
+  - `measureText` width of `12px Fira Code` (host-installed, not in the
+    Windows list) equals the fallback width, and differs from a vanilla
+    run on the same host.
+  - `new FontFace('P', 'local("Ubuntu")').load()` rejects.
+- Same host, `--fingerprint-platform=linux`: host-installed fonts
+  outside the 47-name Linux inventory stop resolving (clamped to the
+  persona list).
+- `--fingerprint=off`: every probe byte-identical to vanilla stock.
+- `--fingerprint-fonts-dir` with `Segoe UI.ttf`: `check('12px Segoe UI')`
+  stays true and the family resolves for measurement.
+- Determinism: two seeds, same persona ⇒ identical availability answers.

Original source.

Media, errors, input, and software rendering

The claimed desktop also needs to agree with what media support queries, input media features, and rendering probes report.

0043: Widevine presence

The encrypted-media registry advertises a software Widevine key system when fingerprinting is enabled and no real Widevine module is registered. This addresses a Chrome persona reporting no Widevine support. The patch also defines a local stub, but this snapshot’s registration getter and setter use different atomic variables, leaving the stub-creation gate inactive. Even the intended stub supplies no decryption keys or encrypted playback; advertising support does not establish a working DRM implementation.

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Stealth Chromium contributors
Date: Thu, 1 Jan 2026 00:00:00 +0000
Subject: [PATCH 0043] fingerprint: phantom Widevine presence for the EME surface
X-Spec: widevine presence persona
X-Files: media/cdm/phantom_widevine.h media/base/key_systems_impl.cc media/mojo/clients/mojo_cdm_factory.cc

---

--- /dev/null
+++ b/media/cdm/phantom_widevine.h
@@ -0,0 +1,251 @@
+// Copyright 2026 The Stealth Chromium Authors
+// Use of this source code is governed by a GPLv3 license that can be
+// found in the LICENSE file of the Stealth Chromium distribution.
+
+#ifndef MEDIA_CDM_PHANTOM_WIDEVINE_H_
+#define MEDIA_CDM_PHANTOM_WIDEVINE_H_
+
+#include <atomic>
+#include <cstdint>
+#include <string>
+#include <vector>
+
+#include "base/command_line.h"
+#include "base/notreached.h"
+#include "base/strings/string_number_conversions.h"
+#include "base/strings/string_util.h"
+#include "media/base/cdm_key_information.h"
+#include "media/base/content_decryption_module.h"
+#include "media/base/eme_constants.h"
+#include "media/base/encryption_scheme.h"
+#include "media/base/key_system_info.h"
+#include "third_party/widevine/cdm/widevine_cdm_common.h"
+
+// Stealth Chromium: phantom Widevine presence for the EME surface.
+//
+// A stock Chromium build without the Widevine CDM rejects every
+// `requestMediaKeySystemAccess('com.widevine.alpha', ...)` query, which
+// contradicts a Chrome persona (real desktop Chrome always ships an L3 CDM)
+// and is a classic headless/bot tell. Detection code only probes *presence*
+// and never exercises a real license flow, so we register a phantom
+// Widevine key system (support query + config negotiation + a stub CDM)
+// without shipping or loading the proprietary CDM.
+//
+// The phantom reports a software-only (L3, HW_SECURE_* rejected) capability
+// set that mirrors what real Chrome answers for `com.widevine.alpha` at this
+// tag. If a real CDM is registered (side-loaded component), the phantom
+// stays dormant: KeySystemsImpl only injects it when the browser process
+// reported no Widevine key system info (see key_systems_impl.cc).
+//
+// Everything here is deterministic and seed-independent: the presence
+// ladder, not the values, is the fingerprint-relevant surface.
+
+namespace media::phantom_widevine {
+
+// Mirror of fingerprint::Enabled() (third_party/blink/public/common/
+// fingerprint/fingerprint.h), re-implemented locally because //media must
+// not depend on //third_party/blink/public/common. Keep the off-value list
+// in sync with that helper.
+inline bool Enabled() {
+  static const bool enabled = [] {
+    const base::CommandLine& cmd = *base::CommandLine::ForCurrentProcess();
+    if (!cmd.HasSwitch("fingerprint")) {
+      return false;
+    }
+    const std::string value =
+        base::ToLowerASCII(cmd.GetSwitchValueASCII("fingerprint"));
+    return value != "off" && value != "false" && value != "0" &&
+           value != "disable" && value != "disabled";
+  }();
+  return enabled;
+}
+
+// Whether the phantom key system is currently registered in this process.
+// Set by KeySystemsImpl whenever the browser process delivers a key system
+// update: true only when fingerprinting is enabled AND no real Widevine
+// info was reported. MojoCdmFactory reads this so that CDM creation defers
+// to a real CDM exactly when the support query did.
+inline bool IsRegistered() {
+  static std::atomic<bool> registered{false};
+  return registered.load(std::memory_order_relaxed);
+}
+
+inline void SetRegistered(bool registered) {
+  static std::atomic<bool> flag{false};
+  flag.store(registered, std::memory_order_relaxed);
+}
+
+// The genuine Widevine key system set at this tag is exactly
+// `com.widevine.alpha` (plus a Windows-only experiment sub key system we
+// deliberately do not mirror).
+inline bool IsPhantomKeySystem(const std::string& key_system) {
+  return key_system == kWidevineKeySystem;
+}
+
+// True when `createMediaKeys()` for `key_system` should produce the stub
+// CDM below instead of reaching the (absent) real CDM service.
+inline bool ShouldCreatePhantomCdm(const std::string& key_system) {
+  return Enabled() && IsRegistered() && IsPhantomKeySystem(key_system);
+}
+
+// KeySystemInfo describing a software-only Widevine CDM as reported by real
+// desktop Chrome: cenc/webm/keyids init data, the stock codec set (gated by
+// MimeUtil exactly like stock), SW_SECURE_* robustness, HW_SECURE_* and
+// other non-empty robustness values rejected, temporary and
+// persistent-license sessions, and always-enabled distinctive identifier /
+// persistent state (Chrome cannot block the Widevine CDM from either).
+class PhantomWidevineKeySystemInfo : public KeySystemInfo {
+ public:
+  std::string GetBaseKeySystemName() const final { return kWidevineKeySystem; }
+
+  bool IsSupportedInitDataType(EmeInitDataType init_data_type) const final {
+    return init_data_type == EmeInitDataType::CENC ||
+           init_data_type == EmeInitDataType::WEBM ||
+           init_data_type == EmeInitDataType::KEYIDS;
+  }
+
+  EmeConfig::Rule GetEncryptionSchemeConfigRule(
+      EncryptionScheme encryption_scheme) const final {
+    switch (encryption_scheme) {
+      case EncryptionScheme::kCenc:
+      case EncryptionScheme::kCbcs:
+        return EmeConfig::SupportedRule();
+      case EncryptionScheme::kUnencrypted:
+        break;
+    }
+    NOTREACHED();
+  }
+
+  SupportedCodecs GetSupportedCodecs() const final {
+    // Same codec universe as Clear Key: every combination is further gated
+    // by MimeUtil and the container/codec masks in KeySystemsImpl, so the
+    // accepted (container, codec) pairs match stock exactly.
+    return EME_CODEC_WEBM_ALL | EME_CODEC_MP4_ALL;
+  }
+
+  EmeConfig::Rule GetRobustnessConfigRule(
+      const std::string& key_system,
+      EmeMediaType media_type,
+      const std::string& requested_robustness,
+      const bool* hw_secure_requirement) const final {
+    if (requested_robustness.empty() ||
+        base::StartsWith(requested_robustness, "SW_SECURE_",
+                         base::CompareCase::SENSITIVE)) {
+      return EmeConfig::SupportedRule();
+    }
+    // Desktop L3 persona: no hardware-secure path.
+    return EmeConfig::UnsupportedRule();
+  }
+
+  EmeConfig::Rule GetPersistentLicenseSessionSupport() const final {
+    return EmeConfig::SupportedRule();
+  }
+
+  EmeFeatureSupport GetPersistentStateSupport() const final {
+    return EmeFeatureSupport::ALWAYS_ENABLED;
+  }
+
+  EmeFeatureSupport GetDistinctiveIdentifierSupport() const final {
+    return EmeFeatureSupport::ALWAYS_ENABLED;
+  }
+};
+
+// Stub CDM handed to the EME stack when ShouldCreatePhantomCdm() is true.
+// It resolves createMediaKeys() offline, resolves generateRequest() with a
+// session id, and then stalls forever: update()/message/key events never
+// complete, which is indistinguishable (short of an actual license flow)
+// from a real CDM waiting for a license server that never answers. Nothing
+// ever rejects or throws.
+class PhantomWidevineCdm : public ContentDecryptionModule {
+ public:
+  PhantomWidevineCdm(const SessionMessageCB& /*session_message_cb*/,
+                     const SessionClosedCB& session_closed_cb,
+                     const SessionKeysChangeCB& /*session_keys_change_cb*/,
+                     const SessionExpirationUpdateCB&
+                     /*session_expiration_update_cb*/)
+      : session_closed_cb_(session_closed_cb) {
+    // The message/keys/expiration callbacks are never fired: the phantom
+    // session produces no events after creation (see
+    // CreateSessionAndGenerateRequest).
+  }
+
+  void SetServerCertificate(const std::vector<uint8_t>& certificate,
+                            std::unique_ptr<SimpleCdmPromise> promise) final {
+    promise->resolve();
+  }
+
+  void GetStatusForPolicy(HdcpVersion min_hdcp_version,
+                          std::unique_ptr<KeyStatusCdmPromise> promise) final {
+    // Software-only persona: content protection above HDCP 1.4 reads as
+    // output-restricted, matching a display path without an HW-secure CDM.
+    promise->resolve(min_hdcp_version <= HdcpVersion::kHdcpVersion1_4
+                         ? CdmKeyInformation::USABLE
+                         : CdmKeyInformation::OUTPUT_RESTRICTED);
+  }
+
+  void CreateSessionAndGenerateRequest(
+      CdmSessionType session_type,
+      EmeInitDataType init_data_type,
+      const std::vector<uint8_t>& init_data,
+      std::unique_ptr<NewSessionCdmPromise> promise) final {
+    // Success, then silence: the session is created (the promise resolves
+    // with a session id) but no license request message is ever produced
+    // and no keys ever appear, so the session pends until it is closed or
+    // the document goes away -- the close approximation of a real CDM
+    // waiting on an unreachable license server that Chromium's EME stack
+    // permits without rejecting anything.
+    promise->resolve(NextSessionId());
+  }
+
+  void LoadSession(CdmSessionType session_type,
+                   const std::string& session_id,
+                   std::unique_ptr<NewSessionCdmPromise> promise) final {
+    // No persistent sessions were ever stored: "not found", not an error.
+    promise->resolve(std::string());
+  }
+
+  void UpdateSession(const std::string& session_id,
+                     const std::vector<uint8_t>& response,
+                     std::unique_ptr<SimpleCdmPromise> promise) final {
+    // Deliberately never resolved: a license response can never validate
+    // because no license request was ever issued.
+  }
+
+  void CloseSession(const std::string& session_id,
+                    std::unique_ptr<SimpleCdmPromise> promise) final {
+    promise->resolve();
+    session_closed_cb_.Run(session_id, CdmSessionClosedReason::kClose);
+  }
+
+  void RemoveSession(const std::string& session_id,
+                     std::unique_ptr<SimpleCdmPromise> promise) final {
+    promise->resolve();
+  }
+
+  CdmContext* GetCdmContext() final {
+    // No decryptor: actual encrypted playback is impossible without keys,
+    // which is exactly what a CDM without a license provides.
+    return nullptr;
+  }
+
+ private:
+  // Deterministic, seed-independent session ids (fixed 64-bit FNV counter,
+  // hex-encoded). Only the shape is observable; real Widevine session ids
+  // are opaque variable-length strings.
+  static std::string NextSessionId() {
+    static std::atomic<uint64_t> counter{0};
+    const uint64_t n = counter.fetch_add(1, std::memory_order_relaxed) + 1;
+    uint64_t hash = 0xcbf29ce484222325ULL;
+    for (int i = 0; i < 8; ++i) {
+      hash ^= (n >> (8 * i)) & 0xff;
+      hash *= 0x100000001b3ULL;
+    }
+    return base::HexEncode(&hash, sizeof(hash));
+  }
+
+  SessionClosedCB session_closed_cb_;
+};
+
+}  // namespace media::phantom_widevine
+
+#endif  // MEDIA_CDM_PHANTOM_WIDEVINE_H_
--- a/media/base/key_systems_impl.cc
+++ b/media/base/key_systems_impl.cc
@@ -22,7 +22,9 @@
 #include "media/base/media_switches.h"
 #include "media/base/mime_util.h"
 #include "media/cdm/clear_key_cdm_common.h"
+#include "media/cdm/phantom_widevine.h"
 #include "media/media_buildflags.h"
+#include "third_party/widevine/cdm/widevine_cdm_common.h"
 
 namespace media {
 
@@ -325,6 +327,29 @@
 
   is_updating_ = false;
 
+  // Stealth Chromium: inject the phantom Widevine key system when
+  // fingerprinting is enabled and the browser process reported no real
+  // Widevine info (no CDM component registered). This is the single choke
+  // point where renderer-side key system support is assembled, so support
+  // queries, config negotiation, and CDM creation all agree with it.
+  bool has_real_widevine = false;
+  for (const auto& info : key_systems) {
+    if (info->GetBaseKeySystemName() == kWidevineKeySystem ||
+        IsSubKeySystemOf(info->GetBaseKeySystemName(), kWidevineKeySystem)) {
+      has_real_widevine = true;
+      break;
+    }
+  }
+  const bool phantom_registered =
+      phantom_widevine::Enabled() && !has_real_widevine;
+  if (phantom_registered) {
+    key_systems.emplace_back(
+        std::make_unique<phantom_widevine::PhantomWidevineKeySystemInfo>());
+  }
+  // MojoCdmFactory consults this to keep createMediaKeys() coherent with
+  // the support answer above; a real CDM wins whenever one is registered.
+  phantom_widevine::SetRegistered(phantom_registered);
+
   // Clear Key is always supported.
   key_systems.emplace_back(std::make_unique<ClearKeyKeySystemInfo>());
 
--- a/media/mojo/clients/mojo_cdm_factory.cc
+++ b/media/mojo/clients/mojo_cdm_factory.cc
@@ -13,6 +13,7 @@
 #include "media/base/content_decryption_module.h"
 #include "media/base/key_systems.h"
 #include "media/cdm/aes_decryptor.h"
+#include "media/cdm/phantom_widevine.h"
 #include "media/mojo/clients/mojo_cdm.h"
 #include "media/mojo/mojom/content_decryption_module.mojom.h"
 #include "media/mojo/mojom/interface_factory.mojom.h"
@@ -86,6 +87,21 @@
     return;
   }
 
+  // Stealth Chromium: serve the phantom Widevine CDM locally (exactly like
+  // the AesDecryptor branch above) when the support query answered with the
+  // phantom and no real CDM exists. No CDM process is spawned and no library
+  // is loaded, so CDM host verification, interface-version checks, and
+  // CDM-load crash reporting are untouched.
+  if (phantom_widevine::ShouldCreatePhantomCdm(cdm_config.key_system)) {
+    auto cdm = base::MakeRefCounted<phantom_widevine::PhantomWidevineCdm>(
+        session_message_cb, session_closed_cb, session_keys_change_cb,
+        session_expiration_update_cb);
+    base::SingleThreadTaskRunner::GetCurrentDefault()->PostTask(
+        FROM_HERE, base::BindOnce(std::move(cdm_created_cb), cdm,
+                                  CreateCdmStatus::kSuccess));
+    return;
+  }
+
   // Use `mojo::WrapCallbackWithDefaultInvokeIfNotRun()` in case the CDM process
   // crashes.
   interface_factory_->CreateCdm(

Original source.

0044: Error-source fallback under CDP

A string-compiled timer can report an empty error-source URL when a CDP Runtime session changes how V8 captures its stack. With fingerprinting enabled, Blink now falls through to the ordinary document-URL fallback when that captured top-frame URL is empty. This targets the source reported through window.onerror; nonempty source URLs keep their existing path. It does not rewrite Error.stack or remove the debugging session.

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Stealth Chromium contributors
Date: Thu, 1 Jan 2026 00:00:00 +0000
Subject: [PATCH 0044] fingerprint: onerror source falls back to document URL under Runtime sessions
X-Spec: onerror source consistency
X-Files: third_party/blink/renderer/bindings/core/v8/capture_source_location.cc

---

--- a/third_party/blink/renderer/bindings/core/v8/capture_source_location.cc
+++ b/third_party/blink/renderer/bindings/core/v8/capture_source_location.cc
@@ -6,6 +6,7 @@
 
 #include <memory>
 
+#include "third_party/blink/public/common/fingerprint/fingerprint.h"
 #include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_core.h"
 #include "third_party/blink/renderer/core/dom/document.h"
 #include "third_party/blink/renderer/core/dom/scriptable_document_parser.h"
@@ -120,8 +121,22 @@
   }
 
   if ((!script_id || !line_number) && stack_trace && !stack_trace->isEmpty()) {
-    return SourceLocation::CreateFromNonEmptyV8StackTraceInternal(
-        std::move(stack_trace));
+    // Stealth Chromium: when a CDP Runtime agent is enabled, V8 captures an
+    // uncaught-exception message stack trace, so this early return is taken
+    // and a string-compiled script (e.g. setTimeout("...")) whose top frame
+    // has an empty source URL reaches window.onerror as
+    // event.filename === "" while without a session the empty script
+    // origin falls back to the document URL below. Fall through to that
+    // same resolution when the top frame URL is empty so both paths agree.
+    // Off-values keep the stock (session-dependent) behavior.
+    bool top_url_empty = true;
+    if (auto top_url = stack_trace->topSourceURL()) {
+      top_url_empty = top_url->string().length() == 0;
+    }
+    if (!(fingerprint::Enabled() && top_url_empty)) {
+      return SourceLocation::CreateFromNonEmptyV8StackTraceInternal(
+          std::move(stack_trace));
+    }
   }
 
   String url = ToCoreStringWithUndefinedOrNullCheck(

Original source.

0045: Pointer and hover media features

Blink’s shared media-value getters report a fine pointer with hover support for both primary-device and any-device queries while fingerprinting is enabled. CSS and matchMedia() therefore see a desktop mouse even when a headless host lists no pointing devices. These are fixed answers, independent of the seed. They do not create an input device, change pointer events, or adapt to a touch-oriented persona.

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Stealth Chromium contributors
Date: Thu, 1 Jan 2026 00:00:00 +0000
Subject: [PATCH 0045] fingerprint: persona pointer and hover media features
X-Spec: pointer hover persona
X-Files: third_party/blink/renderer/core/css/media_values.cc third_party/blink/renderer/core/fingerprint/pointer_hover.h

---

--- a/third_party/blink/renderer/core/css/media_values.cc
+++ b/third_party/blink/renderer/core/css/media_values.cc
@@ -16,6 +16,7 @@
 #include "third_party/blink/renderer/core/dom/document.h"
 #include "third_party/blink/renderer/core/dom/element.h"
 #include "third_party/blink/renderer/core/execution_context/execution_context.h"
+#include "third_party/blink/renderer/core/fingerprint/pointer_hover.h"
 #include "third_party/blink/renderer/core/fingerprint/screen_dimensions.h"
 #include "third_party/blink/renderer/core/frame/local_frame.h"
 #include "third_party/blink/renderer/core/frame/local_frame_view.h"
@@ -364,12 +365,21 @@
     LocalFrame* frame) {
   DCHECK(frame);
   DCHECK(frame->GetSettings());
+  // Stealth Chromium: persona answer before the (possibly empty) real
+  // device list — headless reports kPointerNone against a desktop persona.
+  if (auto t = fingerprint::SpoofedPrimaryPointerType()) {
+    return *t;
+  }
   return frame->GetSettings()->GetPrimaryPointerType();
 }
 
 int MediaValues::CalculateAvailablePointerTypes(LocalFrame* frame) {
   DCHECK(frame);
   DCHECK(frame->GetSettings());
+  // Stealth Chromium: fine mouse only (see fingerprint/pointer_hover.h).
+  if (auto t = fingerprint::SpoofedAvailablePointerTypes()) {
+    return *t;
+  }
   return frame->GetSettings()->GetAvailablePointerTypes();
 }
 
@@ -377,6 +387,10 @@
     LocalFrame* frame) {
   DCHECK(frame);
   DCHECK(frame->GetSettings());
+  // Stealth Chromium: desktop-with-mouse persona claims hover.
+  if (auto h = fingerprint::SpoofedPrimaryHoverType()) {
+    return *h;
+  }
   return frame->GetSettings()->GetPrimaryHoverType();
 }
 
@@ -390,6 +404,10 @@
 int MediaValues::CalculateAvailableHoverTypes(LocalFrame* frame) {
   DCHECK(frame);
   DCHECK(frame->GetSettings());
+  // Stealth Chromium: hover-capable mouse only (see pointer_hover.h).
+  if (auto h = fingerprint::SpoofedAvailableHoverTypes()) {
+    return *h;
+  }
   return frame->GetSettings()->GetAvailableHoverTypes();
 }
 
--- /dev/null
+++ b/third_party/blink/renderer/core/fingerprint/pointer_hover.h
@@ -0,0 +1,58 @@
+// Copyright 2026 The Stealth Chromium Authors
+// Use of this source code is governed by a GPLv3 license that can be
+// found in the LICENSE file of the Stealth Chromium distribution.
+
+#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_FINGERPRINT_POINTER_HOVER_H_
+#define THIRD_PARTY_BLINK_RENDERER_CORE_FINGERPRINT_POINTER_HOVER_H_
+
+#include <optional>
+
+#include "third_party/blink/public/common/fingerprint/fingerprint.h"
+#include "third_party/blink/public/mojom/webpreferences/web_preferences.mojom-blink-forward.h"
+#include "ui/base/pointer/pointer_device.h"
+
+// Pointer/hover media-feature persona shared by every MediaValues
+// implementation (core/css/media_values.cc), so matchMedia, CSS parsing
+// and style recalc cannot disagree.
+//
+// Headless containers report zero input devices: primary/any pointer
+// "none", no hover — an automation signal next to a desktop persona
+// (see the noPointingDevice botstop vector). When fingerprinting is
+// enabled every pointer/hover media feature answers as a desktop with
+// a mouse, coherently with maxTouchPoints 0 (stock) and the device
+// profile's screen dimensions. Deterministic constants: no seed
+// dependence. nullopt → caller falls back to the stock device answer.
+namespace blink::fingerprint {
+
+inline std::optional<mojom::blink::PointerType> SpoofedPrimaryPointerType() {
+  if (!Enabled()) {
+    return std::nullopt;
+  }
+  return mojom::blink::PointerType::kPointerFineType;
+}
+
+inline std::optional<int> SpoofedAvailablePointerTypes() {
+  if (!Enabled()) {
+    return std::nullopt;
+  }
+  // Fine mouse only: no coarse, no touch, and crucially no "none" bit.
+  return ui::POINTER_TYPE_FINE;
+}
+
+inline std::optional<mojom::blink::HoverType> SpoofedPrimaryHoverType() {
+  if (!Enabled()) {
+    return std::nullopt;
+  }
+  return mojom::blink::HoverType::kHoverHoverType;
+}
+
+inline std::optional<int> SpoofedAvailableHoverTypes() {
+  if (!Enabled()) {
+    return std::nullopt;
+  }
+  return ui::HOVER_TYPE_HOVER;
+}
+
+}  // namespace blink::fingerprint
+
+#endif  // THIRD_PARTY_BLINK_RENDERER_CORE_FINGERPRINT_POINTER_HOVER_H_

Original source.

0046: SwiftShader subpixel precision

SwiftShader’s rasterizer uses eight fractional bits for subpixel positions unconditionally, moving legacy builds from a 1/16-pixel grid to 1/256. This changes the coverage boundaries a rendering probe can inspect; nonlegacy builds already use eight bits. Unlike the persona getters, this is a compile-time change with no fingerprint-switch gate. It does not give software rendering a physical GPU’s performance or make all rendered output match hardware.

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Stealth Chromium contributors
Date: Thu, 1 Jan 2026 00:00:00 +0000
Subject: [PATCH 0046] fingerprint: swiftshader rasterizer snaps sub-pixel edges at 8 fractional bits
X-Spec: swiftshader subpixel precision
X-Files: third_party/swiftshader/src/Vulkan/VkConfig.hpp

---

--- a/third_party/swiftshader/src/Vulkan/VkConfig.hpp
+++ b/third_party/swiftshader/src/Vulkan/VkConfig.hpp
@@ -98,7 +98,12 @@
 
 constexpr int MAX_SAMPLER_ALLOCATION_COUNT = 4000;
 
-constexpr int SUBPIXEL_PRECISION_BITS = SWIFTSHADER_LEGACY_PRECISION ? 4 : 8;
+// Stealth Chromium: always rasterize at hardware-matching sub-pixel
+// precision (8 fractional bits, Apple/D3D rasterizer rules) even when built
+// with SWIFTSHADER_LEGACY_PRECISION=true, so coverage boundaries snap at
+// 1/256 px like hardware GPUs instead of 1/16 px. Wider fixed-point edge
+// functions cost a small amount of rasterizer-setup arithmetic.
+constexpr int SUBPIXEL_PRECISION_BITS = 8;
 constexpr float SUBPIXEL_PRECISION_FACTOR = static_cast<float>(1 << SUBPIXEL_PRECISION_BITS);
 constexpr int SUBPIXEL_PRECISION_MASK = 0xFFFFFFFF >> (32 - SUBPIXEL_PRECISION_BITS);
 

Original source.

Conclusion

Chromium source patches can change what a page sees, but keeping those answers consistent with the browser’s behavior is still the hard part. This series makes the changes inspectable, including the approximations and gaps. Passing a known probe says little about how the browser will fare against a different check.