mirror of
https://github.com/juanfont/headscale.git
synced 2024-12-24 21:25:52 -05:00
Added missing file
This commit is contained in:
parent
d5ce7d7523
commit
db9ba17920
7
app.go
7
app.go
@ -127,7 +127,6 @@ type DERPConfig struct {
|
|||||||
ServerRegionID int
|
ServerRegionID int
|
||||||
ServerRegionCode string
|
ServerRegionCode string
|
||||||
ServerRegionName string
|
ServerRegionName string
|
||||||
STUNEnabled bool
|
|
||||||
STUNAddr string
|
STUNAddr string
|
||||||
URLs []url.URL
|
URLs []url.URL
|
||||||
Paths []string
|
Paths []string
|
||||||
@ -503,15 +502,13 @@ func (h *Headscale) Serve() error {
|
|||||||
h.DERPMap = GetDERPMap(h.cfg.DERP)
|
h.DERPMap = GetDERPMap(h.cfg.DERP)
|
||||||
|
|
||||||
if h.cfg.DERP.ServerEnabled {
|
if h.cfg.DERP.ServerEnabled {
|
||||||
// When embedded DERP is enabled we always need a STUN server address, embedded or external
|
// When embedded DERP is enabled we always need a STUN server
|
||||||
if h.cfg.DERP.STUNAddr == "" {
|
if h.cfg.DERP.STUNAddr == "" {
|
||||||
return errSTUNAddressNotSet
|
return errSTUNAddressNotSet
|
||||||
}
|
}
|
||||||
|
|
||||||
h.DERPMap.Regions[h.DERPServer.region.RegionID] = &h.DERPServer.region
|
h.DERPMap.Regions[h.DERPServer.region.RegionID] = &h.DERPServer.region
|
||||||
if h.cfg.DERP.STUNEnabled {
|
go h.ServeSTUN()
|
||||||
go h.ServeSTUN()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if h.cfg.DERP.AutoUpdate {
|
if h.cfg.DERP.AutoUpdate {
|
||||||
|
Loading…
Reference in New Issue
Block a user