mirror of
https://github.com/juanfont/headscale.git
synced 2024-11-26 08:53:05 +00:00
feat: derpmap field in config (#1823)
This commit is contained in:
parent
cc42fc394a
commit
45c9585b52
2 changed files with 4 additions and 0 deletions
|
@ -82,6 +82,9 @@ func mergeDERPMaps(derpMaps []*tailcfg.DERPMap) *tailcfg.DERPMap {
|
||||||
|
|
||||||
func GetDERPMap(cfg types.DERPConfig) *tailcfg.DERPMap {
|
func GetDERPMap(cfg types.DERPConfig) *tailcfg.DERPMap {
|
||||||
var derpMaps []*tailcfg.DERPMap
|
var derpMaps []*tailcfg.DERPMap
|
||||||
|
if cfg.DERPMap != nil {
|
||||||
|
derpMaps = append(derpMaps, cfg.DERPMap)
|
||||||
|
}
|
||||||
|
|
||||||
for _, path := range cfg.Paths {
|
for _, path := range cfg.Paths {
|
||||||
log.Debug().
|
log.Debug().
|
||||||
|
|
|
@ -176,6 +176,7 @@ type DERPConfig struct {
|
||||||
STUNAddr string
|
STUNAddr string
|
||||||
URLs []url.URL
|
URLs []url.URL
|
||||||
Paths []string
|
Paths []string
|
||||||
|
DERPMap *tailcfg.DERPMap
|
||||||
AutoUpdate bool
|
AutoUpdate bool
|
||||||
UpdateFrequency time.Duration
|
UpdateFrequency time.Duration
|
||||||
IPv4 string
|
IPv4 string
|
||||||
|
|
Loading…
Reference in a new issue