refactor(server): separate inventory, squadron, and web logic
Split inventory definition generation by category and select chest contents deterministically. Move squadron queries, membership, and lifecycle into focused modules and enforce role permissions. Serve store and marketplace pages as static files with shared web helpers. Share profile field readers and keep response encoding in the protocol modules. Restrict cloud settings to registered blocks. Type checking and the save CLI ran successfully. In-game acceptance is pending.
This commit is contained in:
1 parent
814ac9409e
commit
b68f321b84
44 files changed
+2793
-2433
No files matched your search
@@ -7,7 +7,7 @@ export { NETWORK_CONFIG_PATH, rebuildCharPack, type CharPackResult } from './cha
|
||||
export { patchExecutable, type ExecutableResult } from './executable.ts';
|
||||
export { assertWritableCopy, GAME_FILES } from './game-copy.ts';
|
||||
export { loadGuiPatches, rebuildGuiPack, type GuiPackResult, type GuiScriptPatch } from './gui-pack.ts';
|
||||
export { ENGINE_SETTINGS_PATH, EXTRA_STORE_BUNDLE_GUIDS, rebuildMainPack, type MainPackResult } from './main-pack.ts';
|
||||
export { ENGINE_SETTINGS_PATH, EXTRA_STORE_BUNDLE_GUID_MAP, EXTRA_STORE_BUNDLE_GUIDS, rebuildMainPack, type MainPackResult } from './main-pack.ts';
|
||||
export { redirectAddresses, type AddressChange } from './network/address-rewrite.ts';
|
||||
export { hostPort, localEndpoint, localUrl, type LocalEndpoint } from './network/local-endpoint.ts';
|
||||
export { redirectNetworkConfig, type NetworkRedirectReport } from './network/redirect-network-config.ts';
|
||||
@@ -32,6 +32,8 @@ export const EXTRA_STORE_BUNDLE_GUIDS: ReadonlyArray<readonly [entitlement: stri
|
||||
['wto_prem_180d', 'A1E00180-5754-4F46-8F00-000000000180'],
|
||||
];
|
||||
|
||||
export const EXTRA_STORE_BUNDLE_GUID_MAP: Readonly<Record<string, string>> = Object.fromEntries(EXTRA_STORE_BUNDLE_GUIDS);
|
||||
|
||||
export interface MainPackResult {
|
||||
readonly pack: Uint8Array;
|
||||
readonly addresses: readonly AddressChange[];
|
||||
|
||||
@@ -7,11 +7,12 @@
|
||||
* certain (https://auth.gaijinent.com/login.php); the others are matched by name to the
|
||||
* addresses in the executable's string table.
|
||||
*
|
||||
* The host-only keys (authHost, ssoHost, storeApiHost, authFallbackHost) are intentionally not
|
||||
* set: they replace only the host name and keep port 443, and turning the host into 127.0.0.1
|
||||
* would strip the original Host header and bypass wto_ws.dll's redirection. Leaving the Gaijin
|
||||
* host names in place lets wto_ws.dll resolve them to 127.0.0.2 and route their TLS connections
|
||||
* to the local service port with the original Host header intact.
|
||||
* The host-only keys (authHost, ssoHost, storeApiHost, authFallbackHost) and `fallbackIP` are
|
||||
* intentionally not set: the host keys replace only the host name while keeping port 443, and
|
||||
* `fallbackIP` (yu_init.cpp) substitutes a bare IP literal on port 443 when DNS fails — both
|
||||
* strip the original Host/SNI domain and bypass wto_ws.dll's DNS-based routing. Leaving the
|
||||
* Gaijin host names in place lets wto_ws.dll resolve them to 127.0.0.2 and route their TLS
|
||||
* connections to the local service port with the original Host and SNI intact.
|
||||
*/
|
||||
import { localUrl, type LocalEndpoint } from './local-endpoint.ts';
|
||||
|
||||
|
||||
Reference in new issue
Block a user