🐛 修复 IPv6 取 IP

This commit is contained in:
naiba 2021-05-23 13:57:43 +08:00
parent 1c35caf0fb
commit 7eeacf7817

View File

@ -123,7 +123,7 @@ func resolveIP(addr string, ipv6 bool) (string, error) {
for _, ans := range r.Answer {
if ipv6 {
if aaaa, ok := ans.(*dns.AAAA); ok {
url[0] = aaaa.AAAA.String()
url[0] = "[" + aaaa.AAAA.String() + "]"
ipv6Resolved = true
}
} else {