@@ -107,7 +107,8 @@ type CapabilityVersion int
107
107
// - 67: 2023-07-25: Client understands PeerCapMap
108
108
// - 68: 2023-08-09: Client has dedicated updateRoutine; MapRequest.Stream true means ignore Hostinfo+Endpoints
109
109
// - 69: 2023-08-16: removed Debug.LogHeap* + GoroutineDumpURL; added c2n /debug/logheap
110
- const CurrentCapabilityVersion CapabilityVersion = 69
110
+ // - 70: 2023-08-16: removed most Debug fields; added NodeAttrDisable*, NodeAttrDebug* instead
111
+ const CurrentCapabilityVersion CapabilityVersion = 70
111
112
112
113
type StableID string
113
114
@@ -1750,35 +1751,6 @@ type ControlIPCandidate struct {
1750
1751
//
1751
1752
// TODO(bradfitz): start migrating the imperative ones to c2n requests.
1752
1753
type Debug struct {
1753
- // ForceBackgroundSTUN controls whether magicsock should
1754
- // always do its background STUN queries (see magicsock's
1755
- // periodicReSTUN), regardless of inactivity.
1756
- ForceBackgroundSTUN bool `json:",omitempty"`
1757
-
1758
- // SetForceBackgroundSTUN controls whether magicsock should always do its
1759
- // background STUN queries (see magicsock's periodicReSTUN), regardless of
1760
- // inactivity.
1761
- //
1762
- // As of capver 37, this field is the preferred field for control to set on
1763
- // the wire and ForceBackgroundSTUN is only used within the code as the
1764
- // current map session value. But ForceBackgroundSTUN can still be used too.
1765
- SetForceBackgroundSTUN opt.Bool `json:",omitempty"`
1766
-
1767
- // DERPRoute controls whether the DERP reverse path
1768
- // optimization (see Issue 150) should be enabled or
1769
- // disabled. The environment variable in magicsock is the
1770
- // highest priority (if set), then this (if set), then the
1771
- // binary default value.
1772
- DERPRoute opt.Bool `json:",omitempty"`
1773
-
1774
- // TrimWGConfig controls whether Tailscale does lazy, on-demand
1775
- // wireguard configuration of peers.
1776
- TrimWGConfig opt.Bool `json:",omitempty"`
1777
-
1778
- // DisableSubnetsIfPAC controls whether subnet routers should be
1779
- // disabled if WPAD is present on the network.
1780
- DisableSubnetsIfPAC opt.Bool `json:",omitempty"`
1781
-
1782
1754
// SleepSeconds requests that the client sleep for the
1783
1755
// provided number of seconds.
1784
1756
// The client can (and should) limit the value (such as 5
@@ -1788,35 +1760,18 @@ type Debug struct {
1788
1760
// RandomizeClientPort is whether magicsock should UDP bind to
1789
1761
// :0 to get a random local port, ignoring any configured
1790
1762
// fixed port.
1791
- RandomizeClientPort bool `json:",omitempty"`
1792
-
1793
- // SetRandomizeClientPort is whether magicsock should UDP bind to :0 to get
1794
- // a random local port, ignoring any configured fixed port.
1795
1763
//
1796
- // As of capver 37, this field is the preferred field for control to set on
1797
- // the wire and RandomizeClientPort is only used within the code as the
1798
- // current map session value. But RandomizeClientPort can still be used too.
1799
- SetRandomizeClientPort opt.Bool `json:",omitempty"`
1764
+ // Deprecated: use NodeAttrRandomizeClientPort instead.
1765
+ RandomizeClientPort bool `json:",omitempty"`
1800
1766
1801
1767
// OneCGNATRoute controls whether the client should prefer to make one
1802
1768
// big CGNAT /10 route rather than a /32 per peer.
1803
1769
OneCGNATRoute opt.Bool `json:",omitempty"`
1804
1770
1805
- // DisableUPnP is whether the client will attempt to perform a UPnP portmapping.
1806
- // By default, we want to enable it to see if it works on more clients.
1807
- //
1808
- // If UPnP catastrophically fails for people, this should be set to True to kill
1809
- // new attempts at UPnP connections.
1810
- DisableUPnP opt.Bool `json:",omitempty"`
1811
-
1812
1771
// DisableLogTail disables the logtail package. Once disabled it can't be
1813
1772
// re-enabled for the lifetime of the process.
1814
1773
DisableLogTail bool `json:",omitempty"`
1815
1774
1816
- // EnableSilentDisco disables the use of heartBeatTimer in magicsock and attempts to
1817
- // handle disco silently. See issue #540 for details.
1818
- EnableSilentDisco bool `json:",omitempty"`
1819
-
1820
1775
// Exit optionally specifies that the client should os.Exit
1821
1776
// with this code.
1822
1777
Exit * int `json:",omitempty"`
@@ -2003,6 +1958,34 @@ const (
2003
1958
NodeAttrFunnel = "funnel"
2004
1959
// NodeAttrSSHAggregator grants the ability for a node to collect SSH sessions.
2005
1960
NodeAttrSSHAggregator = "ssh-aggregator"
1961
+
1962
+ // NodeAttrDebugForceBackgroundSTUN forces a node to always do background
1963
+ // STUN queries regardless of inactivity.
1964
+ NodeAttrDebugForceBackgroundSTUN = "debug-always-stun"
1965
+
1966
+ // NodeAttrDebugDisableWGTrim disables the lazy WireGuard configuration,
1967
+ // always giving WireGuard the full netmap, even for idle peers.
1968
+ NodeAttrDebugDisableWGTrim = "debug-no-wg-trim"
1969
+
1970
+ // NodeAttrDebugDisableDRPO disables the DERP Return Path Optimization.
1971
+ // See Issue 150.
1972
+ NodeAttrDebugDisableDRPO = "debug-disable-drpo"
1973
+
1974
+ // NodeAttrDisableSubnetsIfPAC controls whether subnet routers should be
1975
+ // disabled if WPAD is present on the network.
1976
+ NodeAttrDisableSubnetsIfPAC = "debug-disable-subnets-if-pac"
1977
+
1978
+ // NodeAttrDisableUPnP makes the client not perform a UPnP portmapping.
1979
+ // By default, we want to enable it to see if it works on more clients.
1980
+ //
1981
+ // If UPnP catastrophically fails for people, this should be set kill
1982
+ // new attempts at UPnP connections.
1983
+ NodeAttrDisableUPnP = "debug-disable-upnp"
1984
+
1985
+ // NodeAttrRandomizeClientPort makes magicsock UDP bind to
1986
+ // :0 to get a random local port, ignoring any configured
1987
+ // fixed port.
1988
+ NodeAttrRandomizeClientPort = "randomize-client-port"
2006
1989
)
2007
1990
2008
1991
// SetDNSRequest is a request to add a DNS record.
0 commit comments