make sure the TLS config contains the H3 ALPN token in server and client

This commit is contained in:
Marten Seemann
2019-05-20 17:55:59 +01:00
parent 8afed81c49
commit afa4615c4d
4 changed files with 54 additions and 7 deletions

View File

@@ -55,7 +55,9 @@ func newClient(
if tlsConf == nil {
tlsConf = &tls.Config{}
}
tlsConf.NextProtos = []string{"h3-19"}
if !strSliceContains(tlsConf.NextProtos, nextProtoH3) {
tlsConf.NextProtos = append(tlsConf.NextProtos, nextProtoH3)
}
if quicConfig == nil {
quicConfig = defaultQuicConfig
}