From c8f2d0092b53af65a4a0a2405425d92c5d29fe8e Mon Sep 17 00:00:00 2001 From: Myles Horton Date: Fri, 17 Nov 2023 19:36:02 -0500 Subject: [PATCH] bump quic and broflake (#592) * bump quic and broflake * use go 1.21 * remove tracing for now --- .github/workflows/go.yml | 2 +- go.mod | 11 +++-- go.sum | 23 +++++------ http_proxy.go | 1 - instrument/quictrace.go | 89 ---------------------------------------- 5 files changed, 16 insertions(+), 110 deletions(-) delete mode 100644 instrument/quictrace.go diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 83e820e9..68a80a1b 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -14,7 +14,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: 1.19 + go-version: 1.21 - name: Granting private modules access run: | git config --global url."https://${{ secrets.CI_PRIVATE_REPOS_GH_TOKEN }}:x-oauth-basic@github.com/".insteadOf "https://github.com/" diff --git a/go.mod b/go.mod index 3c2aaad6..c8e4eebd 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/OperatorFoundation/Starbridge-go/Starbridge/v3 v3.0.17 github.com/blang/semver v3.5.1+incompatible github.com/dustin/go-humanize v1.0.1 - github.com/getlantern/broflake v0.0.0-20231016221059-9c3632502cae + github.com/getlantern/broflake v0.0.0-20231117182649-7d46643a6f87 github.com/getlantern/cmux/v2 v2.0.0-20230301223233-dac79088a4c0 github.com/getlantern/cmuxprivate v0.0.0-20211216020409-d29d0d38be54 github.com/getlantern/enhttp v0.0.0-20210901195634-6f89d45ee033 @@ -34,7 +34,7 @@ require ( github.com/getlantern/packetforward v0.0.0-20201001150407-c68a447b0360 github.com/getlantern/proxy/v3 v3.0.0-20231031142453-252ab678e6b7 github.com/getlantern/psmux v1.5.15 - github.com/getlantern/quicwrapper v0.0.0-20230523101504-1ec066b7f869 + github.com/getlantern/quicwrapper v0.0.0-20231117185542-d951689c4970 github.com/getlantern/ratelimit v0.0.0-20220926192648-933ab81a6fc7 github.com/getlantern/tinywss v0.0.0-20211216020538-c10008a7d461 github.com/getlantern/tlsdefaults v0.0.0-20171004213447-cf35cfd0b1b4 @@ -47,7 +47,7 @@ require ( github.com/hashicorp/golang-lru v0.5.4 github.com/mitchellh/panicwrap v1.0.0 github.com/op/go-logging v0.0.0-20160315200505-970db520ece7 - github.com/quic-go/quic-go v0.34.0 + github.com/quic-go/quic-go v0.40.0 github.com/refraction-networking/utls v1.3.3 github.com/siddontang/go v0.0.0-20180604090527-bdc77568d726 github.com/spaolacci/murmur3 v1.1.0 @@ -112,7 +112,6 @@ require ( github.com/go-ole/go-ole v1.2.6 // indirect github.com/go-stack/stack v1.8.1 // indirect github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect - github.com/golang/mock v1.6.0 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/go-cmp v0.6.0 // indirect @@ -159,8 +158,7 @@ require ( github.com/prometheus/client_model v0.3.0 // indirect github.com/prometheus/common v0.42.0 // indirect github.com/prometheus/procfs v0.9.0 // indirect - github.com/quic-go/qtls-go1-19 v0.3.2 // indirect - github.com/quic-go/qtls-go1-20 v0.2.2 // indirect + github.com/quic-go/qtls-go1-20 v0.4.1 // indirect github.com/shadowsocks/go-shadowsocks2 v0.1.4-0.20201002022019-75d43273f5a5 // indirect github.com/shirou/gopsutil v3.21.11+incompatible // indirect github.com/songgao/water v0.0.0-20200317203138-2b4b6d7c09d8 // indirect @@ -180,6 +178,7 @@ require ( go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.42.0 // indirect go.opentelemetry.io/proto/otlp v1.0.0 // indirect go.uber.org/atomic v1.9.0 // indirect + go.uber.org/mock v0.3.0 // indirect go.uber.org/multierr v1.8.0 // indirect go.uber.org/zap v1.21.0 // indirect golang.org/x/crypto v0.14.0 // indirect diff --git a/go.sum b/go.sum index f55fdee2..df6415f7 100644 --- a/go.sum +++ b/go.sum @@ -70,8 +70,8 @@ github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWo github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/gaukas/godicttls v0.0.4 h1:NlRaXb3J6hAnTmWdsEKb9bcSBD6BvcIjdGdeb0zfXbk= github.com/gaukas/godicttls v0.0.4/go.mod h1:l6EenT4TLWgTdwslVb4sEMOCf7Bv0JAK67deKr9/NCI= -github.com/getlantern/broflake v0.0.0-20231016221059-9c3632502cae h1:8kLpvusHkHGjuW4f2y/OIF+vIbbpp1wM/UE4pOu9694= -github.com/getlantern/broflake v0.0.0-20231016221059-9c3632502cae/go.mod h1:Ehdl8IASN5rJi9brldVuCjTDcSU25nvaGRlzNprgeQo= +github.com/getlantern/broflake v0.0.0-20231117182649-7d46643a6f87 h1:9nUdYJp3TCKE/jTwI0mymz8FPT7jXHBRvRy2rXlKFDo= +github.com/getlantern/broflake v0.0.0-20231117182649-7d46643a6f87/go.mod h1:brzUHh6XfkSMv+K72nrfCbrPbumeHJFlZZLIUG/UMjI= github.com/getlantern/bufconn v0.0.0-20190625204133-a08544339f8d h1:gE5pWSEYfMvSETsTanqINNLmv+nuyUjwcm9jOyqJJZI= github.com/getlantern/bufconn v0.0.0-20190625204133-a08544339f8d/go.mod h1:d6O4RY+V87kIt4o9wru4SaNo7C2NAkD3YnmJFXEpODo= github.com/getlantern/bytecounting v0.0.0-20190530140808-3b3f10d3b9ab h1:bKsTXN1XgjiWuciuEChVIPFXWD8sTASsvjkMAGMEb/4= @@ -192,8 +192,8 @@ github.com/getlantern/proxy/v3 v3.0.0-20231031142453-252ab678e6b7/go.mod h1:SUQ8 github.com/getlantern/psmux v1.5.15-0.20200903210100-947ca5d91683/go.mod h1:GtXRvtMItoflWGLPE7GNq+AdL7BnmpaaNLtDQVD1XHU= github.com/getlantern/psmux v1.5.15 h1:VUCEk8MIsvAj90wNYRyY2fE9ZL4LIRhi1W5V9aycA9A= github.com/getlantern/psmux v1.5.15/go.mod h1:nyp/sr4uTbWpUh7Q2WovRb07LeLNUxDg8kAdS726FIw= -github.com/getlantern/quicwrapper v0.0.0-20230523101504-1ec066b7f869 h1:nx0sr8jXoEBbI0jHDOHIkM0z5dXotQRUSsE/e7lUGXw= -github.com/getlantern/quicwrapper v0.0.0-20230523101504-1ec066b7f869/go.mod h1:0k08ZBlQon93TrW6KmBLhLSz89qHQFR2LstGlIRgYo8= +github.com/getlantern/quicwrapper v0.0.0-20231117185542-d951689c4970 h1:ekTCi+m1TvUceBCT/6qz3/7fnljyytGW8waUW7dGQD4= +github.com/getlantern/quicwrapper v0.0.0-20231117185542-d951689c4970/go.mod h1:PEDykM1SIU8PTVRrShJ9/WVb/uBpGyl4XBgT+LKw+X4= github.com/getlantern/ratelimit v0.0.0-20220926192648-933ab81a6fc7 h1:47FJ5kTeXc3I1VPpi2hWW9I16/Y3K0cpUq/B7oWJGF8= github.com/getlantern/ratelimit v0.0.0-20220926192648-933ab81a6fc7/go.mod h1:OOqKCIkspqXtIWEex4uhH1H9l7NGekT9i3Hs591ZDk4= github.com/getlantern/reconn v0.0.0-20161128113912-7053d017511c h1:IkjF+RwRs8B/RsuD638eUFO2K/227OO2B1FLXGp17Ro= @@ -257,8 +257,6 @@ github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4er github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= -github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -445,12 +443,10 @@ github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= -github.com/quic-go/qtls-go1-19 v0.3.2 h1:tFxjCFcTQzK+oMxG6Zcvp4Dq8dx4yD3dDiIiyc86Z5U= -github.com/quic-go/qtls-go1-19 v0.3.2/go.mod h1:ySOI96ew8lnoKPtSqx2BlI5wCpUVPT05RMAlajtnyOI= -github.com/quic-go/qtls-go1-20 v0.2.2 h1:WLOPx6OY/hxtTxKV1Zrq20FtXtDEkeY00CGQm8GEa3E= -github.com/quic-go/qtls-go1-20 v0.2.2/go.mod h1:JKtK6mjbAVcUTN/9jZpvLbGxvdWIKS8uT7EiStoU1SM= -github.com/quic-go/quic-go v0.34.0 h1:OvOJ9LFjTySgwOTYUZmNoq0FzVicP8YujpV0kB7m2lU= -github.com/quic-go/quic-go v0.34.0/go.mod h1:+4CVgVppm0FNjpG3UcX8Joi/frKOH7/ciD5yGcwOO1g= +github.com/quic-go/qtls-go1-20 v0.4.1 h1:D33340mCNDAIKBqXuAvexTNMUByrYmFYVfKfDN5nfFs= +github.com/quic-go/qtls-go1-20 v0.4.1/go.mod h1:X9Nh97ZL80Z+bX/gUXMbipO6OxdiDi58b/fMC9mAL+k= +github.com/quic-go/quic-go v0.40.0 h1:GYd1iznlKm7dpHD7pOVpUvItgMPo/jrMgDWZhMCecqw= +github.com/quic-go/quic-go v0.40.0/go.mod h1:PeN7kuVJ4xZbxSv/4OX6S1USOX8MJvydwpTx31vx60c= github.com/refraction-networking/utls v1.3.3 h1:f/TBLX7KBciRyFH3bwupp+CE4fzoYKCirhdRcC490sw= github.com/refraction-networking/utls v1.3.3/go.mod h1:DlecWW1LMlMJu+9qpzzQqdHDT/C2LAe03EdpLUz/RL8= github.com/riobard/go-bloom v0.0.0-20200614022211-cdc8013cb5b3 h1:f/FNXud6gA3MNr8meMVVGxhp+QBTqY91tM8HjEuMjGg= @@ -557,6 +553,8 @@ go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI= go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.uber.org/mock v0.3.0 h1:3mUxI1No2/60yUYax92Pt8eNOEecx2D3lcXZh2NEZJo= +go.uber.org/mock v0.3.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8= go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= @@ -708,7 +706,6 @@ golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBn golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200425043458-8463f397d07c/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= diff --git a/http_proxy.go b/http_proxy.go index 7cf08ce0..514dad7f 100644 --- a/http_proxy.go +++ b/http_proxy.go @@ -896,7 +896,6 @@ func (p *Proxy) listenQUICIETF(addr string) (net.Listener, error) { config := &quicwrapper.Config{ MaxIncomingStreams: 1000, - Tracer: instrument.NewQuicTracer(p.instrument), DisablePathMTUDiscovery: true, } diff --git a/instrument/quictrace.go b/instrument/quictrace.go deleted file mode 100644 index dbe98d68..00000000 --- a/instrument/quictrace.go +++ /dev/null @@ -1,89 +0,0 @@ -package instrument - -import ( - "context" - "net" - "time" - - qlog "github.com/quic-go/quic-go/logging" -) - -// QuicTracer is a quic-go/logging.Tracer implementation which counts the sent and -// lost packets and exports the data to our instrumentation package. -type QuicTracer struct { - inst Instrument -} - -func NewQuicTracer(inst Instrument) *QuicTracer { - tracer := &QuicTracer{inst: inst} - return tracer -} - -func (t *QuicTracer) TracerForConnection(ctx context.Context, p qlog.Perspective, odcid qlog.ConnectionID) qlog.ConnectionTracer { - return &QuicConnTracer{inst: t.inst} -} - -func (t *QuicTracer) SentPacket(addr net.Addr, h *qlog.Header, size qlog.ByteCount, frames []qlog.Frame) { -} - -func (t *QuicTracer) DroppedPacket(addr net.Addr, ptype qlog.PacketType, size qlog.ByteCount, reason qlog.PacketDropReason) { - // this indicates some kind of malformed or unexpected packet from remote (vs a lost packet) -} - -func (t *QuicTracer) SentVersionNegotiationPacket(_ net.Addr, dest, src qlog.ArbitraryLenConnectionID, _ []qlog.VersionNumber) { -} - -type QuicConnTracer struct { - inst Instrument -} - -func (t *QuicConnTracer) SentPacket(hdr *qlog.ExtendedHeader, size qlog.ByteCount, ack *qlog.AckFrame, frames []qlog.Frame) { - t.inst.quicSentPacket(context.Background()) -} - -func (t *QuicConnTracer) SentLongHeaderPacket(hdr *qlog.ExtendedHeader, size qlog.ByteCount, ack *qlog.AckFrame, frames []qlog.Frame) { - // t.inst.quicSentLongHeaderPacket() -} - -func (t *QuicConnTracer) SentShortHeaderPacket(hdr *qlog.ShortHeader, size qlog.ByteCount, ack *qlog.AckFrame, frames []qlog.Frame) { - // t.inst.quicSentShortHeaderPacket() -} - -func (t *QuicConnTracer) LostPacket(level qlog.EncryptionLevel, pn qlog.PacketNumber, reason qlog.PacketLossReason) { - t.inst.quicLostPacket(context.Background()) -} - -func (t *QuicConnTracer) StartedConnection(local, remote net.Addr, srcConnID, destConnID qlog.ConnectionID) { -} -func (t *QuicConnTracer) NegotiatedVersion(chosen qlog.VersionNumber, clientVersions, serverVersions []qlog.VersionNumber) { -} -func (t *QuicConnTracer) ClosedConnection(error) {} -func (t *QuicConnTracer) SentTransportParameters(parameters *qlog.TransportParameters) {} -func (t *QuicConnTracer) ReceivedTransportParameters(parameters *qlog.TransportParameters) {} -func (t *QuicConnTracer) RestoredTransportParameters(parameters *qlog.TransportParameters) {} -func (t *QuicConnTracer) ReceivedVersionNegotiationPacket(dest, src qlog.ArbitraryLenConnectionID, versions []qlog.VersionNumber) { -} -func (t *QuicConnTracer) ReceivedLongHeaderPacket(hdr *qlog.ExtendedHeader, packetSize qlog.ByteCount, frames []qlog.Frame) { -} -func (t *QuicConnTracer) ReceivedShortHeaderPacket(hdr *qlog.ShortHeader, packetSize qlog.ByteCount, frames []qlog.Frame) { -} -func (t *QuicConnTracer) ReceivedRetry(hdr *qlog.Header) {} -func (t *QuicConnTracer) ReceivedPacket(hdr *qlog.ExtendedHeader, size qlog.ByteCount, frames []qlog.Frame) { -} -func (t *QuicConnTracer) BufferedPacket(pt qlog.PacketType, count qlog.ByteCount) {} -func (t *QuicConnTracer) DroppedPacket(pt qlog.PacketType, size qlog.ByteCount, reason qlog.PacketDropReason) { -} -func (t *QuicConnTracer) UpdatedMetrics(rttStats *qlog.RTTStats, cwnd, bytesInFlight qlog.ByteCount, packetsInFlight int) { -} -func (t *QuicConnTracer) AcknowledgedPacket(level qlog.EncryptionLevel, pn qlog.PacketNumber) {} -func (t *QuicConnTracer) UpdatedCongestionState(state qlog.CongestionState) {} -func (t *QuicConnTracer) UpdatedPTOCount(value uint32) {} -func (t *QuicConnTracer) UpdatedKeyFromTLS(level qlog.EncryptionLevel, pers qlog.Perspective) {} -func (t *QuicConnTracer) UpdatedKey(generation qlog.KeyPhase, remote bool) {} -func (t *QuicConnTracer) DroppedEncryptionLevel(level qlog.EncryptionLevel) {} -func (t *QuicConnTracer) DroppedKey(generation qlog.KeyPhase) {} -func (t *QuicConnTracer) SetLossTimer(tt qlog.TimerType, level qlog.EncryptionLevel, at time.Time) {} -func (t *QuicConnTracer) LossTimerExpired(tt qlog.TimerType, level qlog.EncryptionLevel) {} -func (t *QuicConnTracer) LossTimerCanceled() {} -func (t *QuicConnTracer) Close() {} -func (t *QuicConnTracer) Debug(name, msg string) {}