Refactor: udp would use the first DNS record instead of a random one

This commit is contained in:
yaling888
2022-06-22 03:17:15 +08:00
parent f1fc0ef2ff
commit e31be4edc2
7 changed files with 61 additions and 35 deletions

View File

@ -94,7 +94,7 @@ func newDoHClient(url string, r *Resolver, proxyAdapter string) *dohClient {
return nil, err
}
ip, err := resolver.ResolveIPWithResolver(host, r)
ip, err := resolver.ResolveIPWithResolver(host, r, true)
if err != nil {
return nil, err
}