Reproduction
parseTarget("http://[::1]:7681/")
// { host: "[", port: 7681 }
parseTarget("[fd7a:115c:a1e0::1]:7681")
// { host: "[fd7a", port: NaN }
parseTarget() splits the target on every colon, so bracketed IPv6 loopback and tailnet addresses are truncated before the gateway calls http.request() or net.connect().
Expected
Bracketed IPv6 targets should produce the complete unbracketed hostname for Node's connection APIs, while the proxied HTTP Host header should retain RFC-compliant brackets.
Impact
moshcode console serve --ttyd [::1]:7681 and IPv6 tailnet targets cannot reach ttyd, even though Node's HTTP and TCP clients support those addresses.
Reproduction
parseTarget()splits the target on every colon, so bracketed IPv6 loopback and tailnet addresses are truncated before the gateway callshttp.request()ornet.connect().Expected
Bracketed IPv6 targets should produce the complete unbracketed hostname for Node's connection APIs, while the proxied HTTP
Hostheader should retain RFC-compliant brackets.Impact
moshcode console serve --ttyd [::1]:7681and IPv6 tailnet targets cannot reach ttyd, even though Node's HTTP and TCP clients support those addresses.