Skip to content

Commit 2b207bb

Browse files
committed
Update quic-go to v0.54.0
1 parent 97a02c9 commit 2b207bb

File tree

9 files changed

+19
-19
lines changed

9 files changed

+19
-19
lines changed

cmd/sing-box/cmd_tools_fetch_http3.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ func initializeHTTP3Client(instance *box.Box) error {
2222
}
2323
http3Client = &http.Client{
2424
Transport: &http3.Transport{
25-
Dial: func(ctx context.Context, addr string, tlsCfg *tls.Config, cfg *quic.Config) (quic.EarlyConnection, error) {
25+
Dial: func(ctx context.Context, addr string, tlsCfg *tls.Config, cfg *quic.Config) (*quic.Conn, error) {
2626
destination := M.ParseSocksaddr(addr)
2727
udpConn, dErr := dialer.DialContext(ctx, N.NetworkUDP, destination)
2828
if dErr != nil {

dns/transport/quic/http3.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ func NewHTTP3(ctx context.Context, logger log.ContextLogger, tag string, options
102102
destination: &destinationURL,
103103
headers: headers,
104104
transport: &http3.Transport{
105-
Dial: func(ctx context.Context, addr string, tlsCfg *tls.STDConfig, cfg *quic.Config) (quic.EarlyConnection, error) {
105+
Dial: func(ctx context.Context, addr string, tlsCfg *tls.STDConfig, cfg *quic.Config) (*quic.Conn, error) {
106106
conn, dialErr := transportDialer.DialContext(ctx, N.NetworkUDP, serverAddr)
107107
if dialErr != nil {
108108
return nil, dialErr

dns/transport/quic/quic.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ type Transport struct {
3838
serverAddr M.Socksaddr
3939
tlsConfig tls.Config
4040
access sync.Mutex
41-
connection quic.EarlyConnection
41+
connection *quic.Conn
4242
}
4343

4444
func NewQUIC(ctx context.Context, logger log.ContextLogger, tag string, options option.RemoteTLSDNSServerOptions) (adapter.DNSTransport, error) {
@@ -88,7 +88,7 @@ func (t *Transport) Close() error {
8888

8989
func (t *Transport) Exchange(ctx context.Context, message *mDNS.Msg) (*mDNS.Msg, error) {
9090
var (
91-
conn quic.Connection
91+
conn *quic.Conn
9292
err error
9393
response *mDNS.Msg
9494
)
@@ -110,7 +110,7 @@ func (t *Transport) Exchange(ctx context.Context, message *mDNS.Msg) (*mDNS.Msg,
110110
return nil, err
111111
}
112112

113-
func (t *Transport) openConnection() (quic.EarlyConnection, error) {
113+
func (t *Transport) openConnection() (*quic.Conn, error) {
114114
connection := t.connection
115115
if connection != nil && !common.Done(connection.Context()) {
116116
return connection, nil
@@ -139,7 +139,7 @@ func (t *Transport) openConnection() (quic.EarlyConnection, error) {
139139
return earlyConnection, nil
140140
}
141141

142-
func (t *Transport) exchange(ctx context.Context, message *mDNS.Msg, conn quic.Connection) (*mDNS.Msg, error) {
142+
func (t *Transport) exchange(ctx context.Context, message *mDNS.Msg, conn *quic.Conn) (*mDNS.Msg, error) {
143143
stream, err := conn.OpenStreamSync(ctx)
144144
if err != nil {
145145
return nil, err

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ require (
2626
github.com/sagernet/fswatch v0.1.1
2727
github.com/sagernet/gomobile v0.1.8
2828
github.com/sagernet/gvisor v0.0.0-20250811.0-sing-box-mod.1
29-
github.com/sagernet/quic-go v0.52.0-beta.1
29+
github.com/sagernet/quic-go v0.54.0-sing-box-mod.2
3030
github.com/sagernet/sing v0.8.0-beta.2
3131
github.com/sagernet/sing-mux v0.3.3
32-
github.com/sagernet/sing-quic v0.5.2-0.20250909100920-da23407a63d5
32+
github.com/sagernet/sing-quic v0.6.0-beta.2
3333
github.com/sagernet/sing-shadowsocks v0.2.8
3434
github.com/sagernet/sing-shadowsocks2 v0.2.1
3535
github.com/sagernet/sing-shadowtls v0.2.1-0.20250503051639-fcd445d33c11

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,15 +154,15 @@ github.com/sagernet/netlink v0.0.0-20240612041022-b9a21c07ac6a h1:ObwtHN2VpqE0ZN
154154
github.com/sagernet/netlink v0.0.0-20240612041022-b9a21c07ac6a/go.mod h1:xLnfdiJbSp8rNqYEdIW/6eDO4mVoogml14Bh2hSiFpM=
155155
github.com/sagernet/nftables v0.3.0-beta.4 h1:kbULlAwAC3jvdGAC1P5Fa3GSxVwQJibNenDW2zaXr8I=
156156
github.com/sagernet/nftables v0.3.0-beta.4/go.mod h1:OQXAjvjNGGFxaTgVCSTRIhYB5/llyVDeapVoENYBDS8=
157-
github.com/sagernet/quic-go v0.52.0-beta.1 h1:hWkojLg64zjV+MJOvJU/kOeWndm3tiEfBLx5foisszs=
158-
github.com/sagernet/quic-go v0.52.0-beta.1/go.mod h1:OV+V5kEBb8kJS7k29MzDu6oj9GyMc7HA07sE1tedxz4=
157+
github.com/sagernet/quic-go v0.54.0-sing-box-mod.2 h1:g3pJ8R8cMEt1le5YslP0x3MbT1ZAmAaE+wT095eLb8k=
158+
github.com/sagernet/quic-go v0.54.0-sing-box-mod.2/go.mod h1:OV+V5kEBb8kJS7k29MzDu6oj9GyMc7HA07sE1tedxz4=
159159
github.com/sagernet/sing v0.6.9/go.mod h1:ARkL0gM13/Iv5VCZmci/NuoOlePoIsW0m7BWfln/Hak=
160160
github.com/sagernet/sing v0.8.0-beta.2 h1:3khO2eE5LMylD/v47+pnVMtFzl6lBY2v/b/V+79qpsE=
161161
github.com/sagernet/sing v0.8.0-beta.2/go.mod h1:ARkL0gM13/Iv5VCZmci/NuoOlePoIsW0m7BWfln/Hak=
162162
github.com/sagernet/sing-mux v0.3.3 h1:YFgt9plMWzH994BMZLmyKL37PdIVaIilwP0Jg+EcLfw=
163163
github.com/sagernet/sing-mux v0.3.3/go.mod h1:pht8iFY4c9Xltj7rhVd208npkNaeCxzyXCgulDPLUDA=
164-
github.com/sagernet/sing-quic v0.5.2-0.20250909100920-da23407a63d5 h1:vnRNLE0bBnz5NNbBoFH7NA7mlvNSa2Z4w+1Eb8pyX48=
165-
github.com/sagernet/sing-quic v0.5.2-0.20250909100920-da23407a63d5/go.mod h1:gi/sGED8gTWgTAp3GlzXo2D7mXYY+ERoxtGvSkNx3sI=
164+
github.com/sagernet/sing-quic v0.6.0-beta.2 h1:RHBespnerWt/PIPKpZZ3v+k4jKrQmb2MTxwTmjrBLm8=
165+
github.com/sagernet/sing-quic v0.6.0-beta.2/go.mod h1:lYeGF8RALGBlY006hdn2vsCJ5AzbYStaeNLs1C8wASg=
166166
github.com/sagernet/sing-shadowsocks v0.2.8 h1:PURj5PRoAkqeHh2ZW205RWzN9E9RtKCVCzByXruQWfE=
167167
github.com/sagernet/sing-shadowsocks v0.2.8/go.mod h1:lo7TWEMDcN5/h5B8S0ew+r78ZODn6SwVaFhvB6H+PTI=
168168
github.com/sagernet/sing-shadowsocks2 v0.2.1 h1:dWV9OXCeFPuYGHb6IRqlSptVnSzOelnqqs2gQ2/Qioo=

test/box_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ func testQUIC(t *testing.T, clientPort uint16) {
8989
dialer := socks.NewClient(N.SystemDialer, M.ParseSocksaddrHostPort("127.0.0.1", clientPort), socks.Version5, "", "")
9090
client := &http.Client{
9191
Transport: &http3.RoundTripper{
92-
Dial: func(ctx context.Context, addr string, tlsCfg *tls.Config, cfg *quic.Config) (quic.EarlyConnection, error) {
92+
Dial: func(ctx context.Context, addr string, tlsCfg *tls.Config, cfg *quic.Config) (*quic.Conn, error) {
9393
destination := M.ParseSocksaddr(addr)
9494
udpConn, err := dialer.DialContext(ctx, N.NetworkUDP, destination)
9595
if err != nil {

transport/v2rayquic/client.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ type Client struct {
2929
tlsConfig tls.Config
3030
quicConfig *quic.Config
3131
connAccess sync.Mutex
32-
conn common.TypedValue[quic.Connection]
32+
conn common.TypedValue[*quic.Conn]
3333
rawConn net.Conn
3434
}
3535

@@ -49,7 +49,7 @@ func NewClient(ctx context.Context, dialer N.Dialer, serverAddr M.Socksaddr, opt
4949
}, nil
5050
}
5151

52-
func (c *Client) offer() (quic.Connection, error) {
52+
func (c *Client) offer() (*quic.Conn, error) {
5353
conn := c.conn.Load()
5454
if conn != nil && !common.Done(conn.Context()) {
5555
return conn, nil
@@ -67,7 +67,7 @@ func (c *Client) offer() (quic.Connection, error) {
6767
return conn, nil
6868
}
6969

70-
func (c *Client) offerNew() (quic.Connection, error) {
70+
func (c *Client) offerNew() (*quic.Conn, error) {
7171
udpConn, err := c.dialer.DialContext(c.ctx, "udp", c.serverAddr)
7272
if err != nil {
7373
return nil, err

transport/v2rayquic/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ func (s *Server) acceptLoop() {
8484
}
8585
}
8686

87-
func (s *Server) streamAcceptLoop(conn quic.Connection) error {
87+
func (s *Server) streamAcceptLoop(conn *quic.Conn) error {
8888
for {
8989
stream, err := conn.AcceptStream(s.ctx)
9090
if err != nil {

transport/v2rayquic/stream.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import (
88
)
99

1010
type StreamWrapper struct {
11-
Conn quic.Connection
12-
quic.Stream
11+
Conn *quic.Conn
12+
*quic.Stream
1313
}
1414

1515
func (s *StreamWrapper) Read(p []byte) (n int, err error) {

0 commit comments

Comments
 (0)