Skip to content

Commit 45c9585

Browse files
authored
feat: derpmap field in config (#1823)
1 parent cc42fc3 commit 45c9585

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

hscontrol/derp/derp.go

+3
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ func mergeDERPMaps(derpMaps []*tailcfg.DERPMap) *tailcfg.DERPMap {
8282

8383
func GetDERPMap(cfg types.DERPConfig) *tailcfg.DERPMap {
8484
var derpMaps []*tailcfg.DERPMap
85+
if cfg.DERPMap != nil {
86+
derpMaps = append(derpMaps, cfg.DERPMap)
87+
}
8588

8689
for _, path := range cfg.Paths {
8790
log.Debug().

hscontrol/types/config.go

+1
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ type DERPConfig struct {
176176
STUNAddr string
177177
URLs []url.URL
178178
Paths []string
179+
DERPMap *tailcfg.DERPMap
179180
AutoUpdate bool
180181
UpdateFrequency time.Duration
181182
IPv4 string

0 commit comments

Comments
 (0)