Add an embedded DERP server to Headscale
This series of commit will be adding an embedded DERP server (and STUN) to Headscale, thus making it completely self-contained and not dependant in other infrastructure.
This commit is contained in:
parent
ccec534e19
commit
897d480f4d
3 changed files with 235 additions and 7 deletions
|
@ -117,6 +117,12 @@ func LoadConfig(path string) error {
|
|||
}
|
||||
|
||||
func GetDERPConfig() headscale.DERPConfig {
|
||||
if viper.GetBool("derp.embedded_derp") {
|
||||
return headscale.DERPConfig{
|
||||
EmbeddedDERP: true,
|
||||
}
|
||||
}
|
||||
|
||||
urlStrs := viper.GetStringSlice("derp.urls")
|
||||
|
||||
urls := make([]url.URL, len(urlStrs))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue