mirror of
https://github.com/juanfont/headscale.git
synced 2024-11-29 18:33:05 +00:00
Fix issue 660 (#874)
Co-authored-by: Juan Font <juanfontalonso@gmail.com>
This commit is contained in:
parent
ad31378d92
commit
4e8b95e6cd
2 changed files with 9 additions and 8 deletions
|
@ -21,6 +21,7 @@
|
||||||
- Add config flag to allow Headscale to start if OIDC provider is down [#829](https://github.com/juanfont/headscale/pull/829)
|
- Add config flag to allow Headscale to start if OIDC provider is down [#829](https://github.com/juanfont/headscale/pull/829)
|
||||||
- Random node DNS suffix only applied if names collide in namespace. [#766](https://github.com/juanfont/headscale/issues/766)
|
- Random node DNS suffix only applied if names collide in namespace. [#766](https://github.com/juanfont/headscale/issues/766)
|
||||||
- Remove `ip_prefix` configuration option and warning [#899](https://github.com/juanfont/headscale/pull/899)
|
- Remove `ip_prefix` configuration option and warning [#899](https://github.com/juanfont/headscale/pull/899)
|
||||||
|
- Fix some DNS config issues [#660](https://github.com/juanfont/headscale/issues/660)
|
||||||
|
|
||||||
## 0.16.4 (2022-08-21)
|
## 0.16.4 (2022-08-21)
|
||||||
|
|
||||||
|
|
16
config.go
16
config.go
|
@ -434,17 +434,17 @@ func GetDNSConfig() (*tailcfg.DNSConfig, string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if viper.IsSet("dns_config.domains") {
|
if viper.IsSet("dns_config.domains") {
|
||||||
dnsConfig.Domains = viper.GetStringSlice("dns_config.domains")
|
domains := viper.GetStringSlice("dns_config.domains")
|
||||||
|
if len(dnsConfig.Nameservers) > 0 {
|
||||||
|
dnsConfig.Domains = domains
|
||||||
|
} else if domains != nil {
|
||||||
|
log.Warn().
|
||||||
|
Msg("Warning: dns_config.domains is set, but no nameservers are configured. Ignoring domains.")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if viper.IsSet("dns_config.magic_dns") {
|
if viper.IsSet("dns_config.magic_dns") {
|
||||||
magicDNS := viper.GetBool("dns_config.magic_dns")
|
dnsConfig.Proxied = viper.GetBool("dns_config.magic_dns")
|
||||||
if len(dnsConfig.Nameservers) > 0 {
|
|
||||||
dnsConfig.Proxied = magicDNS
|
|
||||||
} else if magicDNS {
|
|
||||||
log.Warn().
|
|
||||||
Msg("Warning: dns_config.magic_dns is set, but no nameservers are configured. Ignoring magic_dns.")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var baseDomain string
|
var baseDomain string
|
||||||
|
|
Loading…
Reference in a new issue