Fix: parse ip string when use socks proxy (#100)

This commit is contained in:
gVisor bot 2019-02-02 21:11:27 +08:00
parent d292743981
commit ee7af27712

View file

@ -155,6 +155,11 @@ func (r *Resolver) resolveIP(m *D.Msg) (msg *D.Msg, err error) {
}
func (r *Resolver) ResolveIP(host string) (ip net.IP, err error) {
ip = net.ParseIP(host)
if ip != nil {
return ip, nil
}
query := &D.Msg{}
dnsType := D.TypeA
if r.ipv6 {