mirror of
https://github.com/juanfont/headscale.git
synced 2025-08-11 15:27:37 +00:00
Make STUN server configurable
This commit is contained in:
@@ -118,6 +118,8 @@ func LoadConfig(path string) error {
|
||||
|
||||
func GetDERPConfig() headscale.DERPConfig {
|
||||
enabled := viper.GetBool("derp.server.enabled")
|
||||
stunEnabled := viper.GetBool("derp.server.stun.enabled")
|
||||
stunAddr := viper.GetString("derp.server.stun.listen_addr")
|
||||
|
||||
urlStrs := viper.GetStringSlice("derp.urls")
|
||||
|
||||
@@ -141,6 +143,8 @@ func GetDERPConfig() headscale.DERPConfig {
|
||||
|
||||
return headscale.DERPConfig{
|
||||
ServerEnabled: enabled,
|
||||
STUNEnabled: stunEnabled,
|
||||
STUNAddr: stunAddr,
|
||||
URLs: urls,
|
||||
Paths: paths,
|
||||
AutoUpdate: autoUpdate,
|
||||
|
Reference in New Issue
Block a user