Activate DNS-over-TLS server when certificates, keys and ports are configured.
This commit is contained in:
committed by
Eugene Bujak
parent
0aeca6bbf5
commit
229ef78085
5
dns.go
5
dns.go
@@ -51,6 +51,11 @@ func generateServerConfig() dnsforward.ServerConfig {
|
||||
Filters: filters,
|
||||
}
|
||||
|
||||
newconfig.TLSConfig = config.TLS.TLSConfig
|
||||
if config.TLS.PortDNSOverTLS != 0 {
|
||||
newconfig.TLSListenAddr = &net.TCPAddr{IP: net.ParseIP(config.DNS.BindHost), Port: config.TLS.PortDNSOverTLS}
|
||||
}
|
||||
|
||||
for _, u := range config.DNS.UpstreamDNS {
|
||||
dnsUpstream, err := upstream.AddressToUpstream(u, config.DNS.BootstrapDNS, dnsforward.DefaultTimeout)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user