Skip to content

Commit

Permalink
fix: dns reslove ignore ip address
Browse files Browse the repository at this point in the history
  • Loading branch information
若尘(樱の泪) committed Feb 18, 2019
1 parent 4d67839 commit 7d62c84
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions component/dnsx/dns.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ func (d *DNS) MustReslove(domain string) net.IP {
}

func (d *DNS) Reslove(domain string) (addr net.IP, err error) {
ip := net.ParseIP(domain)
if ip != nil {
return ip, nil
}
key4 := fmt.Sprintf("%s,%s", IPV4, domain)
key6 := fmt.Sprintf("%s,%s", IPV6, domain)

Expand Down

0 comments on commit 7d62c84

Please sign in to comment.