* transport/webtransport: close the challenge stream
Once the challenge succeeded there is no reason to keep the challenge stream open, it will never be used again.
* webtransport: defer closing of challenge stream
---------
Co-authored-by: Marten Seemann <martenseemann@gmail.com>
* Remove duplicate `SetProtocol` call
* Don't log if transport ErrListenerClosed
* Close the conn scope in webtransport dial
* Mock resource scope span
* Add transport rcmgr integration test
* PR nits
* Fix flakiness
* Threadsafe way of waiting for all streams
* Expand comment
* Revert "websocket: don't set a WSS multiaddr for accepted unencrypted conns (#2199)"
This reverts commit eeb685f68f.
* Revert "websocket: Don't limit message sizes in the websocket reader (#2193)"
This reverts commit 2fe6600ca4.
* Revert "websocket: Replace gorilla websocket transport with nhooyr websocket transport (#1982)"
* websocket: don't set a WSS multiaddr for accepted unencrypted conns
This solves a deadlock when AddCertHashes is called before Listen.
It also means that we're initializing a certmanaer even if we're only using the
WebTransport transport for dialing and not for listening, but that's a fringe
use case anyway.
* Add helpers to transform webtransport multiaddrs in AddrsFactory
* Remove unused line
* PR nits
* Add wrapper around AddrsFactory to fill in missing certhash
* PR nits
* Handle WebTransport multiaddrs in observed addr manager
* Remove unneccessary change
* Remove unused func
* Use SplitLast
* Add comment
* Clone multiaddr before splitting last
* Revert "Clone multiaddr before splitting last"
This reverts commit f168a8e8b6.
* Wait for certmanager to be instantiated
* Copy addrs slice before modifying
* Fix stalled test
* bump go.mod to Go 1.19 and run go fix
* stop using the deprecated io/ioutil package
* bump go.mod to Go 1.19 and run go fix
* bump go.mod to Go 1.19 and run go fix
* bump go.mod to Go 1.19 and run go fix
* stop using the deprecated io/ioutil package
* bump go.mod to Go 1.19 and run go fix
* stop using the deprecated io/ioutil package
* update .github/workflows/go-test.yml
* update .github/workflows/go-check.yml
* update .github/workflows/release-check.yml
* various fixes
* stop using deprecated math/rand.Read
---------
Co-authored-by: web3-bot <web3-bot@users.noreply.github.com>
Co-authored-by: Marten Seemann <martenseemann@gmail.com>
* rcmgr: Fix connection accounting
* Always close conn scope in the case of errors
* circuitv2: fix resource accounting when connection upgrading fails
---------
Co-authored-by: Marten Seemann <martenseemann@gmail.com>
That way, it won't be possible to construct a host with a PSK
when WebTransport is enabled. This is desireable since WebTransport doesn't
support private network (same as QUIC).
* Revert "transport.Listener returns a list of multiaddrs"
This reverts commit 8962b2ae33.
* Support multiple QUIC versions on the same listener
* No long running accept loop
* Don't use a goroutine
* PR comments
* quic: add an integration test for QUIC version support
* quic: refactor the stateless reset test
* quic: simplify the interface of the noreuseConn
DecreaseCount now closes the underlying UDP conn, so that callers don't
need to pay attention if they're dealing with a reuseConn or a
noreuseConn.
* implement a quicreuse to manage QUIC connections
* quicreuse: introduce options
* config: construct the quicreuse.ConnManager using fx
* webtransport: use the quicreuse
* add integration test for QUIC and WebTranport sharing the same UDP addr
* Handle errors in accept loop goroutine
* Add comment
* Remove todo
* Rename mutexes
* Cleanup extra close
* Only log on err
* Use webtransport-go 0.4.0
* Fix expected error
Co-authored-by: Marco Munizaga <git@marcopolo.io>
* transport.Listener returns a list of multiaddrs
* Support both QUIC versions in QUIC transport
* Support only QUIC v1 in webtransport
* Update dialMatcher
* Update tests
* Only use draft 29 when dialing if the server is a draft 29 server
* Removes QUIC draft 29 addrs if we have a QUIC v1 addr
* Lint fix
* Add changes to deterministic certhashes after rebase
* Update p2p/transport/quic/options.go
Co-authored-by: Marten Seemann <martenseemann@gmail.com>
* Update p2p/transport/quic/listener.go
Co-authored-by: Marten Seemann <martenseemann@gmail.com>
* Update p2p/transport/quic/quic_multiaddr.go
Co-authored-by: Marten Seemann <martenseemann@gmail.com>
* Stylize QUIC correctly
* Update doc around ListenClose
* Preallocate a bit extra to avoid paying for an allocation later
* Keep a list of multiaddrs, then join
* PR nits
* Close transport or listener just once
* Update go-multiaddr
Co-authored-by: Marten Seemann <martenseemann@gmail.com>
* Use deterministic TLS certificates for webtransport
* Update test to work with buckets
* Make sure to overlap and use a random offset
* Fixup mistaken change in other test
* Add QuickCheck tests for cert behavior
* Lint fix
* Add more tests
* Add webtransport integration test
* Use same key
* Actually offset by at least clockSkew
* Use seeded key for certs after reboot test
* PR comments
* Remove debug code
* Fix calculation for cert having been valid
Fixes the logic that a cert has been valid for a clockSkew by
subtracting the clockSkew from the start time rather than incorporating
it into the offset. The offset should be used to shift the buckets.
* Update comment
* Lint fix
* Update TestGetCurrentBucketStartTimeIsWithinBounds to include clockSkew calculation
* Rebase fixes