Do not allow magicdns if not nameservers set up

This commit is contained in:
Juan Font Alonso 2021-10-04 19:43:58 +02:00
parent ef0f7c0c09
commit ec911981c2

View File

@ -108,9 +108,11 @@ func GetDNSConfig() (*tailcfg.DNSConfig, string) {
dnsConfig.Domains = viper.GetStringSlice("dns_config.domains") dnsConfig.Domains = viper.GetStringSlice("dns_config.domains")
} }
if len(dnsConfig.Nameservers) > 0 {
if viper.IsSet("dns_config.magic_dns") { if viper.IsSet("dns_config.magic_dns") {
dnsConfig.Proxied = viper.GetBool("dns_config.magic_dns") dnsConfig.Proxied = viper.GetBool("dns_config.magic_dns")
} }
}
var baseDomain string var baseDomain string
if viper.IsSet("dns_config.base_domain") { if viper.IsSet("dns_config.base_domain") {