Skip to content

Commit

Permalink
cmd/tailscale: support clickable IPv6 web client addresses
Browse files Browse the repository at this point in the history
Instead of constructing the `ip:port` string ourselves, use
netip.AddrPortFrom which handles IPv6 correctly.

Updates tailscale#11164

Signed-off-by: Will Norris <will@tailscale.com>
  • Loading branch information
willnorris committed Feb 16, 2024
1 parent 2448781 commit 6b582cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/tailscale/cli/web.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 6b582cb

Please sign in to comment.