Browse Source

Update github.com/quic-go/quic-go dependency (#2780)

* Update github.com/quic-go/quic-go dependency

* Revert some dependency updates

* Revert more changes

* Update dependencies in examples and test-plans

* Revert "Update dependencies in examples and test-plans"

This reverts commit e03cb1d36c.

* mod tidy in test-plans

Tidy in test-plans because we want to test the head for interop

---------

Co-authored-by: Marco Munizaga <git@marcopolo.io>
pull/2792/head
Matthias Fasching 6 months ago
committed by GitHub
parent
commit
a86d94e408
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 4
      go.mod
  2. 8
      go.sum
  3. 18
      p2p/transport/webtransport/transport.go
  4. 4
      test-plans/go.mod
  5. 8
      test-plans/go.sum

4
go.mod

@ -51,8 +51,8 @@ require (
github.com/pion/webrtc/v3 v3.2.23
github.com/prometheus/client_golang v1.18.0
github.com/prometheus/client_model v0.6.0
github.com/quic-go/quic-go v0.42.0
github.com/quic-go/webtransport-go v0.6.0
github.com/quic-go/quic-go v0.43.1
github.com/quic-go/webtransport-go v0.8.0
github.com/raulk/go-watchdog v1.3.0
github.com/stretchr/testify v1.8.4
go.uber.org/fx v1.20.1

8
go.sum

@ -357,10 +357,10 @@ github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k
github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo=
github.com/quic-go/qpack v0.4.0 h1:Cr9BXA1sQS2SmDUWjSofMPNKmvF6IiIfDRmgU0w1ZCo=
github.com/quic-go/qpack v0.4.0/go.mod h1:UZVnYIfi5GRk+zI9UMaCPsmZ2xKJP7XBUvVyT1Knj9A=
github.com/quic-go/quic-go v0.42.0 h1:uSfdap0eveIl8KXnipv9K7nlwZ5IqLlYOpJ58u5utpM=
github.com/quic-go/quic-go v0.42.0/go.mod h1:132kz4kL3F9vxhW3CtQJLDVwcFe5wdWeJXXijhsO57M=
github.com/quic-go/webtransport-go v0.6.0 h1:CvNsKqc4W2HljHJnoT+rMmbRJybShZ0YPFDD3NxaZLY=
github.com/quic-go/webtransport-go v0.6.0/go.mod h1:9KjU4AEBqEQidGHNDkZrb8CAa1abRaosM2yGOyiikEc=
github.com/quic-go/quic-go v0.43.1 h1:fLiMNfQVe9q2JvSsiXo4fXOEguXHGGl9+6gLp4RPeZQ=
github.com/quic-go/quic-go v0.43.1/go.mod h1:132kz4kL3F9vxhW3CtQJLDVwcFe5wdWeJXXijhsO57M=
github.com/quic-go/webtransport-go v0.8.0 h1:HxSrwun11U+LlmwpgM1kEqIqH90IT4N8auv/cD7QFJg=
github.com/quic-go/webtransport-go v0.8.0/go.mod h1:N99tjprW432Ut5ONql/aUhSLT0YVSlwHohQsuac9WaM=
github.com/raulk/go-watchdog v1.3.0 h1:oUmdlHxdkXRJlwfG0O9omj8ukerm8MEQavSiDTEtBsk=
github.com/raulk/go-watchdog v1.3.0/go.mod h1:fIvOnLbF0b0ZwkB9YU4mOW9Did//4vPZtDqv66NfsMU=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=

18
p2p/transport/webtransport/transport.go

@ -79,7 +79,7 @@ type transport struct {
noise *noise.Transport
connMx sync.Mutex
conns map[uint64]*conn // using quic-go's ConnectionTracingKey as map key
conns map[quic.ConnectionTracingID]*conn // using quic-go's ConnectionTracingKey as map key
}
var _ tpt.Transport = &transport{}
@ -105,7 +105,7 @@ func New(key ic.PrivKey, psk pnet.PSK, connManager *quicreuse.ConnManager, gater
gater: gater,
clock: clock.New(),
connManager: connManager,
conns: map[uint64]*conn{},
conns: map[quic.ConnectionTracingID]*conn{},
}
for _, opt := range opts {
if err := opt(t); err != nil {
@ -203,12 +203,10 @@ func (t *transport) dial(ctx context.Context, addr ma.Multiaddr, url, sni string
return nil, err
}
dialer := webtransport.Dialer{
RoundTripper: &http3.RoundTripper{
Dial: func(ctx context.Context, addr string, tlsCfg *tls.Config, cfg *quic.Config) (quic.EarlyConnection, error) {
return conn.(quic.EarlyConnection), nil
},
QuicConfig: t.connManager.ClientConfig().Clone(),
DialAddr: func(ctx context.Context, addr string, tlsCfg *tls.Config, cfg *quic.Config) (quic.EarlyConnection, error) {
return conn.(quic.EarlyConnection), nil
},
QUICConfig: t.connManager.ClientConfig().Clone(),
}
rsp, sess, err := dialer.Dial(ctx, url, nil)
if err != nil {
@ -349,7 +347,7 @@ func (t *transport) allowWindowIncrease(conn quic.Connection, size uint64) bool
t.connMx.Lock()
defer t.connMx.Unlock()
c, ok := t.conns[conn.Context().Value(quic.ConnectionTracingKey).(uint64)]
c, ok := t.conns[conn.Context().Value(quic.ConnectionTracingKey).(quic.ConnectionTracingID)]
if !ok {
return false
}
@ -358,13 +356,13 @@ func (t *transport) allowWindowIncrease(conn quic.Connection, size uint64) bool
func (t *transport) addConn(sess *webtransport.Session, c *conn) {
t.connMx.Lock()
t.conns[sess.Context().Value(quic.ConnectionTracingKey).(uint64)] = c
t.conns[sess.Context().Value(quic.ConnectionTracingKey).(quic.ConnectionTracingID)] = c
t.connMx.Unlock()
}
func (t *transport) removeConn(sess *webtransport.Session) {
t.connMx.Lock()
delete(t.conns, sess.Context().Value(quic.ConnectionTracingKey).(uint64))
delete(t.conns, sess.Context().Value(quic.ConnectionTracingKey).(quic.ConnectionTracingID))
t.connMx.Unlock()
}

4
test-plans/go.mod

@ -87,8 +87,8 @@ require (
github.com/prometheus/common v0.47.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/quic-go/qpack v0.4.0 // indirect
github.com/quic-go/quic-go v0.42.0 // indirect
github.com/quic-go/webtransport-go v0.6.0 // indirect
github.com/quic-go/quic-go v0.43.1 // indirect
github.com/quic-go/webtransport-go v0.8.0 // indirect
github.com/raulk/go-watchdog v1.3.0 // indirect
github.com/spaolacci/murmur3 v1.1.0 // indirect
github.com/stretchr/testify v1.8.4 // indirect

8
test-plans/go.sum

@ -309,10 +309,10 @@ github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k
github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo=
github.com/quic-go/qpack v0.4.0 h1:Cr9BXA1sQS2SmDUWjSofMPNKmvF6IiIfDRmgU0w1ZCo=
github.com/quic-go/qpack v0.4.0/go.mod h1:UZVnYIfi5GRk+zI9UMaCPsmZ2xKJP7XBUvVyT1Knj9A=
github.com/quic-go/quic-go v0.42.0 h1:uSfdap0eveIl8KXnipv9K7nlwZ5IqLlYOpJ58u5utpM=
github.com/quic-go/quic-go v0.42.0/go.mod h1:132kz4kL3F9vxhW3CtQJLDVwcFe5wdWeJXXijhsO57M=
github.com/quic-go/webtransport-go v0.6.0 h1:CvNsKqc4W2HljHJnoT+rMmbRJybShZ0YPFDD3NxaZLY=
github.com/quic-go/webtransport-go v0.6.0/go.mod h1:9KjU4AEBqEQidGHNDkZrb8CAa1abRaosM2yGOyiikEc=
github.com/quic-go/quic-go v0.43.1 h1:fLiMNfQVe9q2JvSsiXo4fXOEguXHGGl9+6gLp4RPeZQ=
github.com/quic-go/quic-go v0.43.1/go.mod h1:132kz4kL3F9vxhW3CtQJLDVwcFe5wdWeJXXijhsO57M=
github.com/quic-go/webtransport-go v0.8.0 h1:HxSrwun11U+LlmwpgM1kEqIqH90IT4N8auv/cD7QFJg=
github.com/quic-go/webtransport-go v0.8.0/go.mod h1:N99tjprW432Ut5ONql/aUhSLT0YVSlwHohQsuac9WaM=
github.com/raulk/go-watchdog v1.3.0 h1:oUmdlHxdkXRJlwfG0O9omj8ukerm8MEQavSiDTEtBsk=
github.com/raulk/go-watchdog v1.3.0/go.mod h1:fIvOnLbF0b0ZwkB9YU4mOW9Did//4vPZtDqv66NfsMU=
github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ=

Loading…
Cancel
Save