Skip to content

Commit 0659765

Browse files
committed
Merge remote-tracking branch 'origin/main' into feat-multipath
2 parents 8f1cb97 + 9f00137 commit 0659765

File tree

9 files changed

+45
-21
lines changed

9 files changed

+45
-21
lines changed

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@
22

33
All notable changes to iroh will be documented in this file.
44

5-
## [0.95.0](https://github.com/n0-computer/iroh/compare/v0.94.1..0.95.0) - 2025-11-04
5+
## [0.95.1](https://github.com/n0-computer/iroh/compare/v0.95.0..0.95.1) - 2025-11-05
6+
7+
### 🚜 Refactor
8+
9+
- [**breaking**] Make `OutgoingZeroRttConnection` implement `Clone` ([#3607](https://github.com/n0-computer/iroh/issues/3607)) - ([721bd2d](https://github.com/n0-computer/iroh/commit/721bd2d9cf386807a750a7d5abe42d8aed5aacc6))
10+
11+
## [0.95.0](https://github.com/n0-computer/iroh/compare/v0.94.1..v0.95.0) - 2025-11-04
612

713
### ⛰️ Features
814

@@ -28,6 +34,7 @@ All notable changes to iroh will be documented in this file.
2834

2935
- *(iroh)* Update wasm-bindgen version to fix CI ([#3589](https://github.com/n0-computer/iroh/issues/3589)) - ([0f4c15c](https://github.com/n0-computer/iroh/commit/0f4c15cbcad1fac13b3b60aba825d975a8843e46))
3036
- [**breaking**] Update redb to version 3 ([#3562](https://github.com/n0-computer/iroh/issues/3562)) - ([b057b91](https://github.com/n0-computer/iroh/commit/b057b91b26162b6e6aadac48eb82e6567acf7ef3))
37+
- Release - ([238925a](https://github.com/n0-computer/iroh/commit/238925a339b3747dd4e4cb207d6dd3e82aae4b5c))
3138

3239
## [0.94.1](https://github.com/n0-computer/iroh/compare/v0.94.0..v0.94.1) - 2025-10-22
3340

Cargo.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

iroh-base/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "iroh-base"
3-
version = "0.95.0"
3+
version = "0.95.1"
44
edition = "2024"
55
readme = "README.md"
66
description = "base type and utilities for Iroh"

iroh-dns-server/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "iroh-dns-server"
3-
version = "0.95.0"
3+
version = "0.95.1"
44
edition = "2024"
55
description = "A pkarr relay and DNS server"
66
license = "MIT OR Apache-2.0"

iroh-relay/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "iroh-relay"
3-
version = "0.95.0"
3+
version = "0.95.1"
44
edition = "2024"
55
readme = "README.md"
66
description = "Iroh's relay server and client"
@@ -31,7 +31,7 @@ http = "1"
3131
http-body-util = "0.1.0"
3232
hyper = { version = "1", features = ["server", "client", "http1"] }
3333
hyper-util = "0.1.1"
34-
iroh-base = { version = "0.95.0", path = "../iroh-base", default-features = false, features = ["key", "relay"] }
34+
iroh-base = { version = "0.95.1", path = "../iroh-base", default-features = false, features = ["key", "relay"] }
3535
iroh-metrics = { version = "0.37", default-features = false }
3636
n0-future = "0.3.0"
3737
num_enum = "0.7"

iroh/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "iroh"
3-
version = "0.95.0"
3+
version = "0.95.1"
44
edition = "2024"
55
readme = "README.md"
66
description = "p2p quic connections dialed by public key"
@@ -36,7 +36,7 @@ derive_more = { version = "2.0.1", features = [
3636
] }
3737
ed25519-dalek = { version = "3.0.0-pre.1", features = ["serde", "rand_core", "zeroize", "pkcs8", "pem"] }
3838
http = "1"
39-
iroh-base = { version = "0.95.0", default-features = false, features = ["key", "relay"], path = "../iroh-base" }
39+
iroh-base = { version = "0.95.1", default-features = false, features = ["key", "relay"], path = "../iroh-base" }
4040
iroh-relay = { version = "0.95", path = "../iroh-relay", default-features = false }
4141
n0-future = "0.3.0"
4242
n0-error = "0.1.0"
@@ -142,7 +142,7 @@ tracing-subscriber = { version = "0.3", features = [
142142
] }
143143
indicatif = { version = "0.18", features = ["tokio"] }
144144
parse-size = { version = "1.1.0", features = ['std'] }
145-
iroh-base = { version = "0.95.0", default-features = false, features = ["key", "relay"], path = "../iroh-base" }
145+
iroh-base = { version = "0.95.1", default-features = false, features = ["key", "relay"], path = "../iroh-base" }
146146

147147
# wasm-in-browser test/dev dependencies
148148
[target.'cfg(all(target_family = "wasm", target_os = "unknown"))'.dev-dependencies]

iroh/bench/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "iroh-bench"
3-
version = "0.95.0"
3+
version = "0.95.1"
44
edition = "2024"
55
license = "MIT OR Apache-2.0"
66
publish = false

iroh/src/endpoint/connection.rs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ use std::{
2727
};
2828

2929
use ed25519_dalek::{VerifyingKey, pkcs8::DecodePublicKey};
30+
use futures_util::{FutureExt, future::Shared};
3031
use iroh_base::EndpointId;
3132
use n0_error::{e, stack_error};
3233
use n0_future::time::Duration;
@@ -431,7 +432,8 @@ impl Connecting {
431432
accepted: ZeroRttAccepted {
432433
inner: zrtt_accepted,
433434
_discovery_drop_guard: self._discovery_drop_guard,
434-
},
435+
}
436+
.shared(),
435437
})
436438
}
437439
Err(inner) => Err(Self {
@@ -558,6 +560,7 @@ impl Future for Accepting {
558560
}
559561
}
560562
}
563+
561564
/// Future that completes when a connection is fully established.
562565
///
563566
/// For clients, the resulting value indicates if 0-RTT was accepted. For servers, the resulting
@@ -594,14 +597,14 @@ impl Future for ZeroRttAccepted {
594597
///
595598
/// Look at the [`OutgoingZeroRttConnection::handshake_completed`] method for
596599
/// more details.
597-
#[derive(Debug)]
600+
#[derive(Debug, Clone)]
598601
pub struct OutgoingZeroRttConnection {
599602
inner: quinn::Connection,
600-
accepted: ZeroRttAccepted,
603+
accepted: Shared<ZeroRttAccepted>,
601604
ep: Endpoint,
602605
}
603606

604-
/// Returned from a `OutgoingZeroRttConnection::handshake_complete` method.
607+
/// Returned from [`OutgoingZeroRttConnection::handshake_completed`].
605608
#[derive(Debug)]
606609
pub enum ZeroRttStatus {
607610
/// If the 0-RTT data was accepted, you can continue to use any streams
@@ -634,8 +637,8 @@ impl OutgoingZeroRttConnection {
634637
/// Thus, those errors should only occur if someone connects to you with a
635638
/// modified iroh endpoint or with a plain QUIC client.
636639
pub async fn handshake_completed(self) -> Result<ZeroRttStatus, AuthenticationError> {
637-
let accepted = self.accepted.await;
638-
let conn = conn_from_quinn_conn(self.inner, &self.ep)?;
640+
let accepted = self.accepted.clone().await;
641+
let conn = conn_from_quinn_conn(self.inner.clone(), &self.ep)?;
639642

640643
Ok(match accepted {
641644
true => ZeroRttStatus::Accepted(conn),

iroh/src/protocol.rs

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,21 @@ pub trait ProtocolHandler: Send + Sync + std::fmt::Debug + 'static {
159159
///
160160
/// Can be implemented as `async fn on_accepting(&self, accepting: Accepting) -> Result<Connection>`.
161161
///
162-
/// This enables accepting 0-RTT data from clients, among other things.
162+
/// Typically, this method is used as an early interception point to accept
163+
/// or reject a connection.
164+
///
165+
/// However, this method can also be used to implement the accept side of a
166+
/// 0-RTT connection.
167+
///
168+
/// ## 0-RTT
169+
///
170+
/// `ProtocolHandler::on_accepting` allows you to take over the connection
171+
/// state machine early in the handshake processes, by calling [`Accepting::into_0rtt`].
172+
///
173+
/// When working with 0-RTT, you may want to implement all of your protocol
174+
/// logic in `on_accepting`. This is fine because `on_accepting` can handle
175+
/// long-running processes. In this case, the [`ProtocolHandler::accept`] method
176+
/// can simply return `Ok(())`.
163177
fn on_accepting(
164178
&self,
165179
accepting: Accepting,

0 commit comments

Comments
 (0)