Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ index 608bea5cb3..3f0bf7c03f 100644
- if (base::CommandLine::ForCurrentProcess()->HasSwitch(kHeadless)) {
- product.insert(0, "Headless");
- }
+ // TILION patch #2: never prepend "Headless" to the product. Under --headless the
+ // FORTRESS patch #2: never prepend "Headless" to the product. Under --headless the
+ // stock code makes the UA "HeadlessChrome/...", a blatant automation tell. We keep
+ // it as real "Chrome/...".

Expand All @@ -19,7 +19,7 @@ index 608bea5cb3..3f0bf7c03f 100644
}

std::string GetUnifiedPlatform() {
+ // TILION: persona OS token for the (reduced) UA string. Fixes the C1 instant-flag
+ // FORTRESS: persona OS token for the (reduced) UA string. Fixes the C1 instant-flag
+ // where navigator.userAgent said Linux while platform/Sec-CH-UA-Platform said
+ // Windows. Browser-process read; control plane passes the full unified form,
+ // e.g. "Windows NT 10.0; Win64; x64". Must agree with --uxr-platform/-ua-platform.
Expand All @@ -38,12 +38,12 @@ index 608bea5cb3..3f0bf7c03f 100644
if (brand) {
brand_version_list.emplace_back(brand.value(), version);
}
+ // TILION Layer 2: add a "Google Chrome" brand for a Chrome persona (we build
+ // FORTRESS Layer 2: add a "Google Chrome" brand for a Chrome persona (we build
+ // Chromium, so the official brand is absent). Closes the brand-list incoherence
+ // (UA says Chrome, brands said Chromium). Browser-process read, no whitelist.
+ {
+ const base::CommandLine* p_cmd = base::CommandLine::ForCurrentProcess();
+ // TILION: default to the "Google Chrome" brand (overridable). A stealth fork
+ // FORTRESS: default to the "Google Chrome" brand (overridable). A stealth fork
+ // must never advertise "Chromium"-only brands = a repackaged-Chromium signal.
+ std::string p_brand = p_cmd->HasSwitch("uxr-ua-brand")
+ ? p_cmd->GetSwitchValueASCII("uxr-ua-brand")
Expand All @@ -60,7 +60,7 @@ index 608bea5cb3..3f0bf7c03f 100644
}

std::string GetPlatformForUAMetadata() {
+ // TILION: persona-driven Sec-CH-UA-Platform (must match navigator.platform OS).
+ // FORTRESS: persona-driven Sec-CH-UA-Platform (must match navigator.platform OS).
+ {
+ const base::CommandLine* cmd = base::CommandLine::ForCurrentProcess();
+ if (cmd->HasSwitch("uxr-ua-platform"))
Expand All @@ -73,7 +73,7 @@ index 608bea5cb3..3f0bf7c03f 100644
metadata.bitness = GetCpuBitness();
metadata.wow64 = IsWoW64();
metadata.platform_version = GetPlatformVersion();
+ // TILION Layer 2: high-entropy Client Hints persona via cmdline (browser-process,
+ // FORTRESS Layer 2: high-entropy Client Hints persona via cmdline (browser-process,
+ // no renderer whitelist needed). Keeps userAgentData high-entropy values coherent
+ // with the UA string + Sec-CH-UA (coherence rule C15).
+ {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ index 4c144f58e7..24acc0ba0d 100644
// Propagate the following switches to the renderer command line (along
// with any associated values) if present in the browser command line.
static const char* const kSwitchNames[] = {
+ // TILION Layer 2: propagate persona switches to the renderer so renderer-side
+ // FORTRESS Layer 2: propagate persona switches to the renderer so renderer-side
+ // getters (navigator.*, WebGL) can read them. Web-undetectable: pages cannot
+ // read /proc/cmdline, and the host is ours.
switches::kDisableInProcessStackTraces,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ index aa3d9236fd..177c17bd88 100644
}

+namespace {
+// TILION: seeded sub-pixel DOMRect jitter. Single chokepoint Element::ClientQuads
+// FORTRESS: seeded sub-pixel DOMRect jitter. Single chokepoint Element::ClientQuads
+// covers getClientRects + getBoundingClientRect (both derive from these quads), so
+// it is coherent by construction. <0.01px = invisible; stable per element+seed.
+void UxrJitterQuads(Vector<gfx::QuadF>& quads) {
+ uint32_t p_seed = 0u;
+ // TILION P1-F/P2-C: fail-closed (no golden-constant), and key jitter on each
+ // FORTRESS P1-F/P2-C: fail-closed (no golden-constant), and key jitter on each
+ // corner offset RELATIVE to p1 (scroll-invariant) so width/height stay constant
+ // across scroll/transform while still being noised and stable per element shape.
+ if (!base::StringToUint(
Expand Down Expand Up @@ -57,7 +57,7 @@ index aa3d9236fd..177c17bd88 100644
if (element_layout_object->IsBoxModelObject() ||
element_layout_object->IsBR()) {
element_layout_object->AbsoluteQuads(quads);
+ UxrJitterQuads(quads); // TILION
+ UxrJitterQuads(quads); // FORTRESS
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ index cccfafe8f9..9fe22fe44c 100644

#include "third_party/blink/renderer/core/execution_context/navigator_base.h"

+#include "base/command_line.h" // TILION
+#include "base/command_line.h" // FORTRESS
+#include "base/uxr_config.h" // UXR persona via IPC
#include "base/feature_list.h"
#include "build/build_config.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ index 3761d36b53..b39e4bd028 100644
if (!GetFrame())
return 0;

+ { // TILION: persona outer height (fixes outerHeight===innerHeight headless tell)
+ { // FORTRESS: persona outer height (fixes outerHeight===innerHeight headless tell)
+ int p_v = 0;
+ if (base::UxrConfig::GetInstance().GetInt("uxr-outer-height", &p_v) && p_v > 0)
+ return p_v;
Expand All @@ -28,7 +28,7 @@ index 3761d36b53..b39e4bd028 100644
if (!GetFrame())
return 0;

+ { // TILION: persona outer width
+ { // FORTRESS: persona outer width
+ int p_v = 0;
+ if (base::UxrConfig::GetInstance().GetInt("uxr-outer-width", &p_v) && p_v > 0)
+ return p_v;
Expand All @@ -41,7 +41,7 @@ index 3761d36b53..b39e4bd028 100644
if (!GetFrame())
return 0.0;

+ if (base::UxrConfig::GetInstance().Has("uxr-device-pixel-ratio")) { // TILION
+ if (base::UxrConfig::GetInstance().Has("uxr-device-pixel-ratio")) { // FORTRESS
+ double p_dpr = 0.0;
+ if (base::StringToDouble(
+ base::UxrConfig::GetInstance().Get("uxr-device-pixel-ratio"), &p_dpr) &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ index 583f05f8dd..0c9e855d22 100644
- bool automation_enabled = false;
- probe::ApplyAutomationOverride(GetExecutionContext(), automation_enabled);
- return automation_enabled;
+ // TILION patch #1 — navigator.webdriver is always false, returned natively
+ // FORTRESS patch #1 — navigator.webdriver is always false, returned natively
+ // from C++. No JS getter/descriptor/toString tell exists for a page to detect,
+ // and it ignores the CDP ApplyAutomationOverride path (which can flip it true).
+ return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ index f5c0db2d1b..2ce917a9c4 100644

#include "base/system/sys_info.h"

+#include <cstdlib> // TILION
+#include "base/command_line.h" // TILION
+#include <cstdlib> // FORTRESS
+#include "base/command_line.h" // FORTRESS
+#include "base/uxr_config.h"
+#include "base/strings/string_number_conversions.h"
+
namespace blink {

unsigned NavigatorConcurrentHardware::hardwareConcurrency() const {
+ // TILION Layer 2: persona-driven via renderer cmdline switch.
+ // FORTRESS Layer 2: persona-driven via renderer cmdline switch.
+ if (base::UxrConfig::GetInstance().Has("uxr-hw-concurrency")) {
+ int v = 0; // TILION P1-A: StringToInt + clamp [1,128]
+ int v = 0; // FORTRESS P1-A: StringToInt + clamp [1,128]
+ if (base::StringToInt(
+ base::UxrConfig::GetInstance().Get("uxr-hw-concurrency"), &v) &&
+ v > 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ index 05fa33e456..1bb8ec68e9 100644
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h"

+#include <cmath> // TILION
+#include <cstdlib> // TILION
+#include "base/command_line.h" // TILION
+#include "base/strings/string_number_conversions.h" // TILION
+#include <cmath> // FORTRESS
+#include <cstdlib> // FORTRESS
+#include "base/command_line.h" // FORTRESS
+#include "base/strings/string_number_conversions.h" // FORTRESS
+#include "base/uxr_config.h"
+
namespace blink {

float NavigatorDeviceMemory::deviceMemory() const {
+ // TILION Layer 2: persona-driven via renderer cmdline switch.
+ // FORTRESS Layer 2: persona-driven via renderer cmdline switch.
+ double v = 0.0;
+ // TILION P1-A: StringToDouble + snap to the web-exposed buckets {0.25..8}.
+ // FORTRESS P1-A: StringToDouble + snap to the web-exposed buckets {0.25..8}.
+ if (base::StringToDouble(
+ base::UxrConfig::GetInstance().Get("uxr-device-memory"), &v) &&
+ v > 0.0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ index 22243ebf5e..30e78e0130 100644

#include "third_party/blink/renderer/core/frame/navigator_id.h"

+#include "base/command_line.h" // TILION: persona via renderer cmdline switches
+#include "base/command_line.h" // FORTRESS: persona via renderer cmdline switches
+#include "base/uxr_config.h"
+
#include "base/feature_list.h"
Expand All @@ -16,7 +16,7 @@ index 22243ebf5e..30e78e0130 100644
}

String NavigatorID::platform() const {
+ // TILION Layer 2: persona-driven via renderer cmdline switch (whitelisted in
+ // FORTRESS Layer 2: persona-driven via renderer cmdline switch (whitelisted in
+ // render_process_host_impl.cc). Web-undetectable.
+ {
+ if (base::UxrConfig::GetInstance().Has("uxr-platform"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ index 75cd346131..376dece63a 100644
}

void NavigatorLanguage::EnsureUpdatedLanguage() {
+ // TILION Layer 2: persona languages (navigator.languages/language), coherent with
+ // FORTRESS Layer 2: persona languages (navigator.languages/language), coherent with
+ // timezone+locale (rule C5). Control plane should set the Accept-Language HEADER to
+ // match (browser-process). Comma-separated, e.g. "en-US,en".
+ {
Expand All @@ -27,9 +27,9 @@ index 75cd346131..376dece63a 100644
+ if (!p_langs.empty()) {
+ languages_ = ParseAndSanitize(p_langs);
+ languages_dirty_ = false;
+ // TILION: align ICU default locale + flush V8 so Intl/toLocaleString follow
+ // FORTRESS: align ICU default locale + flush V8 so Intl/toLocaleString follow
+ // the persona language (C5). The notification clears V8 cached Intl locale.
+ // TILION P0-E fix: icu::Locale::setDefault is process-global and NOT
+ // FORTRESS P0-E fix: icu::Locale::setDefault is process-global and NOT
+ // thread-safe; only touch it on the main thread (workers would race).
+ if (!languages_.empty() && IsMainThread()) {
+ base::i18n::SetICUDefaultLocale(languages_.front().Utf8());
Expand Down
20 changes: 10 additions & 10 deletions patches/0018-third_party-blink-renderer-core-frame-screen-cc.patch
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ index 69ffc2b05f..03722c03d7 100644
#include "third_party/blink/renderer/core/frame/screen.h"

#include "base/numerics/safe_conversions.h"
+#include "base/command_line.h" // TILION
+#include "base/command_line.h" // FORTRESS
+#include "base/uxr_config.h"
+#include "base/strings/string_number_conversions.h" // TILION
+#include "base/strings/string_number_conversions.h" // FORTRESS
#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/frame/local_dom_window.h"
Expand All @@ -17,7 +17,7 @@ index 69ffc2b05f..03722c03d7 100644
namespace blink {

+namespace {
+// TILION Layer 2: persona screen metrics via cmdline (avoid headless 800x600 default;
+// FORTRESS Layer 2: persona screen metrics via cmdline (avoid headless 800x600 default;
+// avail* fall back to screen dims so setting just width/height stays coherent).
+bool UxrScreenInt(const char* sw, int* out) {
+ if (!base::UxrConfig::GetInstance().Has(sw)) {
Expand All @@ -40,22 +40,22 @@ index 69ffc2b05f..03722c03d7 100644
int Screen::height() const {
if (!DomWindow())
return 0;
+ int p; if (UxrScreenInt("uxr-screen-height", &p)) return p; // TILION
+ int p; if (UxrScreenInt("uxr-screen-height", &p)) return p; // FORTRESS
return GetRect(/*available=*/false).height();
}

int Screen::width() const {
if (!DomWindow())
return 0;
+ int p; if (UxrScreenInt("uxr-screen-width", &p)) return p; // TILION
+ int p; if (UxrScreenInt("uxr-screen-width", &p)) return p; // FORTRESS
return GetRect(/*available=*/false).width();
}

@@ -100,6 +122,8 @@ unsigned Screen::colorDepth() const {
if (!DomWindow()) {
return unknown_color_depth;
}
+ int p; if (UxrScreenInt("uxr-screen-color-depth", &p)) // TILION
+ int p; if (UxrScreenInt("uxr-screen-color-depth", &p)) // FORTRESS
+ return base::saturated_cast<unsigned>(p);
return GetScreenInfo().depth == 0
? unknown_color_depth
Expand All @@ -65,8 +65,8 @@ index 69ffc2b05f..03722c03d7 100644
if (!DomWindow())
return 0;
+ int p;
+ if (UxrScreenInt("uxr-screen-avail-height", &p)) return p; // TILION
+ if (UxrScreenInt("uxr-screen-height", &p)) // TILION: taskbar-aware avail
+ if (UxrScreenInt("uxr-screen-avail-height", &p)) return p; // FORTRESS
+ if (UxrScreenInt("uxr-screen-height", &p)) // FORTRESS: taskbar-aware avail
+ return p > 48 ? p - 48 : p;
return GetRect(/*available=*/true).height();
}
Expand All @@ -75,8 +75,8 @@ index 69ffc2b05f..03722c03d7 100644
if (!DomWindow())
return 0;
+ int p;
+ if (UxrScreenInt("uxr-screen-avail-width", &p)) return p; // TILION
+ if (UxrScreenInt("uxr-screen-width", &p)) return p; // TILION
+ if (UxrScreenInt("uxr-screen-avail-width", &p)) return p; // FORTRESS
+ if (UxrScreenInt("uxr-screen-width", &p)) return p; // FORTRESS
return GetRect(/*available=*/true).width();
}

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ index 48eb8d2fbd..b73b598f86 100644

#include "third_party/blink/renderer/core/timezone/timezone_controller.h"

+#include "base/command_line.h" // TILION
+#include "base/command_line.h" // FORTRESS
+#include "base/uxr_config.h"
#include "base/feature_list.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
Expand All @@ -15,7 +15,7 @@ index 48eb8d2fbd..b73b598f86 100644

base::AutoLock locker(instance().lock_);

+ // TILION Layer 2: pin the persona timezone. The browser TimeZoneMonitor pushes
+ // FORTRESS Layer 2: pin the persona timezone. The browser TimeZoneMonitor pushes
+ // the HOST tz here; substituting the persona lets the configured choice (tz
+ // matched to the proxy IP, rule C4) survive. This runs with the isolate present,
+ // so SetIcuTimeZoneAndNotifyV8 flushes V8 (the notification an early hook lacks).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ index d14c4a8f27..deea61d3ce 100644
// found in the LICENSE file.

+#ifdef UNSAFE_BUFFERS_BUILD
+#pragma allow_unsafe_buffers // TILION: raw-pixel canvas-noise loop
+#pragma allow_unsafe_buffers // FORTRESS: raw-pixel canvas-noise loop
+#endif
+
#include "third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.h"

+#include <cstdlib> // TILION
+#include "base/command_line.h" // TILION
+#include "base/strings/string_number_conversions.h" // TILION
+#include <cstdlib> // FORTRESS
+#include "base/command_line.h" // FORTRESS
+#include "base/strings/string_number_conversions.h" // FORTRESS
+#include "base/uxr_config.h"
+
#include <cmath>
Expand All @@ -24,11 +24,11 @@ index d14c4a8f27..deea61d3ce 100644
}
}

+ // TILION: seeded per-session canvas noise (+-1 on RGB, keyed to pixel pos).
+ // FORTRESS: seeded per-session canvas noise (+-1 on RGB, keyed to pixel pos).
+ // Defeats canvas fingerprinting; same seed -> same noise (per-session stable).
+ if (image_data) {
+ uint32_t ph_seed = 0u;
+ // TILION canvas noise (audit P0-G/I/J + P2-C): unified StringToUint parse,
+ // FORTRESS canvas noise (audit P0-G/I/J + P2-C): unified StringToUint parse,
+ // FAIL-CLOSED on invalid/zero (no golden-constant fingerprint), value-dependent
+ // + per-channel (defeats the 2025 flat-field pixel-recovery), 8-bit-only.
+ if (base::StringToUint(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ index e2b697b768..98161f2604 100644
switch (result->status) {
- case mojom::blink::GetKeyboardLayoutMapStatus::kSuccess:
+ case mojom::blink::GetKeyboardLayoutMapStatus::kSuccess: {
+ // TILION: inject a coherent en-US layout when the OS map is empty (headless
+ // FORTRESS: inject a coherent en-US layout when the OS map is empty (headless
+ // getLayoutMap()=={} is a sleeper tell leaking OS-locale absence).
+ if (base::UxrConfig::GetInstance().Has("uxr-keyboard-layout")) {
+ HashMap<String, String> p_map;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ index b74ee0e251..16a0c91e09 100644
}
}

+ // TILION: inject a coherent desktop device set when the real enumeration is
+ // FORTRESS: inject a coherent desktop device set when the real enumeration is
+ // empty (headless reports 0 devices = a strong tell). Pre-permission shape:
+ // empty deviceId/label/groupId; input kinds use InputDeviceInfo.
+ if (media_devices.empty() &&
+ base::UxrConfig::GetInstance().Has("uxr-media-devices")) {
+ std::string p_spec = base::UxrConfig::GetInstance().Get("uxr-media-devices");
+ // TILION P0-L: push in mojom enum order audioinput(0)->videoinput(1)->audiooutput(2).
+ // FORTRESS P0-L: push in mojom enum order audioinput(0)->videoinput(1)->audiooutput(2).
+ media_devices.push_back(MakeGarbageCollected<InputDeviceInfo>(
+ g_empty_string, g_empty_string, g_empty_string,
+ mojom::blink::MediaDeviceType::kMediaAudioInput));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ index 976a3c8c36..bdb554eb59 100644

uint32_t NetworkInformation::rtt() {
MaybeShowWebHoldbackConsoleMsg();
+ { // TILION: persona network rtt (avoid rtt==0 headless tell)
+ { // FORTRESS: persona network rtt (avoid rtt==0 headless tell)
+ int p_v = 0;
+ if (base::UxrConfig::GetInstance().GetInt("uxr-net-rtt", &p_v) && p_v >= 0)
+ return GetNetworkStateNotifier().RoundRtt( // TILION P0-M: 50ms buckets
+ return GetNetworkStateNotifier().RoundRtt( // FORTRESS P0-M: 50ms buckets
+ Host(), base::Milliseconds(p_v));
+ }
std::optional<base::TimeDelta> override_rtt =
Expand All @@ -28,12 +28,12 @@ index 976a3c8c36..bdb554eb59 100644

double NetworkInformation::downlink() {
MaybeShowWebHoldbackConsoleMsg();
+ if (base::UxrConfig::GetInstance().Has("uxr-net-downlink")) { // TILION
+ if (base::UxrConfig::GetInstance().Has("uxr-net-downlink")) { // FORTRESS
+ double p_d = 0.0;
+ if (base::StringToDouble(
+ base::UxrConfig::GetInstance().Get("uxr-net-downlink"), &p_d) &&
+ p_d >= 0.0) {
+ return GetNetworkStateNotifier().RoundMbps(Host(), p_d); // TILION P0-M
+ return GetNetworkStateNotifier().RoundMbps(Host(), p_d); // FORTRESS P0-M
+ }
+ }
std::optional<double> override_downlink_mbps =
Expand Down
Loading
Loading