mirror of
https://git.sanhost.net/sanasol/hytale-f2p.git
synced 2026-02-26 14:51:48 -03:00
v2.3.8: auto-update agent from GitHub releases, add dl1 mirror fallback
- Agent auto-update: check GitHub releases API for new versions, download only when update available, track version in .version file - Add dl1.htdwnldsan.top as backup-2 mirror in patches config sources - Add dl1.htdwnldsan.top as primary non-Cloudflare mirror - Graceful fallback: use existing agent if update check or download fails Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -7,16 +7,17 @@ const { getOS, getArch } = require('../utils/platformUtils');
|
||||
// Patches base URL fetched dynamically via multi-source fallback chain
|
||||
const AUTH_DOMAIN = process.env.HYTALE_AUTH_DOMAIN || 'auth.sanasol.ws';
|
||||
const PATCHES_CONFIG_SOURCES = [
|
||||
{ type: 'http', url: `https://${AUTH_DOMAIN}/api/patches-config`, name: 'auth-server' },
|
||||
{ type: 'http', url: 'https://htdwnldsan.top/patches-config', name: 'backup-http' },
|
||||
{ type: 'http', url: `https://${AUTH_DOMAIN}/api/patches-config`, name: 'primary' },
|
||||
{ type: 'http', url: 'https://htdwnldsan.top/patches-config', name: 'backup-1' },
|
||||
{ type: 'http', url: 'https://dl1.htdwnldsan.top/patches-config', name: 'backup-2' },
|
||||
{ type: 'doh', name: '_patches.htdwnldsan.top', name_label: 'dns-txt' },
|
||||
];
|
||||
const HARDCODED_FALLBACK = 'https://dl.vboro.de/patches';
|
||||
|
||||
// Non-Cloudflare mirrors for users where Cloudflare IPs are blocked (Russia, Ukraine, etc.)
|
||||
// These redirect to MEGA S3 which is not behind Cloudflare
|
||||
// Alternative mirrors (non-Cloudflare) for regions where CF is blocked
|
||||
const NON_CF_MIRRORS = [
|
||||
'https://htdwnldsan.top/patches', // Direct IP VPS → MEGA redirect
|
||||
'https://dl1.htdwnldsan.top',
|
||||
'https://htdwnldsan.top/patches',
|
||||
];
|
||||
|
||||
// Fallback: latest known build number if manifest is unreachable
|
||||
|
||||
Reference in New Issue
Block a user