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
Don't store remote NAT candidates
Turns out we don't do anything with those.  We only use this to decide
to check if we need to holepunch again.

This calls trigger_holepunching for every connection event which will
wake it up too much, because we only really need to do it for the
connection we are using to holepunch.  But the state tracking is
easier like this and the cost probably not too high.
  • Loading branch information
flub committed Nov 3, 2025
commit a8d97485095a573129b4555a840558f15180bfdb
22 changes: 2 additions & 20 deletions iroh/src/magicsock/endpoint_map/endpoint_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,8 @@ impl EndpointStateActor {
Some((id, evt)) = self.path_events.next() => {
self.handle_path_event(id, evt);
}
Some((id, evt)) = self.addr_events.next() => {
self.handle_addr_event(id, evt);
trace!("remote addrs updated, triggering holepunching");
Some((id, _)) = self.addr_events.next() => {
trace!(?id, "remote addrs updated, triggering holepunching");
self.trigger_holepunching().await;
}
_ = self.local_addrs.updated() => {
Expand Down Expand Up @@ -349,7 +348,6 @@ impl EndpointStateActor {
ConnectionState {
handle: handle.clone(),
pub_path_info: paths_info,
nat_candidates: Default::default(),
paths: Default::default(),
open_paths: Default::default(),
path_ids: Default::default(),
Expand Down Expand Up @@ -700,18 +698,6 @@ impl EndpointStateActor {
}
}

/// Handles a NAT address candidate added or removed by the server.
///
/// When the server adds an address we want to (re-)holepunch. Same for when a local
/// address changes, though that is not handled here.
fn handle_addr_event(&mut self, conn_id: ConnId, event: Vec<SocketAddr>) {
if let Some(conn_state) = self.connections.get_mut(&conn_id) {
let _ = std::mem::replace(&mut conn_state.nat_candidates, event);
} else {
warn!(?conn_id, "NAT candidate event for unknown connection");
}
}

/// Clean up connections which no longer exist.
// TODO: Call this on a schedule.
fn cleanup_connections(&mut self) {
Expand Down Expand Up @@ -924,10 +910,6 @@ struct ConnectionState {
handle: WeakConnectionHandle,
/// The information we publish to users about the paths used in this connection.
pub_path_info: Watchable<HashMap<TransportAddr, PathInfo>>,
/// NAT candidate addresses we received from the server.
///
/// If we are the server for this connection, this will remain empty.
nat_candidates: Vec<SocketAddr>,
/// The paths that exist on this connection.
///
/// This could be in any state, e.g. while still validating the path or already closed
Expand Down
Loading