Add UDP discovery and heartbeat-miss notices to remchild

This commit is contained in:
Fisto
2026-09-22 19:31:19 +02:00
parent a7ab2a22f7
commit e38d7d07a2
4 changed files with 278 additions and 22 deletions
+8 -3
View File
@@ -26,10 +26,15 @@ node remchild/server/server.mjs --port 8799 --ips 192.168.1.5
./remchild/client/remchild --server 192.168.1.5:8799
```
The client asks for the address when `--server` is absent. It prints the assigned name, then
accepts `p` (ping test) and `q` (quit).
With no `--server`, the client probes for a server for five seconds: one answer connects
automatically, several show a pick list, none asks for `host:port`. `--server` skips discovery. It
prints the assigned name, then accepts `p` (ping test) and `q` (quit).
Non-LAN addresses in the allowlist need the launch argument:
If the server misses a heartbeat during the fast phases (the first few minutes), it sends a
`notice`; the client prints a warning that the connection may be unstable. Nothing else changes.
Discovery uses UDP 8798 (`--discovery-port`); `--beacon-ms 0` keeps probe replies but stops the
beacon. Non-LAN addresses in the allowlist need the launch argument:
```sh
node remchild/server/server.mjs --port 8799 --ips 203.0.113.7 --allow-non-lan