mirror of
https://git.sanhost.net/sanasol/hytale-f2p.git
synced 2026-02-26 06:41:47 -03:00
v2.3.4: dynamic patches URL from auth server
Launcher now fetches patches base URL from /api/patches-config endpoint instead of using hardcoded domain. URL cached for 5 minutes, no fallback to hardcoded domain - requires auth server connection or cached URL. Enables instant CDN switching without launcher updates. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -85,8 +85,9 @@ async function downloadPWR(branch = 'release', fileName = 'v8', progressCallback
|
||||
console.log(`[DownloadPWR] Mirror URL: ${url}`);
|
||||
} catch (error) {
|
||||
console.error(`[DownloadPWR] Failed to get mirror URL: ${error.message}`);
|
||||
const { MIRROR_BASE_URL } = require('../services/versionManager');
|
||||
url = `${MIRROR_BASE_URL}/${osName}/${arch}/${branch}/0_to_${extractVersionNumber(fileName)}.pwr`;
|
||||
const { getPatchesBaseUrl } = require('../services/versionManager');
|
||||
const baseUrl = await getPatchesBaseUrl();
|
||||
url = `${baseUrl}/${osName}/${arch}/${branch}/0_to_${extractVersionNumber(fileName)}.pwr`;
|
||||
console.log(`[DownloadPWR] Fallback URL: ${url}`);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user