fix(gateway-cli): allow lan binding with trusted-proxy in CLI startup

There were TWO validations for lan binding without auth:
1. src/gateway/server-runtime-config.ts (FIXED in 563052d)
2. src/cli/gateway-cli/run.ts (THIS FIX)

The CLI startup validation was rejecting lan binding when using
trusted-proxy auth mode because it only checked for token/password.

This is the ACTUAL bug causing the crash loop - the CLI validation
runs before the runtime config validation, so it was failing first.

Fix: Add && resolvedAuthMode !== 'trusted-proxy' to the CLI check
on line 246, matching the fix in server-runtime-config.ts.
This commit is contained in:
Nick Taylor
2026-02-13 20:15:21 +00:00
committed by Peter Steinberger
parent a9f7069060
commit 57ae179bbc

View File

@@ -247,7 +247,7 @@ async function runGatewayCommand(opts: GatewayRunOpts) {
defaultRuntime.exit(1);
return;
}
if (bind !== "loopback" && !hasSharedSecret) {
if (bind !== "loopback" && !hasSharedSecret && resolvedAuthMode !== "trusted-proxy") {
defaultRuntime.error(
[
`Refusing to bind gateway to ${bind} without auth.`,