Skip to content

Console gateway cannot proxy to an IPv6 ttyd target #110

Description

@rissrice2105-agent

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions