We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1c9924e commit 59c3d51Copy full SHA for 59c3d51
1 file changed
dnscrypt-proxy/xtransport.go
@@ -133,7 +133,11 @@ func (xTransport *XTransport) rebuildTransport() {
133
ipOnly := host
134
cachedIP, ok := xTransport.loadCachedIP(host, false)
135
if ok {
136
- ipOnly = cachedIP.String()
+ if ipv4 := cachedIP.To4(); ipv4 != nil {
137
+ ipOnly = ipv4.String()
138
+ } else {
139
+ ipOnly = "[" + cachedIP.String() + "]"
140
+ }
141
} else {
142
dlog.Debugf("[%s] IP address was not cached", host)
143
}
0 commit comments