* Adhere to request.Context when roundtripping on a stream
This allows HTTP request timeout and cancellation to work.
Fixes#2533
* Attempt to cancel the read by setting the read deadline
* Don't spawn a goroutine in read
---------
Co-authored-by: Marco Munizaga <git@marcopolo.io>
* Add conn_limiter to limit number of conns per ip cidr
* Handle the case where we want to call OpenConnection without an IP address
* Delete key when count==0
* 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>
Rename the Transient state on connection to Limited. This is more appropriate and also
doesn't conflict with the transient resource manager scope.
Adds a Limited connectedness state for peers connected to us over Limited connections.
This allows users to ignore such peers if they are interested in only peers connected to
us over Unlimited connections.
For some peers who disconnect before we sent a Connectedness event, we will now
only send a Disconnected event.
---------
Co-authored-by: guillaumemichel <guillaume@michel.id>
Co-authored-by: sukun <sukunrt@gmail.com>
Co-authored-by: Marco Munizaga <git@marcopolo.io>
* Identify should emit useful events after identification
* Compare strings rather than objects
* Include other fields in emitted event
* Sort addrs when comparing in test
* quic: make server cmd use RFC 9000 instead of draft-29
* Move code to lib and add a test
* Change example to not rely on specific port
* Replace 0.0.0.0 with localhost
---------
Co-authored-by: Leon Rinkel <leon@rinkel.me>
* config: refactor AutoNAT construction into separate method
* config: use a lifecycle hook to start listening on swarm addresses
* use Fx to construct the host
* add a test for constructing a routed host
* use Fx hooks to start the host
* config: use Fx lifecycle hooks to start AutoRelay and for PeerRouting
* basichost: don't close the swarm
The swarm is not constructed by the basic host, thus is shouldn't be
closed by it.
* config: use Fx hook to close the quicreuse connection manager
* test for goroutine leaks when starting/stopping fx
To do this, I've had to move a few leaky tests into a separate package.
I've filed a bug for the AutoNAT issue (#2743) but the "error on
startup" issue is going to require some pretty invasive changes (we need
to construct _then_ start).
* go fmt
* Ignore one more top function
* Typo
* Ignore any not top
---------
Co-authored-by: Sukun <sukunrt@gmail.com>
Co-authored-by: Steven Allen <steven@stebalien.com>
Co-authored-by: Marco Munizaga <git@marcopolo.io>
* chore: add or force update .github/workflows/go-test.yml
* chore: add or force update .github/workflows/go-check.yml
* chore: add or force update .github/workflows/releaser.yml
* chore: add or force update .github/workflows/release-check.yml
* chore: add or force update .github/workflows/tagpush.yml
* chore: add or force update .github/workflows/go-test.yml
* chore: add or force update .github/workflows/go-check.yml
* chore: add or force update .github/workflows/releaser.yml
* chore: add or force update .github/workflows/release-check.yml
* chore: add or force update .github/workflows/tagpush.yml
* chore: add or force update .github/workflows/go-test.yml
* chore: add or force update .github/workflows/go-check.yml
* chore: add or force update .github/workflows/releaser.yml
* chore: add or force update .github/workflows/release-check.yml
* chore: add or force update .github/workflows/tagpush.yml
* Update go-check.yml
* Update go-test.yml