Skip to content

Commit

Permalink
🐛 修复 IPv6 取 IP
Browse files Browse the repository at this point in the history
  • Loading branch information
naiba committed May 23, 2021
1 parent 1c35caf commit 7eeacf7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/agent/monitor/myip.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 7eeacf7

Please sign in to comment.