Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
8f2aba2
Basic using of QUIC NAT Traversal for holepunching
flub Oct 31, 2025
bbf947a
Do not receive DISCO messages, we no longer need them
flub Oct 31, 2025
697583e
remove disco from endpoint_state.rs
flub Oct 31, 2025
343a533
remove disco from endpoint_map.rs
flub Oct 31, 2025
22b80f1
remove disco from magicsock.rs
flub Oct 31, 2025
ff13fa0
delete disco and key modules, all unused now
flub Oct 31, 2025
77f63b9
delete disco metrics
flub Oct 31, 2025
5c4851a
emit a single metric, so metrics are used
flub Oct 31, 2025
a8d9748
Don't store remote NAT candidates
flub Nov 3, 2025
68e673b
Clean up connections at an interval
flub Nov 3, 2025
b8fc574
Merge branch 'feat-multipath' into feat-multipath-quic-nat
flub Nov 17, 2025
ce227f5
compile against protocol-simplification branch
flub Nov 18, 2025
b059bab
updage api
flub Nov 20, 2025
11d9731
Merge branch 'feat-multipath' into feat-multipath-quic-nat
flub Nov 20, 2025
a93db87
some intermediate stuff
flub Nov 20, 2025
1fc0714
hook up adding addresses
flub Nov 21, 2025
e24b41d
properly patch in quinn git dependency and clippy
dignifiedquire Nov 23, 2025
75fe396
Merge remote-tracking branch 'origin/feat-multipath' into feat-qnt-me…
dignifiedquire Nov 23, 2025
e3bb795
Merge pull request #3697 from n0-computer/feat-qnt-merge-main
dignifiedquire Nov 23, 2025
08274f1
Make sure to use canonical addrs when comparing hp rounds
flub Nov 23, 2025
f12341d
bump quinn
flub Nov 23, 2025
f0cdffe
replace trace log with event
flub Nov 23, 2025
9097dc8
improve select path logic
flub Nov 23, 2025
709b80f
bump quinn
flub Nov 23, 2025
fffa4af
deps: cargo update
Frando Nov 23, 2025
7101d19
cleanup unused deps
dignifiedquire Nov 23, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
compile against protocol-simplification branch
it's something, if not much
  • Loading branch information
flub committed Nov 18, 2025
commit ce227f5186fcdb7320888969a3451ecc13a69d30
30 changes: 23 additions & 7 deletions iroh/src/magicsock/endpoint_map/endpoint_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use n0_future::{
};
use n0_watcher::{Watchable, Watcher};
use quinn::{PathStats, WeakConnectionHandle};
use quinn_proto::{PathError, PathEvent, PathId, PathStatus};
use quinn_proto::{PathError, PathEvent, PathId, PathStatus, iroh_hp};
use rustc_hash::FxHashMap;
use smallvec::SmallVec;
use tokio::sync::oneshot;
Expand Down Expand Up @@ -93,8 +93,15 @@ type PathEvents = MergeUnbounded<
/// A stream of events of announced NAT traversal candidate addresses for all connections.
///
/// The connection is identified using [`ConnId`].
type AddrEvents =
MergeUnbounded<Pin<Box<dyn Stream<Item = (ConnId, Vec<SocketAddr>)> + Send + Sync>>>;
type AddrEvents = MergeUnbounded<
Pin<
Box<
dyn Stream<Item = (ConnId, Result<iroh_hp::Event, BroadcastStreamRecvError>)>
+ Send
+ Sync,
>,
>,
>;

/// List of addrs and path ids for open paths in a connection.
pub(crate) type PathAddrList = SmallVec<[(TransportAddr, PathId); 4]>;
Expand Down Expand Up @@ -382,8 +389,9 @@ impl EndpointStateActor {
self.path_events.push(Box::pin(
BroadcastStream::new(conn.path_events()).map(move |evt| (conn_id, evt)),
));
self.addr_events
.push(Box::pin(conn.addr_events().map(move |evt| (conn_id, evt))));
self.addr_events.push(Box::pin(
BroadcastStream::new(conn.nat_traversal_updates()).map(move |evt| (conn_id, evt)),
));
self.connections_close.push(OnClosed::new(&conn));

// Store the connection
Expand Down Expand Up @@ -522,7 +530,15 @@ impl EndpointStateActor {
trace!("not holepunching: no client connection");
return;
};
let remote_candidates = BTreeSet::from_iter(conn.nat_candidates());
// TODO: these are the local addresses, so this will be very sad.
let Ok(remote_candidates) = conn
.get_nat_traversal_addresses()
.and_then(|addrs| Ok(BTreeSet::from_iter(addrs)))
else {
warn!("boo");
return;
};
// let remote_candidates = BTreeSet::from_iter(conn.get_nat_traversal_addresses());
let local_candidates: BTreeSet<SocketAddr> = self
.local_addrs
.get()
Expand Down Expand Up @@ -570,7 +586,7 @@ impl EndpointStateActor {
.iter()
.map(|daddr| daddr.addr)
.collect::<BTreeSet<_>>();
match conn.initiate_nat_traversal(Vec::from_iter(local_candidates.iter().copied())) {
match conn.initiate_nat_traversal_round() {
Ok(remote_candidates) => {
trace!(
?local_candidates,
Expand Down