Bind the native server to the LAN so the phone client can reach it
The native install hardcoded -addr 127.0.0.1, so the server was unreachable from
the phone: the emulator worked because it proxies to the host loopback, but a
real device could not connect even though ntfy (bound to 0.0.0.0:8090) worked.
The bind address is now a manifest setting (server_address() in manage.py, with
older manifests still defaulting to loopback) and setup-native.py records it,
defaulting to 0.0.0.0 like the Docker install did and offering
--bind-address 127.0.0.1 for a loopback-only server. An invalid address is
rejected, and setup prints the phone client URL.
Verified: scripts test suite 116 tests OK, and after reinstalling the server
listens on *:8080 and answers {"healthy":true} on 127.0.0.1, 10.0.0.75,
10.0.0.249 and the tailnet address.
This commit is contained in:
@@ -173,6 +173,7 @@ class SetupNativeTests(unittest.TestCase):
|
||||
self.assertEqual(config["format"], 1)
|
||||
self.assertEqual(config["prefix"], str(prefix.resolve()))
|
||||
self.assertEqual(config["server_port"], 8080)
|
||||
self.assertEqual(config["bind_address"], "0.0.0.0")
|
||||
self.assertEqual(config["ntfy"]["mode"], "native")
|
||||
self.assertEqual(config["topic"], "pipelines")
|
||||
self.assertEqual(config["opencode"], "/usr/bin/opencode")
|
||||
|
||||
Reference in New Issue
Block a user