Skip to content

Commit d9b38cc

Browse files
committed
Ech: Increase DOH timeout when using dialerProxy
1 parent 74df63a commit d9b38cc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

transport/internet/tls/ech.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,12 @@ func dnsQuery(server string, domain string, sockopt *internet.SocketConfig) ([]b
245245
return conn, nil
246246
},
247247
}
248+
timeout := 5 * time.Second
249+
if sockopt != nil && len(sockopt.DialerProxy) > 0 {
250+
timeout = 10 * time.Second
251+
}
248252
c := &http.Client{
249-
Timeout: 5 * time.Second,
253+
Timeout: timeout,
250254
Transport: tr,
251255
}
252256
client, _ = clientForECHDOH.LoadOrStore(serverKey, c)

0 commit comments

Comments
 (0)