You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(verisim-api): bracket IPv6 hosts in socket addresses
The HTTP/gRPC/TLS servers each did `format!("{}:{}", host, port)` to build
a socket address string, which produces invalid output when host is an
IPv6 literal without brackets. With VERISIM_HOST=:: and VERISIM_GRPC_PORT=50051
the gRPC server emitted "::50051" and SocketAddr::parse rejected it with
"invalid socket address syntax", crashing the process.
This is a real problem on fly.io where apps default to ::-binding to
register with the 6PN network.
Fix: add fmt_socket_addr(host, port) helper that wraps the host in
brackets per RFC 3986 §3.2.2 when it contains ':' and isn't already
bracketed. Use it for all three bind sites (HTTP, gRPC, TLS).
Tests: 4 new unit tests covering IPv4 passthrough, IPv6 bracket-insertion,
pre-bracketed passthrough, and a SocketAddr::parse roundtrip against
"::", "::1", "0.0.0.0", "127.0.0.1".
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
0 commit comments