mirror of
https://gitclone.com/github.com/MetaCubeX/Clash.Meta
synced 2025-04-26 05:08:03 +08:00
Fix: parse ip string when use socks proxy (#100)
This commit is contained in:
parent
42d33fe629
commit
b594cbc68d
@ -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) {
|
func (r *Resolver) ResolveIP(host string) (ip net.IP, err error) {
|
||||||
|
ip = net.ParseIP(host)
|
||||||
|
if ip != nil {
|
||||||
|
return ip, nil
|
||||||
|
}
|
||||||
|
|
||||||
query := &D.Msg{}
|
query := &D.Msg{}
|
||||||
dnsType := D.TypeA
|
dnsType := D.TypeA
|
||||||
if r.ipv6 {
|
if r.ipv6 {
|
||||||
|
Loading…
Reference in New Issue
Block a user