mirror of
https://git.sanhost.net/sanasol/hytale-f2p
synced 2026-02-26 18:41:48 -03:00
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 <noreply@anthropic.com>
This commit is contained in:
@@ -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 };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user