Improve logging

This commit is contained in:
Frank Denis 2019-10-20 19:40:03 +02:00
parent f565d3c7f5
commit fccf0ba984
2 changed files with 4 additions and 3 deletions

View File

@ -33,6 +33,10 @@ func FetchCurrentDNSCryptCert(proxy *Proxy, serverName *string, proto string, pk
}
query := new(dns.Msg)
query.SetQuestion(providerName, dns.TypeTXT)
if !strings.HasPrefix(providerName, "2.dnscrypt-cert.") {
dlog.Warnf("[%v] uses a non-standard provider name ('%v' doesn't start with '2.dnscrypt-cert.')", *serverName, providerName)
relayUDPAddr, relayTCPAddr = nil, nil
}
in, rtt, err := dnsExchange(proxy, proto, query, serverAddress, relayUDPAddr, relayTCPAddr, serverName)
if err != nil {
dlog.Noticef("[%s] TIMEOUT", *serverName)

View File

@ -226,9 +226,6 @@ func fetchServerInfo(proxy *Proxy, name string, stamp stamps.ServerStamp, isNew
}
func route(proxy *Proxy, name string, stamp *stamps.ServerStamp) (*net.UDPAddr, *net.TCPAddr, error) {
if !strings.HasPrefix(stamp.ProviderName, "2.dnscrypt-cert.") {
return nil, nil, fmt.Errorf("[%v] uses a non-standard provider name - anonymized DNS will not work with this server", name)
}
routes := proxy.routes
if routes == nil {
return nil, nil, nil