Additional tweaks

This commit is contained in:
2026-08-27 17:55:13 +01:00
parent d817b971e0
commit 12a1789e14
8 changed files with 196 additions and 94 deletions
+2
View File
@@ -51,6 +51,8 @@ The endpoint returns `{"queued":true}` only when the named device is connected a
Rex creates `~/.config/rex/server.toml` and `~/.config/rex/client.toml` on first use, with owner-only file permissions. Supply another path with `--config` immediately after `server` or `client`, for example `rex server --config /etc/rex/server.toml run`. If the selected configuration is absent, Rex prints a warning naming the missing role and suggesting the other one; this catches a common `rex server` versus `rex client` typo before it quietly creates the wrong template.
Both running roles watch their TOML every half second. A server policy change (keys, devices, blacklist, or rate limit) takes effect immediately and disconnects existing clients so they re-authenticate. Client changes cause it to reconnect and re-register its actions. This includes changes made by the management CLI. Connection failures are retried indefinitely with a capped 1-to-30-second backoff. A malformed or invalid update leaves the last valid configuration active and is retried until repaired. Listener addresses and TLS paths are read only when the server starts, so changing those still requires a server restart.
### Server (`server.toml`)
Copy [examples/server.toml](examples/server.toml). All fields are optional except fields within a `[[keys]]` record.