Warn about failed handshakes earlier and fallback to default suite
This commit is contained in:
parent
6b3212d3d7
commit
3dbdf54c1f
|
@ -270,9 +270,6 @@ func (serversInfo *ServersInfo) fetchDoHServerInfo(proxy *Proxy, name string, st
|
|||
if _, _, err := proxy.xTransport.DoHQuery(useGet, url, body, proxy.timeout); err != nil {
|
||||
useGet = true
|
||||
if _, _, err := proxy.xTransport.DoHQuery(useGet, url, body, proxy.timeout); err != nil {
|
||||
if proxy.xTransport.tlsCipherSuite != nil && strings.Contains(err.Error(), "handshake failure") {
|
||||
dlog.Warnf("TLS handshake failure - Try changing or deleting the tls_cipher_suite value in the configuration file")
|
||||
}
|
||||
return ServerInfo{}, err
|
||||
}
|
||||
dlog.Debugf("Server [%s] doesn't appear to support POST; falling back to GET requests", name)
|
||||
|
|
|
@ -235,6 +235,11 @@ func (xTransport *XTransport) Fetch(method string, url *url.URL, accept string,
|
|||
}
|
||||
if err != nil {
|
||||
dlog.Debugf("[%s]: [%s]", req.URL, err)
|
||||
if xTransport.tlsCipherSuite != nil && strings.Contains(err.Error(), "handshake failure") {
|
||||
dlog.Warnf("TLS handshake failure - Try changing or deleting the tls_cipher_suite value in the configuration file")
|
||||
xTransport.tlsCipherSuite = nil
|
||||
xTransport.rebuildTransport()
|
||||
}
|
||||
}
|
||||
return resp, rtt, err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue