455 Commits

Author SHA1 Message Date
Thomas Eizinger
02d0ee0b3d
refactor(webrtc): remove example in favor of browser-webrtc example
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.
2023-09-21 00:47:05 +00:00
Sumit
c52a2fc3af
feat(swarm): allow configuration to idle connection timeout
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.
2023-09-19 22:32:29 +00:00
dependabot[bot]
4f5b9e3afb
deps: bump libc from 0.2.147 to 0.2.148
Pull-Request: #4516.
2023-09-18 09:54:13 +00:00
dependabot[bot]
8a523f950f
deps: bump socket2 from 0.5.3 to 0.5.4
Pull-Request: #4513.
2023-09-18 09:17:45 +00:00
Doug A
f5e644da8f
feat(webrtc): add WebRTC for WASM environments
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>
2023-09-17 19:13:11 +00:00
dependabot[bot]
581b1e42d0
deps: bump webrtc from 0.8.0 to 0.9.0
Pull-Request: #4475.
2023-09-12 09:30:16 +00:00
dependabot[bot]
92b5721ccb
deps: bump stun from 0.4.4 to 0.5.0
Pull-Request: #4482.
2023-09-12 05:34:12 +00:00
dependabot[bot]
ca9fdf8b0d
deps: bump curve25519-dalek from 4.0.0 to 4.1.0
Pull-Request: #4472.
2023-09-12 00:33:35 +00:00
dependabot[bot]
7a94dd820a
deps: bump bytes from 1.4.0 to 1.5.0
Pull-Request: #4476.
2023-09-11 09:36:26 +00:00
dependabot[bot]
c0bccf724e
deps: bump the trust-dns group with 2 updates
Pull-Request: #4441.
2023-09-06 17:50:18 +00:00
dependabot[bot]
0cc4881740
deps: bump thiserror from 1.0.44 to 1.0.48
Pull-Request: #4430.
2023-09-04 10:23:24 +00:00
dependabot[bot]
66cdcc6339
deps: bump url from 2.4.0 to 2.4.1
Pull-Request: #4431.
2023-09-04 01:50:24 +00:00
dependabot[bot]
51ebaaf238
deps: bump rustls from 0.21.6 to 0.21.7
Pull-Request: #4429.
2023-09-03 13:20:58 +00:00
Thomas Eizinger
c6984dd51d
ci: do not tolerate rustc warnings in any job
Previously, only the clippy job was denying warnings. We have many other CI jobs that compile our library in all sorts of configurations. All of them should be free of warnings.

Pull-Request: #4384.
2023-08-25 10:14:01 +00:00
Max Inden
e8759c85c2
chore: prepare libp2p v0.52.3
- Addresses TLS CVE:
- https://github.com/libp2p/rust-libp2p/pull/4381
- https://github.com/libp2p/rust-libp2p/pull/4378
- Stable QUIC https://github.com/libp2p/rust-libp2p/pull/4325
- New rust-libp2p-server release https://github.com/libp2p/rust-libp2p/pull/4311

Pull-Request: #4387.
2023-08-24 12:47:59 +00:00
Thomas Eizinger
06bc6777a1
chore: fix lint warnings introduced by beta clippy
Pull-Request: #4386.
2023-08-24 12:27:42 +00:00
MOZGIII
240c5c292a
deps(tls): switch from webpki to rustls-webpki
A simple dependency update to make the CVE detector happy.
Continuation of #4378.

Pull-Request: #4381.
2023-08-24 07:46:35 +00:00
MOZGIII
dc0a12384e
deps(websocket): bump futures-rustls to 0.24.0
A simple dependency update to make the CVE detector happy.

Pull-Request: #4378.
2023-08-23 13:34:49 +00:00
dependabot[bot]
72472d075f
deps: bump curve25519-dalek from 3.2.0 to 4.0.0
Pull-Request: #4358.
2023-08-21 14:52:24 +00:00
dependabot[bot]
181ccf624d
deps: bump tempfile from 3.7.1 to 3.8.0
Pull-Request: #4364.
2023-08-21 14:23:40 +00:00
dependabot[bot]
76797f8ad0
deps: bump tokio from 1.31.0 to 1.32.0
Pull-Request: #4356.
2023-08-21 09:16:26 +00:00
dependabot[bot]
68befac486
deps: bump rcgen from 0.9.3 to 0.10.0
Pull-Request: #3519.
2023-08-19 06:39:55 +00:00
dependabot[bot]
d9a09b12a6
deps: bump rustls from 0.21.5 to 0.21.6
Pull-Request: #4299.
2023-08-19 01:07:48 +00:00
dependabot[bot]
4873f3a7f1
deps: bump quinn from 0.10.1 to 0.10.2
Pull-Request: #4298.
2023-08-19 00:48:03 +00:00
dependabot[bot]
d3da24f312
deps: bump pin-project from 1.1.2 to 1.1.3
Pull-Request: #4296.
2023-08-18 21:29:40 +00:00
João Oliveira
bf7fe680ac
refactor(tcp): reducing branching in Transport::create_socket
Following https://github.com/libp2p/rust-libp2p/pull/4289#discussion_r1285812762, hereby is the PR to also improve the `create_socket`  using [`for_addr`](https://docs.rs/socket2/latest/socket2/struct.Domain.html#method.for_address). We also add a test for listening on IPv4 and IPv6 separately.

