mirror of
https://github.com/DNSCrypt/dnscrypt-proxy.git
synced 2024-12-27 00:12:31 +01:00
parent
1c9924e055
commit
59c3d5121d
@ -133,7 +133,11 @@ func (xTransport *XTransport) rebuildTransport() {
|
||||
ipOnly := host
|
||||
cachedIP, ok := xTransport.loadCachedIP(host, false)
|
||||
if ok {
|
||||
ipOnly = cachedIP.String()
|
||||
if ipv4 := cachedIP.To4(); ipv4 != nil {
|
||||
ipOnly = ipv4.String()
|
||||
} else {
|
||||
ipOnly = "[" + cachedIP.String() + "]"
|
||||
}
|
||||
} else {
|
||||
dlog.Debugf("[%s] IP address was not cached", host)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user