From 225bc662b3305c4b504283b0892e17ffb780a686 Mon Sep 17 00:00:00 2001 From: sanasol Date: Tue, 27 Jan 2026 06:06:00 +0100 Subject: [PATCH] fix: Minimal patching mode - only essential auth patches Reduced patches from 6 to 3: - Skip sentry (not needed for auth) - Skip tools (not needed for auth) - Skip telemetry (not needed for auth) - Keep: domain, sessions, account-data Fewer patches = less chance of triggering race condition. Co-Authored-By: Claude Opus 4.5 --- backend/utils/clientPatcher.js | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/backend/utils/clientPatcher.js b/backend/utils/clientPatcher.js index e750d9b..3631777 100644 --- a/backend/utils/clientPatcher.js +++ b/backend/utils/clientPatcher.js @@ -231,22 +231,11 @@ class ClientPatcher { console.log(` Patching strategy: ${strategy.description}`); - // 1. Patch telemetry/sentry URL - const oldSentry = 'https://ca900df42fcf57d4dd8401a86ddd7da2@sentry.hytale.com/2'; - const newSentry = `${protocol}t@${domain}/2`; + // MINIMAL PATCHING MODE - only patch what's essential for auth + // Skip sentry (not needed for auth) + console.log(` Skipping sentry patch (minimal mode)`); - const sentryResult = this.replaceBytes( - result, - this.stringToLengthPrefixed(oldSentry), - this.stringToLengthPrefixed(newSentry) - ); - result = sentryResult.buffer; - if (sentryResult.count > 0) { - console.log(` Patched ${sentryResult.count} sentry URL(s)`); - totalCount += sentryResult.count; - } - - // 2. Patch main domain (hytale.com -> mainDomain) + // 1. Patch main domain (hytale.com -> mainDomain) - ESSENTIAL const domainResult = this.replaceBytes( result, this.stringToLengthPrefixed(ORIGINAL_DOMAIN), @@ -258,11 +247,11 @@ class ClientPatcher { totalCount += domainResult.count; } - // 3. Patch subdomain prefixes - const subdomains = ['https://tools.', 'https://sessions.', 'https://account-data.', 'https://telemetry.']; + // 2. Only patch sessions (essential for auth) - skip tools/telemetry + const essentialSubdomains = ['https://sessions.', 'https://account-data.']; const newSubdomainPrefix = protocol + strategy.subdomainPrefix; - for (const sub of subdomains) { + for (const sub of essentialSubdomains) { const subResult = this.replaceBytes( result, this.stringToLengthPrefixed(sub), @@ -274,6 +263,7 @@ class ClientPatcher { totalCount += subResult.count; } } + console.log(` Skipping tools/telemetry patches (minimal mode)`); return { buffer: result, count: totalCount }; }