diff --git a/cmd/tailscale/cli/status.go b/cmd/tailscale/cli/status.go index 53fb99975..bdc184487 100644 --- a/cmd/tailscale/cli/status.go +++ b/cmd/tailscale/cli/status.go @@ -150,6 +150,11 @@ func runStatus(ctx context.Context, args []string) error { var buf bytes.Buffer f := func(format string, a ...any) { fmt.Fprintf(&buf, format, a...) } + + if st.CurrentTailnet != nil { + f("# Tailnet name: %s\n\n", st.CurrentTailnet.MagicDNSSuffix) + } + printPS := func(ps *ipnstate.PeerStatus) { f("%-15s %-20s %-12s %-7s ", firstIPString(ps.TailscaleIPs), diff --git a/ipn/ipnstate/ipnstate.go b/ipn/ipnstate/ipnstate.go index 3a464c9be..61bb95fdc 100644 --- a/ipn/ipnstate/ipnstate.go +++ b/ipn/ipnstate/ipnstate.go @@ -500,6 +500,9 @@ table tbody tr:nth-child(even) td { background-color: #f5f5f5; } ips = append(ips, ip.String()) } f("
Tailscale IP: %s", strings.Join(ips, ", ")) + if st.CurrentTailnet != nil { + f("
Tailnet Name: %s", st.CurrentTailnet.MagicDNSSuffix) + } f("
Peer | OS | Node | Owner | Rx | Tx | Activity | Connection |
---|