mirror of
https://github.com/juanfont/headscale.git
synced 2025-08-28 13:49:04 +02:00
chore(derp): prioritize loading DERP maps from URLs
This allows users to override default entries provided via URL
This commit is contained in:
parent
e949859d33
commit
630bfd265a
@ -91,8 +91,8 @@ func GetDERPMap(cfg types.DERPConfig) (*tailcfg.DERPMap, error) {
|
|||||||
derpMaps = append(derpMaps, cfg.DERPMap)
|
derpMaps = append(derpMaps, cfg.DERPMap)
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, path := range cfg.Paths {
|
for _, addr := range cfg.URLs {
|
||||||
derpMap, err := loadDERPMapFromPath(path)
|
derpMap, err := loadDERPMapFromURL(addr)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@ -100,8 +100,8 @@ func GetDERPMap(cfg types.DERPConfig) (*tailcfg.DERPMap, error) {
|
|||||||
derpMaps = append(derpMaps, derpMap)
|
derpMaps = append(derpMaps, derpMap)
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, addr := range cfg.URLs {
|
for _, path := range cfg.Paths {
|
||||||
derpMap, err := loadDERPMapFromURL(addr)
|
derpMap, err := loadDERPMapFromPath(path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user