mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-25 19:15:34 +00:00
tailcfg/derpmap: add flag to omit ts's derps
This adds a flag to derp maps which specifies that default Tailscale DERP servers should not be used. If true and there are entries in this map, it indicates that the entries in this map should take precedent and not hit any of tailscale's DERP servers. This change is backwards compatible, as the default behavior should be false. Updates #1264 Signed-off-by: julianknodt <julianknodt@gmail.com>
This commit is contained in:
parent
48883272ea
commit
597fa3d3c3
@ -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.
|
||||
|
@ -310,6 +310,7 @@ func (src *DERPMap) Clone() *DERPMap {
|
||||
// tailscale.com/cmd/cloner -type User,Node,Hostinfo,NetInfo,Login,DNSConfig,DNSResolver,RegisterResponse,DERPRegion,DERPMap,DERPNode
|
||||
var _DERPMapNeedsRegeneration = DERPMap(struct {
|
||||
Regions map[int]*DERPRegion
|
||||
OmitDefaultRegions bool
|
||||
}{})
|
||||
|
||||
// Clone makes a deep copy of DERPNode.
|
||||
|
Loading…
Reference in New Issue
Block a user