Warn is DoH is requested but HTTP/2 is not supported

This commit is contained in:
Frank Denis 2019-05-12 09:55:13 +02:00
parent 50a2018633
commit 0e2d78d21b
1 changed files with 6 additions and 1 deletions

View File

@ -283,7 +283,12 @@ func (serversInfo *ServersInfo) fetchDoHServerInfo(proxy *Proxy, name string, st
if tls == nil || !tls.HandshakeComplete {
return ServerInfo{}, errors.New("TLS handshake failed")
}
dlog.Infof("[%s] TLS version: %x - Protocol: %v - Cipher suite: %v", name, tls.Version, tls.NegotiatedProtocol, tls.CipherSuite)
protocol := tls.NegotiatedProtocol
if len(protocol) == 0 {
protocol = "h1"
dlog.Warnf("[%s] does not support HTTP/2", name)
}
dlog.Infof("[%s] TLS version: %x - Protocol: %v - Cipher suite: %v", name, tls.Version, protocol, tls.CipherSuite)
showCerts := len(os.Getenv("SHOW_CERTS")) > 0
found := false
var wantedHash [32]byte