feat(relay): add runtime CLI config

Replace the placeholder relay binary with a typed command-line configuration
entry point. This gives the future QUIC server loop the listen endpoint and room
limit configuration it needs without mixing command parsing into networking or
room-state code.

The relay now accepts --listen as either a socket address or an explicit UDP
shorthand such as 443/udp, defaults to 0.0.0.0:443/udp, and validates that the
per-room client limit is positive. The binary currently reports the parsed
configuration and clearly states that the QUIC server loop is not wired yet, so
this commit does not pretend to provide a working relay.

Test Plan:
- cargo fmt --check
- cargo test --workspace
- cargo clippy --workspace --all-targets -- -D warnings
- cargo run -p lanparty-relay -- --listen 443/udp

Refs: PLAN.md public relay --listen requirement
This commit is contained in:
2026-05-21 17:32:47 +02:00
parent b3d1a9c046
commit be9596c188
7 changed files with 380 additions and 2 deletions
+9
View File
@@ -52,3 +52,12 @@ Public relay binary and relay-owned room state:
```bash
cargo check --workspace
```
## Relay
```bash
cargo run -p lanparty-relay -- --listen 443/udp
```
`--listen` accepts either a socket address or a UDP port shorthand such as
`443/udp`. The relay QUIC server loop is not wired yet.