fix: IPv6 support, client address family matching, gitignore cleanup

- Client auto-detects IPv4/IPv6 from relay address and binds accordingly
- Relay defaults to 0.0.0.0:4433, use --listen [::]:4433 for IPv6
- .gitignore excludes .claude/, swap files
- Fix pipeline drain infinite loop in benchmarks

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Siavash Sameni
2026-03-27 14:17:49 +04:00
parent 79f9ff1596
commit 3c99503eb1
4 changed files with 17 additions and 7 deletions

View File

@@ -31,7 +31,13 @@ async fn main() -> anyhow::Result<()> {
info!(%relay_addr, live, "WarzonePhone client connecting");
let client_config = wzp_transport::client_config();
let endpoint = wzp_transport::create_endpoint("0.0.0.0:0".parse()?, None)?;
// Use same address family as the relay address to avoid IPv4/IPv6 mismatch.
let bind_addr = if relay_addr.is_ipv6() {
"[::]:0".parse()?
} else {
"0.0.0.0:0".parse()?
};
let endpoint = wzp_transport::create_endpoint(bind_addr, None)?;
let connection =
wzp_transport::connect(&endpoint, relay_addr, "localhost", client_config).await?;