Simplify proxy routing and configuration

This commit is contained in:
2026-07-11 04:42:16 +03:00
parent efa46d1ee5
commit d3b7f0d613
22 changed files with 786 additions and 787 deletions

View File

@@ -43,3 +43,23 @@ test("client proxy range defaults to the single configured proxy port", async ()
},
);
});
test("client proxy defaults to 8082 when no port is configured", async () => {
await withEnv(
{
APP_MODE: "client",
PROXY_PORT: undefined,
CLIENT_PROXY_PORT_START: undefined,
CLIENT_PROXY_PORT_END: undefined,
},
async () => {
const { settings } = await import(
`../../src/server/config.js?client-default-port=${Date.now()}`
);
assert.equal(settings.proxyPort, 8082);
assert.equal(settings.clientProxyPortStart, 8082);
assert.equal(settings.clientProxyPortEnd, 8082);
},
);
});