Skip to content

Commit

Permalink
feat: derpmap field in config (#1823)
Browse files Browse the repository at this point in the history
  • Loading branch information
gdraganic authored Oct 17, 2024
1 parent cc42fc3 commit 45c9585
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions hscontrol/derp/derp.go
Original file line number Diff line number Diff line change
Expand Up @@ -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().
Expand Down
1 change: 1 addition & 0 deletions hscontrol/types/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ type DERPConfig struct {
STUNAddr string
URLs []url.URL
Paths []string
DERPMap *tailcfg.DERPMap
AutoUpdate bool
UpdateFrequency time.Duration
IPv4 string
Expand Down

0 comments on commit 45c9585

Please sign in to comment.