feat(net): accept relay hostnames
PLAN.md describes the first client flow as entering a relay domain and room code, but the client and gateway CLIs only accepted socket-address literals. Add a small shared RelayEndpoint parser so bare hosts default to UDP/443 while IP literals and explicit host:port values stay supported. The runtime configs still store resolved SocketAddr values. That keeps the Windows route-pinning path on a concrete relay IP before TAP activation while avoiding duplicated endpoint grammar between client and gateway. The relay listen config reuses the same default port constant so UDP/443 has one source. README examples now use lanparty-relay.local and document the shared endpoint syntax. Test Plan: - cargo fmt --check - cargo test -p lanparty-net - cargo test -p lanparty-client-win \ accepts_relay_domain_with_default_port -- --nocapture - cargo test -p lanparty-gateway \ accepts_iface_alias_for_gateway_interface -- --nocapture - cargo test -p lanparty-net -p lanparty-client-win -p lanparty-gateway - cargo clippy -p lanparty-net -p lanparty-client-win -p lanparty-gateway \ --all-targets -- -D warnings - cargo test --workspace - cargo clippy --workspace --all-targets -- -D warnings - git diff --check Refs: PLAN.md
This commit is contained in:
Generated
+10
@@ -474,6 +474,7 @@ dependencies = [
|
||||
"lanparty-client-route",
|
||||
"lanparty-client-tap",
|
||||
"lanparty-ctrl",
|
||||
"lanparty-net",
|
||||
"lanparty-obs",
|
||||
"lanparty-proto",
|
||||
"tokio",
|
||||
@@ -498,6 +499,7 @@ dependencies = [
|
||||
"bytes",
|
||||
"clap",
|
||||
"lanparty-ctrl",
|
||||
"lanparty-net",
|
||||
"lanparty-obs",
|
||||
"lanparty-proto",
|
||||
"libc",
|
||||
@@ -507,6 +509,13 @@ dependencies = [
|
||||
"tokio",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "lanparty-net"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"thiserror 2.0.18",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "lanparty-obs"
|
||||
version = "0.1.0"
|
||||
@@ -531,6 +540,7 @@ dependencies = [
|
||||
"bytes",
|
||||
"clap",
|
||||
"lanparty-ctrl",
|
||||
"lanparty-net",
|
||||
"lanparty-obs",
|
||||
"lanparty-proto",
|
||||
"quinn",
|
||||
|
||||
Reference in New Issue
Block a user