mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2024-11-16 11:42:43 +08:00
Fix: parse ip string when use socks proxy (#100)
This commit is contained in:
parent
d292743981
commit
ee7af27712
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue
Block a user