http3: correctly use the quic.Transport (#3869)

* use quic.Transport in http3

* add intergrationtests to dial server with different server names

* update test
This commit is contained in:
Glonee
2023-06-01 14:31:20 +08:00
committed by GitHub
parent 21549fcb4a
commit c96fbd2e4a
6 changed files with 57 additions and 90 deletions

View File

@@ -90,10 +90,11 @@ var (
qlogTracer func(context.Context, logging.Perspective, quic.ConnectionID) logging.ConnectionTracer
enableQlog bool
version quic.VersionNumber
tlsConfig *tls.Config
tlsConfigLongChain *tls.Config
tlsClientConfig *tls.Config
version quic.VersionNumber
tlsConfig *tls.Config
tlsConfigLongChain *tls.Config
tlsClientConfig *tls.Config
tlsClientConfigWithoutServerName *tls.Config
)
// read the logfile command line flag
@@ -131,6 +132,10 @@ func init() {
RootCAs: root,
NextProtos: []string{alpn},
}
tlsClientConfigWithoutServerName = &tls.Config{
RootCAs: root,
NextProtos: []string{alpn},
}
}
var _ = BeforeSuite(func() {
@@ -165,6 +170,10 @@ func getTLSClientConfig() *tls.Config {
return tlsClientConfig.Clone()
}
func getTLSClientConfigWithoutServerName() *tls.Config {
return tlsClientConfigWithoutServerName.Clone()
}
func getQuicConfig(conf *quic.Config) *quic.Config {
if conf == nil {
conf = &quic.Config{}