Skip to content
1,223 changes: 394 additions & 829 deletions dumbpipe-web/Cargo.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dumbpipe-web/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ license = "Apache-2.0/MIT"
anyhow = "1.0.75"
bytes = "1.5.0"
clap = { version = "4.4.11", features = ["derive"] }
dumbpipe = "0.20"
dumbpipe = "0.21"
http = "1.0.0"
http-body-util = "0.1.0"
hyper = { version = "1.0.1", features = ["full"] }
hyper-util = { version = "0.1.1", features = ["full"] }
iroh = "0.28"
iroh = "0.29"
iroh-quinn = "0.12.0"
tokio = { version = "1.34.0", features = ["full"] }
tracing = "0.1.40"
Expand Down
7 changes: 3 additions & 4 deletions dumbpipe-web/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ use hyper::service::service_fn;
use hyper::{Request, Response};

use hyper_util::rt::TokioIo;
use iroh::net::key::SecretKey;
use iroh::net::{AddrInfo, Endpoint, NodeAddr};
use iroh::{key::SecretKey, AddrInfo, Endpoint, NodeAddr};
use tokio::net::TcpListener;

#[derive(Parser, Debug)]
Expand Down Expand Up @@ -65,7 +64,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Create a iroh endpoint and set it as a global
//
// Done explicitly here because creation is async
let mut builder = Endpoint::builder().secret_key(secret_key);
let mut builder = Endpoint::builder().secret_key(secret_key).discovery_n0();
if let Some(addr) = args.iroh_ipv4_addr {
builder = builder.bind_addr_v4(addr);
}
Expand Down Expand Up @@ -112,7 +111,7 @@ fn bad_request(text: &'static str) -> anyhow::Result<Response<BoxBody<Bytes, hyp

fn parse_subdomain(subdomain: &str) -> anyhow::Result<NodeAddr> {
// first try to parse as a node id
if let Ok(node_id) = iroh::net::NodeId::from_str(subdomain) {
if let Ok(node_id) = iroh::NodeId::from_str(subdomain) {
return Ok(NodeAddr {
node_id,
info: AddrInfo {
Expand Down
Loading