Skip to content

Commit 63540fe

Browse files
committed
Update quic-go to v0.57.1
1 parent 230904b commit 63540fe

File tree

4 files changed

+10
-45
lines changed

4 files changed

+10
-45
lines changed

congestion_meta1/cubic_sender.go

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import (
44
"fmt"
55

66
"github.com/sagernet/quic-go/congestion"
7-
"github.com/sagernet/quic-go/logging"
87
"github.com/sagernet/quic-go/monotime"
8+
"github.com/sagernet/quic-go/qlog"
99
)
1010

1111
const (
@@ -57,8 +57,7 @@ type cubicSender struct {
5757

5858
maxDatagramSize congestion.ByteCount
5959

60-
lastState logging.CongestionState
61-
tracer *logging.ConnectionTracer
60+
lastState qlog.CongestionState
6261
}
6362

6463
var _ congestion.CongestionControl = &cubicSender{}
@@ -68,15 +67,13 @@ func NewCubicSender(
6867
clock Clock,
6968
initialMaxDatagramSize congestion.ByteCount,
7069
reno bool,
71-
tracer *logging.ConnectionTracer,
7270
) *cubicSender {
7371
return newCubicSender(
7472
clock,
7573
reno,
7674
initialMaxDatagramSize,
7775
initialCongestionWindow*initialMaxDatagramSize,
7876
MaxCongestionWindowPackets*initialMaxDatagramSize,
79-
tracer,
8077
)
8178
}
8279

@@ -86,7 +83,6 @@ func newCubicSender(
8683
initialMaxDatagramSize,
8784
initialCongestionWindow,
8885
initialMaxCongestionWindow congestion.ByteCount,
89-
tracer *logging.ConnectionTracer,
9086
) *cubicSender {
9187
c := &cubicSender{
9288
largestSentPacketNumber: InvalidPacketNumber,
@@ -99,14 +95,9 @@ func newCubicSender(
9995
cubic: NewCubic(clock),
10096
clock: clock,
10197
reno: reno,
102-
tracer: tracer,
10398
maxDatagramSize: initialMaxDatagramSize,
10499
}
105100
c.pacer = newPacer(c.BandwidthEstimate)
106-
if c.tracer != nil {
107-
c.lastState = logging.CongestionStateSlowStart
108-
c.tracer.UpdatedCongestionState(logging.CongestionStateSlowStart)
109-
}
110101
return c
111102
}
112103

@@ -167,7 +158,6 @@ func (c *cubicSender) MaybeExitSlowStart() {
167158
c.hybridSlowStart.ShouldExitSlowStart(c.rttStats.LatestRTT(), c.rttStats.MinRTT(), c.GetCongestionWindow()/c.maxDatagramSize) {
168159
// exit slow start
169160
c.slowStartThreshold = c.congestionWindow
170-
c.maybeTraceStateChange(logging.CongestionStateCongestionAvoidance)
171161
}
172162
}
173163

@@ -194,7 +184,6 @@ func (c *cubicSender) OnCongestionEvent(packetNumber congestion.PacketNumber, lo
194184
return
195185
}
196186
c.lastCutbackExitedSlowstart = c.InSlowStart()
197-
c.maybeTraceStateChange(logging.CongestionStateRecovery)
198187

199188
if c.reno {
200189
c.congestionWindow = congestion.ByteCount(float64(c.congestionWindow) * renoBeta)
@@ -223,7 +212,6 @@ func (c *cubicSender) maybeIncreaseCwnd(
223212
// the current window.
224213
if !c.isCwndLimited(priorInFlight) {
225214
c.cubic.OnApplicationLimited()
226-
c.maybeTraceStateChange(logging.CongestionStateApplicationLimited)
227215
return
228216
}
229217
if c.congestionWindow >= c.maxCongestionWindow() {
@@ -232,11 +220,9 @@ func (c *cubicSender) maybeIncreaseCwnd(
232220
if c.InSlowStart() {
233221
// TCP slow start, exponential growth, increase by one for each ACK.
234222
c.congestionWindow += c.maxDatagramSize
235-
c.maybeTraceStateChange(logging.CongestionStateSlowStart)
236223
return
237224
}
238225
// Congestion avoidance
239-
c.maybeTraceStateChange(logging.CongestionStateCongestionAvoidance)
240226
if c.reno {
241227
// Classic Reno congestion avoidance.
242228
c.numAckedPackets++
@@ -297,14 +283,6 @@ func (c *cubicSender) OnConnectionMigration() {
297283
c.slowStartThreshold = c.initialMaxCongestionWindow
298284
}
299285

300-
func (c *cubicSender) maybeTraceStateChange(new logging.CongestionState) {
301-
if c.tracer == nil || new == c.lastState {
302-
return
303-
}
304-
c.tracer.UpdatedCongestionState(new)
305-
c.lastState = new
306-
}
307-
308286
func (c *cubicSender) SetMaxDatagramSize(s congestion.ByteCount) {
309287
if s < c.maxDatagramSize {
310288
panic(fmt.Sprintf("congestion BUG: decreased max datagram size from %d to %d", c.maxDatagramSize, s))

go.mod

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,15 @@ go 1.24.0
44

55
require (
66
github.com/gofrs/uuid/v5 v5.3.2
7-
github.com/sagernet/quic-go v0.55.0-sing-box-mod.2
7+
github.com/sagernet/quic-go v0.57.1-sing-box-mod.1
88
github.com/sagernet/sing v0.8.0-beta.5
99
golang.org/x/crypto v0.42.0
1010
golang.org/x/exp v0.0.0-20250911091902-df9299821621
1111
)
1212

1313
require (
14-
github.com/quic-go/qpack v0.5.1 // indirect
15-
golang.org/x/mod v0.28.0 // indirect
14+
github.com/quic-go/qpack v0.6.0 // indirect
1615
golang.org/x/net v0.44.0 // indirect
17-
golang.org/x/sync v0.17.0 // indirect
1816
golang.org/x/sys v0.36.0 // indirect
1917
golang.org/x/text v0.29.0 // indirect
20-
golang.org/x/tools v0.37.0 // indirect
2118
)

go.sum

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,25 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
22
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
33
github.com/gofrs/uuid/v5 v5.3.2 h1:2jfO8j3XgSwlz/wHqemAEugfnTlikAYHhnqQ8Xh4fE0=
44
github.com/gofrs/uuid/v5 v5.3.2/go.mod h1:CDOjlDMVAtN56jqyRUZh58JT31Tiw7/oQyEXZV+9bD8=
5-
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
6-
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
75
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
86
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
9-
github.com/quic-go/qpack v0.5.1 h1:giqksBPnT/HDtZ6VhtFKgoLOWmlyo9Ei6u9PqzIMbhI=
10-
github.com/quic-go/qpack v0.5.1/go.mod h1:+PC4XFrEskIVkcLzpEkbLqq1uCoxPhQuvK5rH1ZgaEg=
11-
github.com/sagernet/quic-go v0.55.0-sing-box-mod.2 h1:I79gW4Xl5ciVARHfnp122lDAMhC0AwUCU765Q8Kxdfo=
12-
github.com/sagernet/quic-go v0.55.0-sing-box-mod.2/go.mod h1:IE9naq7Kekj0rPAdWc0GLW1ENR7gAOQV9VRTDlKN8Bk=
7+
github.com/quic-go/qpack v0.6.0 h1:g7W+BMYynC1LbYLSqRt8PBg5Tgwxn214ZZR34VIOjz8=
8+
github.com/quic-go/qpack v0.6.0/go.mod h1:lUpLKChi8njB4ty2bFLX2x4gzDqXwUpaO1DP9qMDZII=
9+
github.com/sagernet/quic-go v0.57.1-sing-box-mod.1 h1:6fhKbfA0b7L1CVekayV1g87uJFtMXFE0rFXR48SRrWI=
10+
github.com/sagernet/quic-go v0.57.1-sing-box-mod.1/go.mod h1:OqILvS182CyOol5zNNo6bguvOGgXzV459+chpRaUC+4=
1311
github.com/sagernet/sing v0.8.0-beta.5 h1:Cm4CnLQGNyG5Jl1U9pKWAjFUcbjchGGqn1xeXzfI5kw=
1412
github.com/sagernet/sing v0.8.0-beta.5/go.mod h1:ARkL0gM13/Iv5VCZmci/NuoOlePoIsW0m7BWfln/Hak=
15-
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
16-
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
13+
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
14+
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
1715
golang.org/x/crypto v0.42.0 h1:chiH31gIWm57EkTXpwnqf8qeuMUi0yekh6mT2AvFlqI=
1816
golang.org/x/crypto v0.42.0/go.mod h1:4+rDnOTJhQCx2q7/j6rAN5XDw8kPjeaXEUR2eL94ix8=
1917
golang.org/x/exp v0.0.0-20250911091902-df9299821621 h1:2id6c1/gto0kaHYyrixvknJ8tUK/Qs5IsmBtrc+FtgU=
2018
golang.org/x/exp v0.0.0-20250911091902-df9299821621/go.mod h1:TwQYMMnGpvZyc+JpB/UAuTNIsVJifOlSkrZkhcvpVUk=
21-
golang.org/x/mod v0.28.0 h1:gQBtGhjxykdjY9YhZpSlZIsbnaE2+PgjfLWUQTnoZ1U=
22-
golang.org/x/mod v0.28.0/go.mod h1:yfB/L0NOf/kmEbXjzCPOx1iK1fRutOydrCMsqRhEBxI=
2319
golang.org/x/net v0.44.0 h1:evd8IRDyfNBMBTTY5XRF1vaZlD+EmWx6x8PkhR04H/I=
2420
golang.org/x/net v0.44.0/go.mod h1:ECOoLqd5U3Lhyeyo/QDCEVQ4sNgYsqvCZ722XogGieY=
25-
golang.org/x/sync v0.17.0 h1:l60nONMj9l5drqw6jlhIELNv9I0A4OFgRsG9k2oT9Ug=
26-
golang.org/x/sync v0.17.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
2721
golang.org/x/sys v0.36.0 h1:KVRy2GtZBrk1cBYA7MKu5bEZFxQk4NIDV6RLVcC8o0k=
2822
golang.org/x/sys v0.36.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
2923
golang.org/x/text v0.29.0 h1:1neNs90w9YzJ9BocxfsQNHKuAT4pkghyXc4nhZ6sJvk=
3024
golang.org/x/text v0.29.0/go.mod h1:7MhJOA9CD2qZyOKYazxdYMF85OwPdEr9jTtBpO7ydH4=
31-
golang.org/x/tools v0.37.0 h1:DVSRzp7FwePZW356yEAChSdNcQo6Nsp+fex1SUW09lE=
32-
golang.org/x/tools v0.37.0/go.mod h1:MBN5QPQtLMHVdvsbtarmTNukZDdgwdwlO5qGacAzF0w=
3325
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
3426
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

tuic/congestion.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ func setCongestion(ctx context.Context, connection *quic.Conn, congestionName st
2323
congestion_meta1.DefaultClock{TimeFunc: timeFunc},
2424
congestion.ByteCount(connection.Config().InitialPacketSize),
2525
false,
26-
nil,
2726
),
2827
)
2928
case "new_reno":
@@ -32,7 +31,6 @@ func setCongestion(ctx context.Context, connection *quic.Conn, congestionName st
3231
congestion_meta1.DefaultClock{TimeFunc: timeFunc},
3332
congestion.ByteCount(connection.Config().InitialPacketSize),
3433
true,
35-
nil,
3634
),
3735
)
3836
case "bbr_meta_v1":

0 commit comments

Comments
 (0)