Skip to content

add support for detecting IPv6 services for port sharing #15675

@dannykopping

Description

@dannykopping

From agent/ports_supported.go

getListeningPorts() currently only detects processes listening on IPv4 addresses.


As an aside, I discovered this because I'm running a Go process in a workspace which I instructed to listen on 0.0.0.0:8080 but Go binds to IPv6 where possible, so it got bound to :::8080 and subsequently was not listed in the list of listening ports, counter to my expectations.

From https://pkg.go.dev/net#Listen:

For TCP networks, if the host in the address parameter is empty or a literal unspecified IP address, Listen listens on all available unicast and anycast IP addresses of the local system. To only use IPv4, use network "tcp4".

Metadata

Metadata

Assignees

No one assigned

    Labels

    need-backendIssues that need backend worknetworkingArea: networking

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions