From e2e874197458553258f62ec377370a89d0439e0a Mon Sep 17 00:00:00 2001 From: ddidderr Date: Fri, 22 May 2026 09:15:31 +0200 Subject: [PATCH] fix(relay): print development cert path The manual MVP run depends on copying the generated development certificate from the relay host to both the gateway and Windows client. The relay already wrote the file, but the startup log only said that the relay was listening. Print the configured development certificate path after a successful bind/write and align TESTING.md's expected relay output with that line. This gives the tester an explicit file path to copy before starting the gateway and client. Test Plan: - cargo fmt --check - cargo test -p lanparty-relay - timeout 2s cargo run -q -p lanparty-relay -- --listen 127.0.0.1:0 --dev-cert-der-out - cargo test --workspace - cargo clippy --workspace --all-targets -- -D warnings Refs: MVP relay certificate handoff --- TESTING.md | 1 + crates/lanparty-relay/src/main.rs | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/TESTING.md b/TESTING.md index 85baeac..d514756 100644 --- a/TESTING.md +++ b/TESTING.md @@ -155,6 +155,7 @@ Expected relay output: ```text lanparty-relay configured for 0.0.0.0:8443/udp ... +lanparty-relay wrote development certificate to relay-cert.der lanparty-relay listening on 0.0.0.0:8443 ``` diff --git a/crates/lanparty-relay/src/main.rs b/crates/lanparty-relay/src/main.rs index 0150daf..f568e6d 100644 --- a/crates/lanparty-relay/src/main.rs +++ b/crates/lanparty-relay/src/main.rs @@ -14,6 +14,12 @@ async fn run(config: RelayConfig) -> anyhow::Result<()> { config.max_clients_per_room() ); let server = RelayServer::bind(&config)?; + if let Some(path) = config.dev_cert_der_out() { + println!( + "lanparty-relay wrote development certificate to {}", + path.display() + ); + } println!("lanparty-relay listening on {}", server.local_addr()?); server.run_until_shutdown().await }