feat(accounts): implement local login

Route login and character requests by their original host names on one
loopback port. Add local accounts, saves, and credential redaction.
This commit is contained in:
N0VAN0M4LY committed 2026-11-24 05:01:26 +08:00
1 parent c3914ec0d6
commit 7f482ae530
55 files changed
+1559 -58

No files matched your search

+8 -1
View File
@@ -5,7 +5,8 @@
* node packages/build/src/cli.ts --game <stock game folder> --out <game copy folder> --port <n>
* [--patches exe-patches] [--verbose]
*
* Writes <out>/char.vromfs.bin and <out>/win64/aces.exe. The stock folder is only read.
* Writes <out>/char.vromfs.bin, <out>/aces.vromfs.bin and <out>/win64/aces.exe. The stock
* folder is only read.
* The launcher will run the same steps at every launch, with the port the player chose.
*/
import { mkdirSync, readFileSync, writeFileSync } from 'node:fs';
@@ -14,6 +15,7 @@ import { parseArgs } from 'node:util';
import { rebuildCharPack } from './char-pack.ts';
import { patchExecutable } from './executable.ts';
import { assertWritableCopy, GAME_FILES } from './game-copy.ts';
import { rebuildMainPack } from './main-pack.ts';
import { localEndpoint } from './network/local-endpoint.ts';
function main(): number {
@@ -47,7 +49,12 @@ function main(): number {
for (const change of charPack.network.addresses) console.log(` ${change.path}: ${change.before} -> ${change.after}`);
}
const mainPack = rebuildMainPack(readFileSync(join(values.game, GAME_FILES.mainPack)), endpoint);
console.log(`settings.blk: ${mainPack.addresses.length} address(es) now point to ${endpoint.host}:${endpoint.port}`);
for (const change of mainPack.addresses) console.log(` ${change.path}: ${change.before} -> ${change.after}`);
writeOutput(values.out, GAME_FILES.charPack, charPack.pack);
writeOutput(values.out, GAME_FILES.mainPack, mainPack.pack);
writeOutput(values.out, GAME_FILES.executable, executable.executable);
return 0;
}