From 6b582cb8b6d59f7d79ddeef33325afdbe1e3f21d Mon Sep 17 00:00:00 2001 From: Will Norris Date: Fri, 16 Feb 2024 10:42:09 -0800 Subject: [PATCH] cmd/tailscale: support clickable IPv6 web client addresses Instead of constructing the `ip:port` string ourselves, use netip.AddrPortFrom which handles IPv6 correctly. Updates #11164 Signed-off-by: Will Norris --- cmd/tailscale/cli/web.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/tailscale/cli/web.go b/cmd/tailscale/cli/web.go index 04fe2ae18..1e03c933f 100644 --- a/cmd/tailscale/cli/web.go +++ b/cmd/tailscale/cli/web.go @@ -99,7 +99,7 @@ func runWeb(ctx context.Context, args []string) error { var startedManagementClient bool // we started the management client if !existingWebClient && !webArgs.readonly { // Also start full client in tailscaled. - log.Printf("starting tailscaled web client at http://%s:%d\n", selfIP.String(), web.ListenPort) + log.Printf("starting tailscaled web client at http://%s\n", netip.AddrPortFrom(selfIP, web.ListenPort)) if err := setRunWebClient(ctx, true); err != nil { return fmt.Errorf("starting web client in tailscaled: %w", err) }