caddyhttp: enable qlog, controlled by QLOGDIR env (#6581)

This commit is contained in:
Marten Seemann 2024-09-21 11:47:18 +08:00 committed by GitHub
parent 5b44d6cea8
commit ff67b97126
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 155 additions and 2 deletions

View file

@ -32,6 +32,7 @@ import (
"github.com/caddyserver/certmagic"
"github.com/quic-go/quic-go"
"github.com/quic-go/quic-go/http3"
"github.com/quic-go/quic-go/qlog"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
@ -623,9 +624,9 @@ func (s *Server) serveHTTP3(addr caddy.NetworkAddress, tlsCfg *tls.Config) error
}),
TLSConfig: tlsCfg,
MaxHeaderBytes: s.MaxHeaderBytes,
// TODO: remove this config when draft versions are no longer supported (we have no need to support drafts)
QUICConfig: &quic.Config{
Versions: []quic.Version{quic.Version1, quic.Version2},
Tracer: qlog.DefaultConnectionTracer,
},
IdleTimeout: time.Duration(s.IdleTimeout),
ConnContext: func(ctx context.Context, c quic.Connection) context.Context {