We've moved away from having individual examples in crates in #3111. This one in `transports/webrtc` seems to have slipped through.
Pull-Request: #4531.
Introduces blanket implementation of `{In,Out}boundConnectionUpgrade` and uses it in transport upgrade infrastructure.
Resolves: #4307.
Pull-Request: #4316.
Previously, a connection would be shut down immediately as soon as its `ConnectionHandler` reports `KeepAlive::No`. As we have gained experience with libp2p, it turned out that this isn't ideal.
For one, tests often need to keep connections alive longer than the configured protocols require. Plus, some usecases require connections to be kept alive in general.
Both of these needs are currently served by the `keep_alive::Behaviour`. That one does essentially nothing other than statically returning `KeepAlive::Yes` from its `ConnectionHandler`.
It makes much more sense to deprecate `keep_alive::Behaviour` and instead allow users to globally configure an `idle_conncetion_timeout` on the `Swarm`. This timeout comes into effect once a `ConnectionHandler` reports `KeepAlive::No`. To start with, this timeout is 0. Together with https://github.com/libp2p/rust-libp2p/issues/3844, this will allow us to move towards a much more aggressive closing of idle connections, together with a more ergonomic way of opting out of this behaviour.
Fixes#4121.
Pull-Request: #4161.
This PR implements `Transport` for WebRTC for browsers by using web-sys. Only the `webrtc-direct` spec is implemented. The `webrtc` spec for connecting two browsers with each other is left to a future PR.
Related: https://github.com/libp2p/specs/issues/475.
Related #2617.
Supersedes: #4229.
Pull-Request: #4248.
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
We run this workflow in several contexts: `pull_request`, `tags` and `push`. For the events that are not `pull_request`, this property won't be defined, i.e. be `undefined`. Negating that should yield `true` which is what we want: push the image for the `master` branch and on new tags that start with `libp2p-server-*`.
Pull-Request: #4502.
These two are currently always re-built on every run. We don't need `wasm-opt` if we build the WASM in debug mode and we can install `wasm-pack` by downloading it from a URL.
Pull-Request: #4497.
Implements UPnP via the IGD protocol. The usage of IGD is an implementation detail and is planned to be extended to support NATpnp.
Resolves: #3903.
Pull-Request: #4156.
Configuration files generated by Kubo <= v0.22 list both `/quic` and `/quic-v1` listen addresses with the same UDP port. Given that we enable draft-29, the two addresses are treated the same by rust-libp2p's QUIC implementation. Though calling `listen_on` with both results in an "Address already in use" error by the OS on the second call. To prevent this from happening filter out `/quic` addresses in favor of `/quic-v1`.
Pull-Request: #4467.
This PR adds a delay to ping connection handler after exceeding the failure rate to prevent opening a outbound stream right after an error.
Resolves#4410.
Pull-Request: #4423.
When we moved our examples, the hole-punching docs were not updated for the new names of the binaries. We adjust them such that the tutorial works again.
Pull-Request: #4458.