Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
19 changes: 10 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion iroh-dns-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pkarr = { version = "5", features = ["relays", "dht"], default-features = false
rcgen = "0.14"
redb = "2.6.3"
regex = "1.10.3"
rustls = { version = "0.23", default-features = false, features = ["ring"] }
rustls = { version = "0.23.33", default-features = false, features = ["ring"] }
rustls-pemfile = { version = "2.1" }
serde = { version = "1", features = ["derive"] }
struct_iterable = "0.1.1"
Expand Down
6 changes: 3 additions & 3 deletions iroh-relay/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ rand = "0.9.2"
reqwest = { version = "0.12", default-features = false, features = [
"rustls-tls",
] }
rustls = { version = "0.23", default-features = false, features = ["ring"] }
rustls = { version = "0.23.33", default-features = false, features = ["ring"] }
serde = { version = "1", features = ["derive", "rc"] }
strum = { version = "0.27", features = ["derive"] }
tokio = { version = "1", features = [
Expand All @@ -65,8 +65,8 @@ sha1 = "0.11.0-rc.2"
tokio-util = { version = "0.7", features = ["io-util", "io", "codec", "rt"] }
tracing = "0.1"
url = { version = "2.5.3", features = ["serde"] }
webpki = { package = "rustls-webpki", version = "0.103" }
webpki-roots = "1.0"
webpki = { package = "rustls-webpki", version = "0.103.7" }
webpki-roots = "1.0.3"
webpki_types = { package = "rustls-pki-types", version = "1.12" }
data-encoding = "2.6.0"
lru = "0.16"
Expand Down
7 changes: 4 additions & 3 deletions iroh/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ reqwest = { version = "0.12", default-features = false, features = [
"stream",
] }
ring = "0.17"
rustls = { version = "0.23", default-features = false, features = ["ring"] }
rustls = { version = "0.23.33", default-features = false, features = ["ring"] }
serde = { version = "1.0.219", features = ["derive", "rc"] }
smallvec = "1.11.1"
snafu = { version = "0.8.5", features = ["rust_1_81"] }
Expand All @@ -70,15 +70,16 @@ tokio-stream = { version = "0.1.15", features = ["sync"] }
tokio-util = { version = "0.7", features = ["io-util", "io", "rt"] }
tracing = "0.1"
url = { version = "2.5", features = ["serde"] }
webpki = { package = "rustls-webpki", version = "0.103", features = ["ring"] }
webpki = { package = "rustls-webpki", version = "0.103.7", features = ["ring"] }
webpki_types = { package = "rustls-pki-types", version = "1.12" }
webpki-roots = "1.0"
webpki-roots = "1.0.3"
z32 = "1.0.3"

# fix minimal versions
# for n0-futures
futures-buffered = "0.2.11"
pkcs8 = "0.11.0-rc.7"
rustls-platform-verifier = "0.5.3"

# metrics
iroh-metrics = { version = "0.36", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion iroh/bench/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ n0-snafu = "0.2.0"
quinn = { package = "iroh-quinn", version = "0.14" }
rand = "0.9.2"
rcgen = "0.14"
rustls = { version = "0.23", default-features = false, features = ["ring"] }
rustls = { version = "0.23.33", default-features = false, features = ["ring"] }
clap = { version = "4", features = ["derive"] }
tokio = { version = "1", features = ["rt", "sync"] }
tracing = "0.1"
Expand Down
20 changes: 18 additions & 2 deletions iroh/tests/integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,32 @@ const ECHO_ALPN: &[u8] = b"echo";
async fn simple_endpoint_id_based_connection_transfer() -> Result {
std::panic::set_hook(Box::new(console_error_panic_hook::hook));
setup_logging();

let client = Endpoint::builder()
.relay_mode(RelayMode::Staging)
.bind()
.await?;
tracing::info!("started client, id {}", client.id().fmt_short());
let server = Endpoint::builder()
.relay_mode(RelayMode::Staging)
.alpns(vec![ECHO_ALPN.to_vec()])
.bind()
.await?;
tracing::info!("started server, id {}", server.id().fmt_short());

// ensure the server has connected to a relay
// and therefore has enough information to publish
tracing::info!("waiting for server to go online");
time::timeout(Duration::from_secs(12), server.online())
.await
.context("server endpoint took too long to get online")?;

// Make the server respond to requests with an echo
task::spawn({
tracing::info!("waiting for incoming connections on the server");
let server = server.clone();
async move {
while let Some(incoming) = server.accept().await {
tracing::info!("accepting connection");
let conn = incoming.await.e()?;
let endpoint_id = conn.remote_id()?;
tracing::info!(endpoint_id = %endpoint_id.fmt_short(), "Accepted connection");
Expand All @@ -74,21 +84,27 @@ async fn simple_endpoint_id_based_connection_transfer() -> Result {
});

// Wait for pkarr records to be published
time::timeout(Duration::from_secs(10), {
time::timeout(Duration::from_secs(20), {
let endpoint_id = server.id();
tracing::info!(
"start timeout waiting for records to be published, waiting for {endpoint_id} resolution"
);
async move {
let resolver = PkarrResolver::n0_dns().build();
loop {
// Very rudimentary non-backoff algorithm
time::sleep(Duration::from_secs(1)).await;

let Some(mut stream) = resolver.resolve(endpoint_id) else {
tracing::info!("unable to get resolver stream, looping");
continue;
};
let Ok(Some(item)) = stream.try_next().await else {
tracing::info!("no items on stream when resolving, looping");
continue;
};
if item.relay_url().is_some() {
tracing::info!("home relay found");
break;
}
}
Expand Down
Loading