forked from quic-go/quic-go
export qlog files if the QLOGDIR env is set in interop client and server
This commit is contained in:
@@ -13,6 +13,7 @@ import (
|
||||
|
||||
"golang.org/x/sync/errgroup"
|
||||
|
||||
"github.com/lucas-clemente/quic-go"
|
||||
"github.com/lucas-clemente/quic-go/http3"
|
||||
"github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"github.com/lucas-clemente/quic-go/interop/http09"
|
||||
@@ -60,9 +61,18 @@ func runTestcase(testcase string) error {
|
||||
flag.Parse()
|
||||
urls := flag.Args()
|
||||
|
||||
getLogWriter, err := utils.GetQLOGWriter()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
quicConf := &quic.Config{GetLogWriter: getLogWriter}
|
||||
|
||||
switch testcase {
|
||||
case "http3":
|
||||
r := &http3.RoundTripper{TLSClientConfig: tlsConf}
|
||||
r := &http3.RoundTripper{
|
||||
TLSClientConfig: tlsConf,
|
||||
QuicConfig: quicConf,
|
||||
}
|
||||
defer r.Close()
|
||||
return downloadFiles(r, urls)
|
||||
case "handshake", "transfer", "retry":
|
||||
@@ -76,7 +86,10 @@ func runTestcase(testcase string) error {
|
||||
return errUnsupported
|
||||
}
|
||||
|
||||
r := &http09.RoundTripper{TLSClientConfig: tlsConf}
|
||||
r := &http09.RoundTripper{
|
||||
TLSClientConfig: tlsConf,
|
||||
QuicConfig: quicConf,
|
||||
}
|
||||
defer r.Close()
|
||||
return downloadFiles(r, urls)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user