Pull-Request: #4328.
2023-08-18 19:30:14 +00:00
Max Inden
cbdbaa836e
feat(quic): promote to stable release
- Cut a stable release of `libp2p-quic`.
- Export `libp2p-quic` as `libp2p::quic`.
- Update examples to use `libp2p-quic` through `libp2p`.

Pull-Request: #4325.
2023-08-17 07:54:29 +00:00
dependabot[bot]
2c4c961d69
deps: bump log from 0.4.19 to 0.4.20
Pull-Request: #4322.
2023-08-14 10:16:13 +00:00
dependabot[bot]
a4b8ff4673
deps: bump tokio from 1.29.1 to 1.31.0
Pull-Request: #4318.
2023-08-14 09:00:31 +00:00
Arsenii Ronzhyn
79aca371d1
fix(quic): add support for reusing an existing socket for local dialing
Tracked in #4259. Now if a listener supports loopback interfaces, when a remote address is also a loopback address, we reuse an existing listener.

Pull-Request: #4304.
2023-08-11 12:14:37 +00:00
Max Inden
5a8eb793fe
chore: prepare libp2p v0.52.2
Pull-Request: #4312.
2023-08-11 10:10:42 +00:00
João Oliveira
02dc432227
fix(quic): allow listening on ipv4 and ipv6 separately
Resolves #4165.

Pull-Request: #4289.
2023-08-08 16:48:08 +00:00
dependabot[bot]
6478fafc70
deps: bump x509-parser from 0.15.0 to 0.15.1
Pull-Request: #4297.
2023-08-07 10:47:47 +00:00
Max Inden
3af3d5d23a
chore(quic): prepare v0.9.0-alpha
Pull-Request: #4262.
2023-07-31 11:11:57 +00:00
dependabot[bot]
856d85f9b6
deps: bump webpki-roots from 0.24.0 to 0.25.1
Pull-Request: #4272.
2023-07-31 10:41:14 +00:00
João Oliveira
ceccb8e9c0
chore: fix clippy
Pull-Request: #4267.
2023-07-31 05:53:53 +00:00
Roman
4e1fa9b8b8
refactor(quic): rewrite quic using quinn
Rewrite quic using quinn instead of quinn-proto. libp2p-quic::endpoint::Driver is eliminated (and that hard quinn-proto machinery). Also:
- ECN bits are handled
- Support Generic Send Offload (GSO)

Pull-Request: #3454.
2023-07-28 10:22:03 +00:00
dependabot[bot]
3f0fef2823
deps: bump asynchronous-codec from 0.6.1 to 0.6.2
Pull-Request: #4244.
2023-07-24 16:51:08 +00:00
dependabot[bot]
cfa879396c
deps: bump tempfile from 3.6.0 to 3.7.0
Pull-Request: #4247.
2023-07-24 16:35:29 +00:00
dependabot[bot]
12c98dca35
deps: bump either from 1.8.1 to 1.9.0
Pull-Request: #4243.
2023-07-24 16:02:14 +00:00
dependabot[bot]
521eea2d01
deps: bump thiserror from 1.0.43 to 1.0.44
Pull-Request: #4242.
2023-07-24 15:46:36 +00:00
Thomas Eizinger
d3b4714730
chore: apply suggestions from clippy beta (1.72)
Pull-Request: #4211.
2023-07-18 08:45:26 +00:00
dependabot[bot]
efdba39f83
deps: bump thiserror from 1.0.40 to 1.0.43
Pull-Request: #4174.
2023-07-17 08:45:14 +00:00
Benno
30024f38d4
fix: clippy useless_conversion and useless_vec
Pull-Request: #4190.
2023-07-16 03:31:37 +00:00
dependabot[bot]
4ddaa550c7
deps: bump webpki-roots from 0.23.1 to 0.24.0
Pull-Request: #4177.
2023-07-11 11:11:24 +00:00
dependabot[bot]
a92a801cce
deps: bump smallvec from 1.10.0 to 1.11.0
Pull-Request: #4171.
2023-07-11 08:58:09 +00:00
dependabot[bot]
185cb4a2e3
deps: bump tokio from 1.28.2 to 1.29.1
Pull-Request: #4148.
2023-07-10 09:31:15 +00:00
dependabot[bot]
ed4b4644d1
deps: bump pin-project from 1.1.0 to 1.1.2
Pull-Request: #4146.
2023-07-03 15:34:26 +00:00
Max Inden
e32775d6fb
chore(webrtc): prepare v0.6.0-alpha
Pull-Request: #4123.


  
Co-Authored-By: Max Inden <mail@max-inden.de>
2023-06-26 23:58:49 +00:00
dependabot[bot]
8b91c89775
deps: bump libc from 0.2.146 to 0.2.147
Pull-Request: #4113.
2023-06-26 11:29:05 +00:00