mirror of
https://github.com/xvzc/SpoofDPI.git
synced 2024-12-22 14:26:31 +00:00
fix: remove automatic retry when doh fails
This commit is contained in:
parent
e9de332163
commit
c8c18a4651
@ -93,8 +93,6 @@ func dohLookup(domain string) (string, error) {
|
||||
|
||||
dnsUpstream := util.GetConfig().DnsAddr
|
||||
client := GetDoHClient(*dnsUpstream)
|
||||
// try up to 3 times
|
||||
for i := 0; i < 3; i++ {
|
||||
resp, err := client.Resolve(ctx, domain, []uint16{dns.TypeA, dns.TypeAAAA})
|
||||
if err == nil {
|
||||
if len(resp) == 0 { // yes this happens
|
||||
@ -103,7 +101,6 @@ func dohLookup(domain string) (string, error) {
|
||||
|
||||
return resp[0], nil
|
||||
}
|
||||
}
|
||||
|
||||
return "", errors.New("could not resolve the domain(doh)")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user