From 00373f07ac4b18df6d3995af314e2da14b769d87 Mon Sep 17 00:00:00 2001 From: Percy Wegmann Date: Wed, 6 Mar 2024 11:46:11 -0600 Subject: [PATCH] ipn/ipnlocal: exclude mullvad exit nodes from TailFS peers list This is a temporary solution to at least omit Mullvad exit nodes from the list of TailFS peers. Once we can identify peers that are actually sharing via TailFS, we can remove this, but for alpha it'll be sufficient to just omit Mullvad. Updates tailscale/corp#17766 Signed-off-by: Percy Wegmann --- ipn/ipnlocal/tailfs.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ipn/ipnlocal/tailfs.go b/ipn/ipnlocal/tailfs.go index b860b8852..e2dbd1f73 100644 --- a/ipn/ipnlocal/tailfs.go +++ b/ipn/ipnlocal/tailfs.go @@ -238,6 +238,13 @@ func (b *LocalBackend) updateTailFSPeersLocked(nm *netmap.NetworkMap) { tailfsRemotes := make([]*tailfs.Remote, 0, len(nm.Peers)) for _, p := range nm.Peers { + // Exclude mullvad exit nodes from list of TailFS peers + // TODO(oxtoacart) - once we have a better mechanism for finding only accessible sharers + // (see below) we can remove this logic. + if strings.HasSuffix(p.Name(), ".mullvad.ts.net.") { + continue + } + peerID := p.ID() url := fmt.Sprintf("%s/%s", peerAPIBase(nm, p), tailFSPrefix[1:]) tailfsRemotes = append(tailfsRemotes, &tailfs.Remote{