Commit Graph

466 Commits

Author SHA1 Message Date
3458950bea chore(upnp, webrtc): add missing docs.rs metadata
Includes necessary package metadata to improve documentation on docs.rs (shows which items are behind a cfg).
Read more on: #2983

Pull-Request: #4599.
2023-10-09 02:46:32 +00:00
0e9d339bd2 ci: use workspace inheritance to enforce lints in all crates
Starting with nightly-2023-09-10, the `[lints]` section in `Cargo.toml` files is stable. Together with workspace inheritance, this can be used to declare all lints we want to enforce in a single place.

Resolves: #4484.

Pull-Request: #4575.
2023-10-09 02:20:46 +00:00
3ff354f1ef deps: bump thiserror from 1.0.48 to 1.0.49
Pull-Request: #4578.
2023-10-03 01:50:38 +00:00
90a9752dc7 deps: bump sha2 from 0.10.7 to 0.10.8
Pull-Request: #4579.
2023-10-02 09:03:11 +00:00
7f92cb0725 feat(quic): support stateless resets
Resolves #3419.

Pull-Request: #4554.
2023-10-02 00:28:32 +00:00
fffd47b69f refactor(plaintext): rename symbols to follow naming convention
Related: #2217.

Pull-Request: #4535.
2023-09-27 19:42:45 +00:00
91fb6a16eb feat(deflate): deprecate in preparation for removal
Resolves: #4522.

Pull-Request: #4540.
2023-09-27 08:32:40 +00:00
94432d83ad deps: bump smallvec from 1.11.0 to 1.11.1
Pull-Request: #4551.
2023-09-25 08:33:29 +00:00
8e1944c6e1 deps: bump curve25519-dalek from 4.1.0 to 4.1.1
Pull-Request: #4550.
2023-09-25 08:21:51 +00:00
95890b550b refactor(dns): unify symbol naming
Renamed the following
- `dns::GenDnsConfig`  ->  `dns::Config`
- `dns::DnsConfig` -> `dns::async_std::Config`
- `dns::TokioDnsConfig` -> `dns::tokio::Config`

If async-std feature is enable, use `dns::async_std::Config`. When using tokio, import `dns::tokio::Config` . There is no need to use `dns::Config` directly.

Resolves #4486.
Related: #2217.

Pull-Request: #4505.
2023-09-24 05:31:42 +00:00
600b6af314 chore: prepare non-breaking releases
Crates to be released:

- core
- misc/futures-bounded
- misc/server
- misc/webrtc-utils
- protocols/kad
- protocols/ping
- protocols/upnp
- swarm
- transports/webrtc-websys
- transports/webrtc

Pull-Request: #4537.
2023-09-22 11:02:02 +00:00
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
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
4f5b9e3afb deps: bump libc from 0.2.147 to 0.2.148
Pull-Request: #4516.
2023-09-18 09:54:13 +00:00
8a523f950f deps: bump socket2 from 0.5.3 to 0.5.4
Pull-Request: #4513.
2023-09-18 09:17:45 +00:00
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
581b1e42d0 deps: bump webrtc from 0.8.0 to 0.9.0
Pull-Request: #4475.
2023-09-12 09:30:16 +00:00
92b5721ccb deps: bump stun from 0.4.4 to 0.5.0
Pull-Request: #4482.
2023-09-12 05:34:12 +00:00
ca9fdf8b0d deps: bump curve25519-dalek from 4.0.0 to 4.1.0
Pull-Request: #4472.
2023-09-12 00:33:35 +00:00
7a94dd820a deps: bump bytes from 1.4.0 to 1.5.0
Pull-Request: #4476.
2023-09-11 09:36:26 +00:00
c0bccf724e deps: bump the trust-dns group with 2 updates
Pull-Request: #4441.
2023-09-06 17:50:18 +00:00
0cc4881740 deps: bump thiserror from 1.0.44 to 1.0.48
Pull-Request: #4430.
2023-09-04 10:23:24 +00:00
66cdcc6339 deps: bump url from 2.4.0 to 2.4.1
Pull-Request: #4431.
2023-09-04 01:50:24 +00:00
51ebaaf238 deps: bump rustls from 0.21.6 to 0.21.7
Pull-Request: #4429.
2023-09-03 13:20:58 +00:00
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
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
06bc6777a1 chore: fix lint warnings introduced by beta clippy
Pull-Request: #4386.
2023-08-24 12:27:42 +00:00
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
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
72472d075f deps: bump curve25519-dalek from 3.2.0 to 4.0.0
Pull-Request: #4358.
2023-08-21 14:52:24 +00:00
181ccf624d deps: bump tempfile from 3.7.1 to 3.8.0
Pull-Request: #4364.
2023-08-21 14:23:40 +00:00
76797f8ad0 deps: bump tokio from 1.31.0 to 1.32.0
Pull-Request: #4356.
2023-08-21 09:16:26 +00:00
68befac486 deps: bump rcgen from 0.9.3 to 0.10.0
Pull-Request: #3519.
2023-08-19 06:39:55 +00:00
d9a09b12a6 deps: bump rustls from 0.21.5 to 0.21.6
Pull-Request: #4299.
2023-08-19 01:07:48 +00:00
4873f3a7f1 deps: bump quinn from 0.10.1 to 0.10.2
Pull-Request: #4298.
2023-08-19 00:48:03 +00:00
d3da24f312 deps: bump pin-project from 1.1.2 to 1.1.3
Pull-Request: #4296.
2023-08-18 21:29:40 +00:00
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
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
2c4c961d69 deps: bump log from 0.4.19 to 0.4.20
Pull-Request: #4322.
2023-08-14 10:16:13 +00:00
a4b8ff4673 deps: bump tokio from 1.29.1 to 1.31.0
Pull-Request: #4318.
2023-08-14 09:00:31 +00:00
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
5a8eb793fe chore: prepare libp2p v0.52.2
Pull-Request: #4312.
2023-08-11 10:10:42 +00:00
02dc432227 fix(quic): allow listening on ipv4 and ipv6 separately
Resolves #4165.

Pull-Request: #4289.
2023-08-08 16:48:08 +00:00
6478fafc70 deps: bump x509-parser from 0.15.0 to 0.15.1
Pull-Request: #4297.
2023-08-07 10:47:47 +00:00
3af3d5d23a chore(quic): prepare v0.9.0-alpha
Pull-Request: #4262.
2023-07-31 11:11:57 +00:00
856d85f9b6 deps: bump webpki-roots from 0.24.0 to 0.25.1
Pull-Request: #4272.
2023-07-31 10:41:14 +00:00
ceccb8e9c0 chore: fix clippy
Pull-Request: #4267.
2023-07-31 05:53:53 +00:00
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
3f0fef2823 deps: bump asynchronous-codec from 0.6.1 to 0.6.2
Pull-Request: #4244.
2023-07-24 16:51:08 +00:00
cfa879396c deps: bump tempfile from 3.6.0 to 3.7.0
Pull-Request: #4247.
2023-07-24 16:35:29 +00:00