From 9e8dfbb2ab0e3ee5e11149b4eefc9786c0edcb33 Mon Sep 17 00:00:00 2001 From: Charlotte Brandhorst-Satzkorn <46385858+catzkorn@users.noreply.github.com> Date: Thu, 8 Feb 2024 13:12:03 -0800 Subject: [PATCH] cmd/tailscale: do not show location based exit nodes in main view (#158) This change stops us from clogging up the main UI view with location based exit nodes, which can be in their hundreds. They will still appear in the exit node UI. Updates tailscale/tailscale#9438 Signed-off-by: Charlotte Brandhorst-Satzkorn --- cmd/tailscale/ui.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmd/tailscale/ui.go b/cmd/tailscale/ui.go index c53891e..e6ecbf5 100644 --- a/cmd/tailscale/ui.go +++ b/cmd/tailscale/ui.go @@ -560,6 +560,12 @@ func (ui *UI) layout(gtx layout.Context, sysIns system.Insets, state *clientStat ui.showCopied(gtx, a) } } + + if p.Peer.Hostinfo.Location() != nil && p.Peer.IsWireGuardOnly { + // If the peer has location information set and is a wireguard + // only peer then it should not be displayed in the main list. + return D{} + } return ui.layoutPeer(gtx, sysIns, p, userID, clk) } }