mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-05-10 06:08:41 +00:00
Add quic qlog to debug logs
This commit is contained in:
parent
11518fe089
commit
c9df755426
5 changed files with 40 additions and 0 deletions
|
@ -2,10 +2,13 @@ package quic
|
|||
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/lucas-clemente/quic-go"
|
||||
"github.com/lucas-clemente/quic-go/logging"
|
||||
"github.com/lucas-clemente/quic-go/qlog"
|
||||
|
||||
"github.com/xtls/xray-core/common"
|
||||
"github.com/xtls/xray-core/common/net"
|
||||
|
@ -140,6 +143,9 @@ func (s *clientConnections) openConnection(ctx context.Context, destAddr net.Add
|
|||
quicConfig := &quic.Config{
|
||||
ConnectionIDLength: 12,
|
||||
KeepAlive: false,
|
||||
Tracer: qlog.NewTracer(func(_ logging.Perspective, connID []byte) io.WriteCloser {
|
||||
return &QlogWriter{connID: connID}
|
||||
}),
|
||||
}
|
||||
|
||||
udpConn, _ := rawConn.(*net.UDPConn)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue