feat(relay): bind QUIC endpoint

Make the relay binary bind a real Quinn endpoint instead of only printing its
configuration. This is the next runtime step toward the public relay while still
keeping connection handling out of this commit.

The relay now builds a self-signed development TLS configuration, advertises the
lanparty ALPN, enables QUIC datagram buffers, binds the configured UDP address,
prints the actual local address, and waits for Ctrl-C before closing the
endpoint. The generated certificate is explicitly a development placeholder;
production certificate and client trust handling remain future work.

The rustls dependency is pinned to the ring provider to match Quinn's selected
crypto backend and avoid process-level provider ambiguity at runtime.

Test Plan:
- cargo fmt --check
- cargo test --workspace
- cargo clippy --workspace --all-targets -- -D warnings
- timeout 2s cargo run -p lanparty-relay -- --listen 127.0.0.1:0 || test $? -eq 124

Refs: PLAN.md public relay QUIC data path
Refs: https://docs.rs/quinn/0.11.9
This commit is contained in:
2026-05-21 17:38:56 +02:00
parent be9596c188
commit 77894c4706
7 changed files with 1380 additions and 13 deletions
+4 -1
View File
@@ -60,4 +60,7 @@ 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.
`443/udp`. The relay binds a QUIC endpoint and waits for shutdown, but
connection handling is not wired yet. It currently uses a generated self-signed
development certificate; production certificate and client trust handling remain
future work.