Renamed configuration items of the DERP server
This commit is contained in:
parent
09d78c7a05
commit
758b1ba1cb
3 changed files with 47 additions and 20 deletions
|
@ -117,11 +117,8 @@ func LoadConfig(path string) error {
|
|||
}
|
||||
|
||||
func GetDERPConfig() headscale.DERPConfig {
|
||||
if viper.GetBool("derp.embedded_derp") {
|
||||
return headscale.DERPConfig{
|
||||
EmbeddedDERP: true,
|
||||
}
|
||||
}
|
||||
enabled := viper.GetBool("derp.server.enabled")
|
||||
insecure := viper.GetBool("derp.server.insecure")
|
||||
|
||||
urlStrs := viper.GetStringSlice("derp.urls")
|
||||
|
||||
|
@ -144,6 +141,8 @@ func GetDERPConfig() headscale.DERPConfig {
|
|||
updateFrequency := viper.GetDuration("derp.update_frequency")
|
||||
|
||||
return headscale.DERPConfig{
|
||||
ServerEnabled: enabled,
|
||||
ServerInsecure: insecure,
|
||||
URLs: urls,
|
||||
Paths: paths,
|
||||
AutoUpdate: autoUpdate,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue