Слияние ui -> main #1
Reference in New Issue
Block a user
Delete Branch "ui"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
УРААА 1.1 РЕЛИЗ!!!!
- Add test_client.py with comprehensive client-server contract tests: - TestAuthFlowClient: full register → login → refresh → validate → /admin/me → logout lifecycle - TestPacksClientContract: /packs response fields matching ServerPack.java - TestPackManifestClientContract: /pack/{name} fields matching PackManifest.java - TestPackDiffClientContract: /pack/{name}/diff matching DiffResponse/FileInfo.java (all-new, no-changes, outdated-file, extra-local-file scenarios) - TestPackFileDownload: file serving, 404, path traversal security - TestPackPermissions: auth/pass requirements for /packs and /diff - TestLauncherVersion: /launcher/version endpoint - TestProxyEndpoints: /proxy/status, /proxy/fabric/versions/loader - Add logged_in_user_with_pass fixture (role=1) for pack-related tests - Add pack_fixture: creates temp pack with mod file, scans it, cleans up - Fix manifest test: files don't have 'url' field (only in diff response) - Fix /pack/{name} test: endpoint is public, no auth required Total: 67 tests passing (47 existing + 20 new)- Replace hardcoded Forge/NeoForge args with version.json parsing - Add VersionManifest.java — parses mainClass, arguments, libraries from JSON - Implement rule matching for OS-specific library/argument filtering - Build classpath dynamically from manifest libraries with fallback resolution - Resolve game args with variable substitution (${version_name}, ${game_directory}, etc.) - Auto-discover version.json path with multiple candidate formats - Support all Forge versions (1.12.2 through 1.21+) and NeoForge out of the box- Create versions/ folder structure for new format builds - Generate meta.json with SHA256 hashes for each file - Add endpoints: - GET /launcher/meta - list all versions with meta - GET /launcher/meta/{version} - meta for specific version - POST /launcher/diff - get diff between local and server files - GET /launcher/file/{version}/{path} - download individual file - GET /launcher/download/zip/{version} - download full ZIP for new install - Legacy builds (ZIP files) remain unchanged- Get server version from /launcher/meta (new method) - Scan local files and calculate SHA256 hashes - POST to /launcher/diff to get what files need update - Download only changed files via /launcher/file/{version}/{path} - Delete obsolete files - Fallback to ZIP/JAR if meta system fails - Works with legacy method as backupForge version.json uses -p ${classpath} to set the module path to the same argfile as the classpath. Previously we filtered net.minecraft:* libs from the classpath string, which meant they were absent from the module path too, causing ClassNotFoundException for PreparableReloadListener and other MC classes. Now net.minecraft:* libs are included in the Forge classpath argfile so securejarhandler can load them as modules.Forge manifest -p is 8 hardcoded bootstrap JARs using ${library_directory}, not ${classpath}. Intercepting it replaced those with ALL libraries causing duplicate module errors. Version jar stays on -cp only (not -p).Hang on close (JFX freezes on exit): - LaunchService: replace process.onExit().thenRun() — it completes on the common ForkJoinPool whose non-daemon workers keep the JVM alive (the v1.0.14.2 regression re-introduced in v1.0.14.3's sendBounded) — with a daemon watcher thread that blocks on process.waitFor(). Removes ForkJoinPool pinning. - JFXLauncher: HttpServer executor now uses daemon thread factory; installThread is daemon. - ZHttpClient: drop the non-daemon CachedThreadPool executor and restore synchronous client.send() with request-level timeout, undoing the v1.0.14.3 sendAsync().get() that submitted work to a non-daemon pool. Hang / no game launch (Forge/NeoForge): - LaunchCommandBuilder: remove the self-invented -DlegacyClassPath injection. Modern Forge derives the MC-BOOTSTRAP layer from the module path / the ${classpath} substitution that AstralRinth and the 1.0.13 launcher use; a redundant -DlegacyClassPath duplicated every library and broke the bootstrap. Now relies solely on ${classpath} substitution from version.json (only built when referenced by the version.json). - update LaunchCommandBuilderTest to assert the corrected contract (no -DlegacyClassPath, ${classpath} substituted into -p). Version bump to new revision (hotfix=0): revision 1.0.14 -> 1.0.15. Build: mvn -pl launcher package -> ZernMC-win-1.0.15.0.zip, build.version=1.0.15.0. Signed-off-by: SashegDev <gdsasheg@gmail.com>- add DomainSelector: probe every API candidate at launcher startup, pick fastest reachable (primary api.zern.cc, legacy .ru/.online, geo pl/swe); integrate into CLI start and JFX network init - Config.setServerUrl() + persist chosen domain in launcher.properties - ZHttpClient: default BASE_URL and ZERN_SERVER health-check follow the selected domain (runtime failover instead of hardcoded api.zernmc.ru) - server: LAUNCHER_MIRRORS main=api.zern.cc (primary), legacy .ru/.online, geo-pl api.pl.zern.cc, geo-swe api.swe.zern.cc; /launcher/mirrors exposes them - diag: check all TLD+geo API hosts (api.{pl,ru,swe}.zern.cc, .ru, .online) for DNS/TCP/HTTP, known server IPs for all 4 geo nodes - reverse-proxy geo boxes (pl, swe) -> main:1582 so clients bypass TSPU via an unblocked SNI; ru left as-is (VLESS VPN box, not proxying API)- serve new launcher landing site (zern.cc root -> launcher server 1582) - static assets mounted at /css /js /img - port GET/HEAD /skin/{filename} from old site with identical headers - exempt /skin/* + site assets from rate-limit and cache middleware - Caddy: root domains -> 1582, old site preserved at legacy.zernmc.*