1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-01-03 07:45:29 -05:00

Update quic version to v0.53.0 (#3435)

This commit is contained in:
Xiaokang Wang (Shelikhoo)
2025-06-30 05:13:51 +01:00
committed by GitHub
parent dc1bbbb427
commit eff7df91d0
6 changed files with 13 additions and 13 deletions

View File

@@ -36,7 +36,7 @@ type QUICNameServer struct {
cleanup *task.Periodic
name string
destination net.Destination
connection quic.Connection
connection *quic.Conn
}
// NewQUICNameServer creates DNS-over-QUIC client object for local resolving
@@ -331,7 +331,7 @@ func (s *QUICNameServer) QueryIP(ctx context.Context, domain string, clientIP ne
}
}
func isActive(s quic.Connection) bool {
func isActive(s *quic.Conn) bool {
select {
case <-s.Context().Done():
return false
@@ -340,8 +340,8 @@ func isActive(s quic.Connection) bool {
}
}
func (s *QUICNameServer) getConnection(ctx context.Context) (quic.Connection, error) {
var conn quic.Connection
func (s *QUICNameServer) getConnection(ctx context.Context) (*quic.Conn, error) {
var conn *quic.Conn
s.RLock()
conn = s.connection
if conn != nil && isActive(conn) {
@@ -374,7 +374,7 @@ func (s *QUICNameServer) getConnection(ctx context.Context) (quic.Connection, er
return conn, nil
}
func (s *QUICNameServer) openConnection(ctx context.Context) (quic.Connection, error) {
func (s *QUICNameServer) openConnection(ctx context.Context) (*quic.Conn, error) {
tlsConfig := tls.Config{
ServerName: func() string {
switch s.destination.Address.Family() {
@@ -399,7 +399,7 @@ func (s *QUICNameServer) openConnection(ctx context.Context) (quic.Connection, e
return conn, nil
}
func (s *QUICNameServer) openStream(ctx context.Context) (quic.Stream, error) {
func (s *QUICNameServer) openStream(ctx context.Context) (*quic.Stream, error) {
conn, err := s.getConnection(ctx)
if err != nil {
return nil, err

2
go.mod
View File

@@ -24,7 +24,7 @@ require (
github.com/pion/dtls/v2 v2.2.12
github.com/pion/transport/v2 v2.2.10
github.com/pires/go-proxyproto v0.8.1
github.com/quic-go/quic-go v0.52.0
github.com/quic-go/quic-go v0.53.0
github.com/refraction-networking/utls v1.7.3
github.com/seiflotfy/cuckoofilter v0.0.0-20220411075957-e3b120b3f5fb
github.com/stretchr/testify v1.10.0

4
go.sum
View File

@@ -442,8 +442,8 @@ github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
github.com/quic-go/qpack v0.5.1 h1:giqksBPnT/HDtZ6VhtFKgoLOWmlyo9Ei6u9PqzIMbhI=
github.com/quic-go/qpack v0.5.1/go.mod h1:+PC4XFrEskIVkcLzpEkbLqq1uCoxPhQuvK5rH1ZgaEg=
github.com/quic-go/quic-go v0.52.0 h1:/SlHrCRElyaU6MaEPKqKr9z83sBg2v4FLLvWM+Z47pA=
github.com/quic-go/quic-go v0.52.0/go.mod h1:MFlGGpcpJqRAfmYi6NC2cptDPSxRWTOGNuP4wqrWmzQ=
github.com/quic-go/quic-go v0.53.0 h1:QHX46sISpG2S03dPeZBgVIZp8dGagIaiu2FiVYvpCZI=
github.com/quic-go/quic-go v0.53.0/go.mod h1:e68ZEaCdyviluZmy44P6Iey98v/Wfz6HCjQEm+l8zTY=
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
github.com/refraction-networking/utls v1.7.3 h1:L0WRhHY7Oq1T0zkdzVZMR6zWZv+sXbHB9zcuvsAEqCo=
github.com/refraction-networking/utls v1.7.3/go.mod h1:TUhh27RHMGtQvjQq+RyO11P6ZNQNBb3N0v7wsEjKAIQ=

View File

@@ -154,7 +154,7 @@ func (c *sysConn) SyscallConn() (syscall.RawConn, error) {
}
type interConn struct {
stream quic.Stream
stream *quic.Stream
local net.Addr
remote net.Addr
}

View File

@@ -16,7 +16,7 @@ import (
type connectionContext struct {
rawConn *sysConn
conn quic.Connection
conn *quic.Conn
}
var errConnectionClosed = newError("connection closed")
@@ -46,7 +46,7 @@ type clientConnections struct {
cleanup *task.Periodic
}
func isActive(s quic.Connection) bool {
func isActive(s *quic.Conn) bool {
select {
case <-s.Context().Done():
return false

View File

@@ -22,7 +22,7 @@ type Listener struct {
addConn internet.ConnHandler
}
func (l *Listener) acceptStreams(conn quic.Connection) {
func (l *Listener) acceptStreams(conn *quic.Conn) {
for {
stream, err := conn.AcceptStream(context.Background())
if err != nil {