[package] name = "iroh-net" version = "0.28.1" edition = "2021" readme = "README.md" description = "networking support for iroh" license = "MIT OR Apache-2.0" authors = ["dignifiedquire ", "n0 team"] repository = "https://github.com/n0-computer/iroh" keywords = ["quic", "networking", "holepunching", "p2p"] # Sadly this also needs to be updated in .github/workflows/ci.yml rust-version = "1.76" [lints] workspace = true [dependencies] anyhow = { version = "1" } backoff = "0.4.0" base64 = "0.22.1" bytes = "1.7" der = { version = "0.7", features = ["alloc", "derive"] } derive_more = { version = "1.0.0", features = ["debug", "display", "from", "try_into", "deref"] } futures-buffered = "0.2.8" futures-concurrency = "7.6.0" futures-lite = "2.3" futures-sink = "0.3.25" futures-util = "0.3.25" governor = "0.6.0" hex = "0.4.3" hickory-proto = "=0.25.0-alpha.2" hickory-resolver = "=0.25.0-alpha.2" hostname = "0.3.1" http = "1" http-body-util = "0.1.0" hyper = { version = "1", features = ["server", "client", "http1"] } hyper-util = "0.1.1" igd-next = { version = "0.15.1", features = ["aio_tokio"] } iroh-base = { version = "0.28.0", features = ["key"] } libc = "0.2.139" netdev = "0.30.0" netwatch = { version = "0.1.0", path = "../net-tools/netwatch" } num_enum = "0.7" once_cell = "1.18.0" parking_lot = "0.12.1" pin-project = "1" pkarr = { version = "2", default-features = false, features = ["async", "relay"] } portmapper = { version = "0.1.0", path = "../net-tools/portmapper" } postcard = { version = "1", default-features = false, features = ["alloc", "use-std", "experimental-derive"] } quinn = { package = "iroh-quinn", version = "0.12.0" } quinn-proto = { package = "iroh-quinn-proto", version = "0.12.0" } quinn-udp = { package = "iroh-quinn-udp", version = "0.5.5" } rand = "0.8" rcgen = "0.12" reqwest = { version = "0.12", default-features = false, features = ["rustls-tls"] } ring = "0.17" rustls = { version = "0.23", default-features = false, features = ["ring"] } serde = { version = "1", features = ["derive", "rc"] } smallvec = "1.11.1" socket2 = "0.5.3" stun-rs = "0.1.5" surge-ping = "0.8.0" thiserror = "1" time = "0.3.20" tokio = { version = "1", features = ["io-util", "macros", "sync", "rt", "net", "fs", "io-std", "signal", "process"] } tokio-rustls = { version = "0.26", default-features = false, features = ["logging", "ring"] } tokio-stream = { version = "0.1.15" } tokio-tungstenite = "0.21" tokio-tungstenite-wasm = "0.3" tokio-util = { version = "0.7.12", features = ["io-util", "io", "codec", "rt"] } tracing = "0.1" tungstenite = "0.21" url = { version = "2.4", features = ["serde"] } watchable = "1.1.2" webpki = { package = "rustls-webpki", version = "0.102" } webpki-roots = "0.26" x509-parser = "0.16" z32 = "1.0.3" # iroh-relay axum = { version = "0.7.4", optional = true } clap = { version = "4", features = ["derive"], optional = true } regex = { version = "1.7.1", optional = true } rustls-pemfile = { version = "2.1", optional = true } toml = { version = "0.8", optional = true } tracing-subscriber = { version = "0.3", features = ["env-filter"], optional = true } tokio-rustls-acme = { version = "0.4", optional = true } # metrics iroh-metrics = { version = "0.28.0", default-features = false } strum = { version = "0.26.2", features = ["derive"] } # local-swarm-discovery swarm-discovery = { version = "0.2.1", optional = true } # dht_discovery genawaiter = { version = "0.99.1", features = ["futures03"], optional = true } [target.'cfg(any(target_os = "linux", target_os = "android"))'.dependencies] netlink-packet-core = "0.7.0" netlink-packet-route = "0.17.0" netlink-sys = "0.8.5" rtnetlink = "0.13.0" [target.'cfg(target_os = "windows")'.dependencies] wmi = "0.13" windows = { version = "0.51", features = ["Win32_NetworkManagement_IpHelper", "Win32_Foundation", "Win32_NetworkManagement_Ndis", "Win32_Networking_WinSock"] } [dev-dependencies] axum = { version = "0.7.4" } clap = { version = "4", features = ["derive"] } criterion = "0.5.1" crypto_box = { version = "0.9.1", features = ["serde", "chacha20"] } ntest = "0.9" pretty_assertions = "1.4" proptest = "1.2.0" rand_chacha = "0.3.1" tokio = { version = "1", features = ["io-util", "sync", "rt", "net", "fs", "macros", "time", "test-util"] } tracing-subscriber = { version = "0.3", features = ["env-filter"] } iroh-test = "0.28.0" iroh-net = { path = ".", features = ["iroh-relay"] } serde_json = "1.0.107" testresult = "0.4.0" mainline = "2.0.1" [[bench]] name = "key" harness = false [build-dependencies] duct = "0.13.6" [features] default = ["metrics", "discovery-pkarr-dht"] iroh-relay = [ "dep:tokio-rustls-acme", "dep:axum", "dep:clap", "dep:toml", "dep:rustls-pemfile", "dep:regex", "dep:tracing-subscriber" ] metrics = ["iroh-metrics/metrics"] test-utils = ["iroh-relay"] discovery-local-network = ["dep:swarm-discovery"] discovery-pkarr-dht = ["pkarr/dht", "dep:genawaiter"] [[bin]] name = "iroh-relay" required-features = ["iroh-relay"] [package.metadata.docs.rs] all-features = true rustdoc-args = ["--cfg", "iroh_docsrs"] [[example]] name = "listen" [[example]] name = "connect" [[example]] name = "listen-unreliable" [[example]] name = "connect-unreliable" [[example]] name = "dht_discovery" required-features = ["discovery-pkarr-dht"] [[example]] name = "locally-discovered-nodes" required-features = ["discovery-local-network"]