mirror of https://github.com/schollz/croc.git
This commit is contained in:
parent
dbc4a08ad0
commit
284af7fc7a
|
@ -40,10 +40,11 @@ func lookupIP(address string) (ipaddress string, err error) {
|
||||||
d := net.Dialer{
|
d := net.Dialer{
|
||||||
Timeout: time.Millisecond * time.Duration(10000),
|
Timeout: time.Millisecond * time.Duration(10000),
|
||||||
}
|
}
|
||||||
return d.DialContext(ctx, "udp", "8.8.8.8:53")
|
return d.DialContext(ctx, "udp", "1.1.1.1")
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
ip, err := r.LookupHost(context.Background(), address)
|
ip, err := r.LookupHost(context.Background(), address)
|
||||||
|
fmt.Println(ip)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue