diff options
| author | Claire Wang <claire@tailscale.com> | 2024-02-13 09:11:02 -0500 |
|---|---|---|
| committer | Claire Wang <claire@tailscale.com> | 2024-02-20 16:25:50 -0500 |
| commit | 343b29e9715f4d85ed5eaa583d692a8467ee9ad7 (patch) | |
| tree | b0be192beda4c5638e5bb6ff38b55e112c1262b1 /control/controlknobs/controlknobs.go | |
| parent | 3aca29e00e3c6ef71841de8fb66759c3812aeec3 (diff) | |
| download | tailscale-clairew/suggest-non-mullvad-exit-node.tar.xz tailscale-clairew/suggest-non-mullvad-exit-node.zip | |
cmd/tailscale/cli: suggest exit nodeclairew/suggest-non-mullvad-exit-node
Updates tailscale/corp#17516
Signed-off-by: Claire Wang <claire@tailscale.com>
Diffstat (limited to 'control/controlknobs/controlknobs.go')
| -rw-r--r-- | control/controlknobs/controlknobs.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/control/controlknobs/controlknobs.go b/control/controlknobs/controlknobs.go index 6a36c9261..b8e205eae 100644 --- a/control/controlknobs/controlknobs.go +++ b/control/controlknobs/controlknobs.go @@ -73,6 +73,9 @@ type Knobs struct { // ProbeUDPLifetime is whether the node should probe UDP path lifetime on // the tail end of an active direct connection in magicsock. ProbeUDPLifetime atomic.Bool + + // SuggestExitNode is whether the exit node suggestion feature can be used. + SuggestExitNode atomic.Bool } // UpdateFromNodeAttributes updates k (if non-nil) based on the provided self @@ -100,6 +103,7 @@ func (k *Knobs) UpdateFromNodeAttributes(selfNodeAttrs []tailcfg.NodeCapability, forceNfTables = has(tailcfg.NodeAttrLinuxMustUseNfTables) seamlessKeyRenewal = has(tailcfg.NodeAttrSeamlessKeyRenewal) probeUDPLifetime = has(tailcfg.NodeAttrProbeUDPLifetime) + suggestExitNode = has(tailcfg.NodeAttrSuggestExitNode) ) if has(tailcfg.NodeAttrOneCGNATEnable) { @@ -122,6 +126,7 @@ func (k *Knobs) UpdateFromNodeAttributes(selfNodeAttrs []tailcfg.NodeCapability, k.LinuxForceNfTables.Store(forceNfTables) k.SeamlessKeyRenewal.Store(seamlessKeyRenewal) k.ProbeUDPLifetime.Store(probeUDPLifetime) + k.SuggestExitNode.Store(suggestExitNode) } // AsDebugJSON returns k as something that can be marshalled with json.Marshal @@ -145,5 +150,6 @@ func (k *Knobs) AsDebugJSON() map[string]any { "LinuxForceNfTables": k.LinuxForceNfTables.Load(), "SeamlessKeyRenewal": k.SeamlessKeyRenewal.Load(), "ProbeUDPLifetime": k.ProbeUDPLifetime.Load(), + "SuggestExitNode": k.SuggestExitNode.Load(), } } |
