diff --git a/tailcfg/derpmap.go b/tailcfg/derpmap.go index 6abc63695..7114ac9e7 100644 --- a/tailcfg/derpmap.go +++ b/tailcfg/derpmap.go @@ -14,6 +14,10 @@ type DERPMap struct { // // The numbers are not necessarily contiguous. Regions map[int]*DERPRegion + + // OmitDefaultRegions specifies to not use Tailscale's DERP servers, and only use those + // specified in this DERPMap. If there are none set outside of the defaults, this is a noop. + OmitDefaultRegions bool `json:"omitDefaultRegions,omitempty"` } /// RegionIDs returns the sorted region IDs. diff --git a/tailcfg/tailcfg_clone.go b/tailcfg/tailcfg_clone.go index c4701eaf2..0594d5aa4 100644 --- a/tailcfg/tailcfg_clone.go +++ b/tailcfg/tailcfg_clone.go @@ -309,7 +309,8 @@ func (src *DERPMap) Clone() *DERPMap { // A compilation failure here means this code must be regenerated, with command: // tailscale.com/cmd/cloner -type User,Node,Hostinfo,NetInfo,Login,DNSConfig,DNSResolver,RegisterResponse,DERPRegion,DERPMap,DERPNode var _DERPMapNeedsRegeneration = DERPMap(struct { - Regions map[int]*DERPRegion + Regions map[int]*DERPRegion + OmitDefaultRegions bool }{}) // Clone makes a deep copy of DERPNode.