diff --git a/hscontrol/derp/derp.go b/hscontrol/derp/derp.go index 5d4b24f2e89..9d358598287 100644 --- a/hscontrol/derp/derp.go +++ b/hscontrol/derp/derp.go @@ -82,6 +82,9 @@ func mergeDERPMaps(derpMaps []*tailcfg.DERPMap) *tailcfg.DERPMap { func GetDERPMap(cfg types.DERPConfig) *tailcfg.DERPMap { var derpMaps []*tailcfg.DERPMap + if cfg.DERPMap != nil { + derpMaps = append(derpMaps, cfg.DERPMap) + } for _, path := range cfg.Paths { log.Debug(). diff --git a/hscontrol/types/config.go b/hscontrol/types/config.go index 3f70ca7bb81..65d7244422a 100644 --- a/hscontrol/types/config.go +++ b/hscontrol/types/config.go @@ -178,6 +178,7 @@ type DERPConfig struct { STUNAddr string URLs []url.URL Paths []string + DERPMap *tailcfg.DERPMap AutoUpdate bool UpdateFrequency time.Duration IPv4 string