diff --git a/Cargo.lock b/Cargo.lock index d1447e3d7a..1e769b1da5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -199,9 +199,9 @@ checksum = "71938f30533e4d95a6d17aa530939da3842c2ab6f4f84b9dae68447e4129f74a" [[package]] name = "asn1-rs" -version = "0.5.2" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f6fd5ddaf0351dff5b8da21b2fb4ff8e08ddd02857f0bf69c47639106c0fff0" +checksum = "5493c3bedbacf7fd7382c6346bbd66687d12bbaad3a89a2d2c303ee6cf20b048" dependencies = [ "asn1-rs-derive", "asn1-rs-impl", @@ -215,25 +215,25 @@ dependencies = [ [[package]] name = "asn1-rs-derive" -version = "0.4.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "726535892e8eae7e70657b4c8ea93d26b8553afb1ce617caee529ef96d7dee6c" +checksum = "965c2d33e53cb6b267e148a4cb0760bc01f4904c1cd4bb4002a085bb016d1490" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.77", "synstructure", ] [[package]] name = "asn1-rs-impl" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2777730b2039ac0f95f093556e61b6d26cebed5393ca6f152717777cec3a42ed" +checksum = "7b18050c2cd6fe86c3a76584ef5e0baf286d038cda203eb6223df2cc413565f7" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.77", ] [[package]] @@ -327,6 +327,17 @@ dependencies = [ "url", ] +[[package]] +name = "async-recursion" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.77", +] + [[package]] name = "async-smtp" version = "0.9.1" @@ -742,6 +753,12 @@ dependencies = [ "shlex", ] +[[package]] +name = "cesu8" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" + [[package]] name = "cfb-mode" version = "0.8.2" @@ -913,6 +930,16 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" +[[package]] +name = "combine" +version = "4.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" +dependencies = [ + "bytes", + "memchr", +] + [[package]] name = "concurrent-queue" version = "2.5.0" @@ -1435,9 +1462,9 @@ dependencies = [ [[package]] name = "der-parser" -version = "8.2.0" +version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbd676fbbab537128ef0278adb5576cf363cff6aa22a7b24effe97347cfab61e" +checksum = "5cd0a5c643689626bec213c4d8bd4d96acc8ffdb4ad4bb6bc16abf27d5f4b553" dependencies = [ "asn1-rs", "displaydoc", @@ -2451,10 +2478,11 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hickory-proto" -version = "0.24.0" +version = "0.25.0-alpha.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "091a6fbccf4860009355e3efc52ff4acf37a63489aad7435372d44ceeb6fbbcf" +checksum = "8270a1857fb962b9914aafd46a89a187a4e63d0eb4190c327e7c7b8256a2d055" dependencies = [ + "async-recursion", "async-trait", "cfg-if", "data-encoding", @@ -2462,11 +2490,12 @@ dependencies = [ "futures-channel", "futures-io", "futures-util", - "idna 0.4.0", + "idna", "ipnet", "once_cell", "rand 0.8.5", "thiserror", + "time 0.3.36", "tinyvec", "tokio", "tracing", @@ -2475,9 +2504,9 @@ dependencies = [ [[package]] name = "hickory-resolver" -version = "0.24.1" +version = "0.25.0-alpha.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28757f23aa75c98f254cf0405e6d8c25b831b32921b050a66692427679b1f243" +checksum = "46c110355b5703070d9e29c344d79818a7cde3de9c27fc35750defea6074b0ad" dependencies = [ "cfg-if", "futures-util", @@ -2705,12 +2734,12 @@ dependencies = [ "http 1.1.0", "hyper 1.4.1", "hyper-util", - "rustls 0.23.10", + "rustls", "rustls-pki-types", "tokio", - "tokio-rustls 0.26.0", + "tokio-rustls", "tower-service", - "webpki-roots 0.26.1", + "webpki-roots", ] [[package]] @@ -2771,16 +2800,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" -[[package]] -name = "idna" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] - [[package]] name = "idna" version = "0.5.0" @@ -2894,9 +2913,9 @@ checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "iroh-base" -version = "0.23.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8d60492b6099a5e94b674d0f4c564b3fa63a211836a090bc34c14d422721c19" +checksum = "545424889bce87e44fd08dac9e6889635630fdbdaaa858a3c5a5f0adbb8d3779" dependencies = [ "aead", "anyhow", @@ -2935,9 +2954,9 @@ dependencies = [ [[package]] name = "iroh-gossip" -version = "0.23.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11551a79338d0d3aac1cff957a8801a2c3ffccce59fa1f3d60ca183aa785edab" +checksum = "6a5489a563e407fb2be654e950536da4230e46642111f12b16d7013228164aae" dependencies = [ "anyhow", "async-channel 2.3.1", @@ -2963,9 +2982,9 @@ dependencies = [ [[package]] name = "iroh-metrics" -version = "0.23.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0be681eb052594a43afa8d2d2cc093361917c7348c779df3fe92a7169bd2f9c5" +checksum = "9fb6ab80f7cccde80be07a643308e1ff925d5be91721ec65ba96b261a0bcb5e5" dependencies = [ "anyhow", "erased_set", @@ -2984,9 +3003,9 @@ dependencies = [ [[package]] name = "iroh-net" -version = "0.23.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b18cd649ce3a342d8480038abee8170e483bc3bec8f111bf57ca9679c5075ce" +checksum = "4a099a60478cb9319153756a9cf2ff41aa03d18403690a91e60f049ad467b057" dependencies = [ "anyhow", "backoff", @@ -3027,13 +3046,12 @@ dependencies = [ "pkarr", "postcard", "rand 0.8.5", - "rand_core 0.6.4", "rcgen", "reqwest", "ring", "rtnetlink", - "rustls 0.21.11", - "rustls-webpki 0.101.7", + "rustls", + "rustls-webpki", "serde", "smallvec", "socket2", @@ -3043,7 +3061,7 @@ dependencies = [ "thiserror", "time 0.3.36", "tokio", - "tokio-rustls 0.24.1", + "tokio-rustls", "tokio-tungstenite", "tokio-tungstenite-wasm", "tokio-util", @@ -3051,7 +3069,7 @@ dependencies = [ "tungstenite", "url", "watchable", - "webpki-roots 0.25.4", + "webpki-roots", "windows 0.51.1", "wmi", "x509-parser", @@ -3060,16 +3078,17 @@ dependencies = [ [[package]] name = "iroh-quinn" -version = "0.10.5" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "906875956feb75d3d41d708ddaffeb11fdb10cd05f23efbcb17600037e411779" +checksum = "4fd590a39a14cfc168efa4d894de5039d65641e62d8da4a80733018ababe3c33" dependencies = [ "bytes", "iroh-quinn-proto", "iroh-quinn-udp", "pin-project-lite", - "rustc-hash 1.1.0", - "rustls 0.21.11", + "rustc-hash 2.0.0", + "rustls", + "socket2", "thiserror", "tokio", "tracing", @@ -3077,16 +3096,16 @@ dependencies = [ [[package]] name = "iroh-quinn-proto" -version = "0.10.8" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6bf92478805e67f2320459285496e1137edf5171411001a0d4d85f9bbafb792" +checksum = "5fd0538ff12efe3d61ea1deda2d7913f4270873a519d43e6995c6e87a1558538" dependencies = [ "bytes", "rand 0.8.5", "ring", - "rustc-hash 1.1.0", - "rustls 0.21.11", - "rustls-native-certs", + "rustc-hash 2.0.0", + "rustls", + "rustls-platform-verifier", "slab", "thiserror", "tinyvec", @@ -3095,15 +3114,15 @@ dependencies = [ [[package]] name = "iroh-quinn-udp" -version = "0.4.2" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edc7915b3a31f08ee0bc02f73f4d61a5d5be146a1081ef7f70622a11627fd314" +checksum = "d0619b59471fdd393ac8a6c047f640171119c1c8b41f7d2927db91776dcdbc5f" dependencies = [ - "bytes", "libc", + "once_cell", "socket2", "tracing", - "windows-sys 0.48.0", + "windows-sys 0.59.0", ] [[package]] @@ -3138,6 +3157,26 @@ version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" +[[package]] +name = "jni" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6df18c2e3db7e453d3c6ac5b3e9d5182664d28788126d39b91f2d1e22b017ec" +dependencies = [ + "cesu8", + "combine", + "jni-sys", + "log", + "thiserror", + "walkdir", +] + +[[package]] +name = "jni-sys" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" + [[package]] name = "js-sys" version = "0.3.69" @@ -3591,11 +3630,10 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.4" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" dependencies = [ - "autocfg", "num-integer", "num-traits", ] @@ -3719,9 +3757,9 @@ dependencies = [ [[package]] name = "oid-registry" -version = "0.6.1" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bedf36ffb6ba96c2eb7144ef6270557b52e54b20c0a8e1eb2ff99a6c6959bff" +checksum = "a8d8034d9489cdaf79228eb9f6a3b8d7bb32ba00d6645ebd48eef4077ceb5bd9" dependencies = [ "asn1-rs", ] @@ -4459,7 +4497,7 @@ dependencies = [ "quinn-proto", "quinn-udp", "rustc-hash 1.1.0", - "rustls 0.23.10", + "rustls", "thiserror", "tokio", "tracing", @@ -4475,7 +4513,7 @@ dependencies = [ "rand 0.8.5", "ring", "rustc-hash 2.0.0", - "rustls 0.23.10", + "rustls", "slab", "thiserror", "tinyvec", @@ -4764,21 +4802,21 @@ dependencies = [ "percent-encoding", "pin-project-lite", "quinn", - "rustls 0.23.10", - "rustls-pemfile 2.1.2", + "rustls", + "rustls-pemfile", "rustls-pki-types", "serde", "serde_json", "serde_urlencoded", "sync_wrapper 1.0.0", "tokio", - "tokio-rustls 0.26.0", + "tokio-rustls", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots 0.26.1", + "webpki-roots", "winreg 0.52.0", ] @@ -4953,18 +4991,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "rustls" -version = "0.21.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fecbfb7b1444f477b345853b1fce097a2c6fb637b2bfb87e6bc5db0f043fae4" -dependencies = [ - "log", - "ring", - "rustls-webpki 0.101.7", - "sct", -] - [[package]] name = "rustls" version = "0.23.10" @@ -4975,32 +5001,24 @@ dependencies = [ "once_cell", "ring", "rustls-pki-types", - "rustls-webpki 0.102.4", + "rustls-webpki", "subtle", "zeroize", ] [[package]] name = "rustls-native-certs" -version = "0.6.3" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" +checksum = "e5bfb394eeed242e909609f56089eecfe5fda225042e8b171791b9c95f5931e5" dependencies = [ "openssl-probe", - "rustls-pemfile 1.0.4", + "rustls-pemfile", + "rustls-pki-types", "schannel", "security-framework", ] -[[package]] -name = "rustls-pemfile" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" -dependencies = [ - "base64 0.21.7", -] - [[package]] name = "rustls-pemfile" version = "2.1.2" @@ -5018,15 +5036,32 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" [[package]] -name = "rustls-webpki" -version = "0.101.7" +name = "rustls-platform-verifier" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +checksum = "afbb878bdfdf63a336a5e63561b1835e7a8c91524f51621db870169eac84b490" dependencies = [ - "ring", - "untrusted", + "core-foundation", + "core-foundation-sys", + "jni", + "log", + "once_cell", + "rustls", + "rustls-native-certs", + "rustls-platform-verifier-android", + "rustls-webpki", + "security-framework", + "security-framework-sys", + "webpki-roots", + "winapi", ] +[[package]] +name = "rustls-platform-verifier-android" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f" + [[package]] name = "rustls-webpki" version = "0.102.4" @@ -5139,16 +5174,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" -[[package]] -name = "sct" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" -dependencies = [ - "ring", - "untrusted", -] - [[package]] name = "sec1" version = "0.7.3" @@ -5165,22 +5190,23 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.9.2" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", "core-foundation", "core-foundation-sys", "libc", + "num-bigint", "security-framework-sys", ] [[package]] name = "security-framework-sys" -version = "2.9.1" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" +checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" dependencies = [ "core-foundation-sys", "libc", @@ -5722,14 +5748,13 @@ checksum = "384595c11a4e2969895cad5a8c4029115f5ab956a9e5ef4de79d11a426e5f20c" [[package]] name = "synstructure" -version = "0.12.6" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", - "unicode-xid", + "syn 2.0.77", ] [[package]] @@ -5953,23 +5978,13 @@ dependencies = [ "syn 2.0.77", ] -[[package]] -name = "tokio-rustls" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" -dependencies = [ - "rustls 0.21.11", - "tokio", -] - [[package]] name = "tokio-rustls" version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" dependencies = [ - "rustls 0.23.10", + "rustls", "rustls-pki-types", "tokio", ] @@ -6049,13 +6064,15 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.11" +version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" +checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" dependencies = [ "bytes", "futures-core", "futures-sink", + "futures-util", + "hashbrown", "pin-project-lite", "tokio", ] @@ -6348,10 +6365,10 @@ dependencies = [ "base64 0.22.1", "log", "once_cell", - "rustls 0.23.10", + "rustls", "rustls-pki-types", "url", - "webpki-roots 0.26.1", + "webpki-roots", ] [[package]] @@ -6361,7 +6378,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" dependencies = [ "form_urlencoded", - "idna 0.5.0", + "idna", "percent-encoding", "serde", ] @@ -6543,12 +6560,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "webpki-roots" -version = "0.25.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" - [[package]] name = "webpki-roots" version = "0.26.1" @@ -6888,9 +6899,9 @@ dependencies = [ [[package]] name = "x509-parser" -version = "0.15.1" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7069fba5b66b9193bd2c5d3d4ff12b839118f6bcbef5328efafafb5395cf63da" +checksum = "fcbc162f30700d6f3f82a24bf7cc62ffe7caea42c0b2cba8bf7f3ae50cf51f69" dependencies = [ "asn1-rs", "data-encoding", diff --git a/Cargo.toml b/Cargo.toml index 35b28d41fe..d8bbe9a20c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -57,14 +57,14 @@ fd-lock = "4" futures = { workspace = true } futures-lite = { workspace = true } hex = "0.4.0" -hickory-resolver = "0.24" +hickory-resolver = "=0.25.0-alpha.2" http-body-util = "0.1.2" humansize = "2" hyper = "1" hyper-util = "0.1.7" image = { version = "0.25.1", default-features=false, features = ["gif", "jpeg", "ico", "png", "pnm", "webp", "bmp"] } -iroh-net = { version = "0.23.0", default-features = false } -iroh-gossip = { version = "0.23.0", default-features = false, features = ["net"] } +iroh-net = { version = "0.25.0", default-features = false } +iroh-gossip = { version = "0.25.0", default-features = false, features = ["net"] } kamadak-exif = "0.5.3" lettre_email = { git = "https://github.com/deltachat/lettre", branch = "master" } libc = { workspace = true } diff --git a/deny.toml b/deny.toml index 1d3b8146eb..98352766b7 100644 --- a/deny.toml +++ b/deny.toml @@ -19,14 +19,10 @@ ignore = [ # when upgrading. # Please keep this list alphabetically sorted. skip = [ - { name = "asn1-rs-derive", version = "0.4.0" }, - { name = "asn1-rs-impl", version = "0.1.0" }, - { name = "asn1-rs", version = "0.5.2" }, { name = "async-channel", version = "1.9.0" }, { name = "base64", version = "<0.21" }, { name = "base64", version = "0.21.7" }, { name = "bitflags", version = "1.3.2" }, - { name = "der-parser", version = "8.2.0" }, { name = "event-listener", version = "2.5.3" }, { name = "event-listener", version = "4.0.3" }, { name = "fastrand", version = "1.9.0" }, @@ -36,9 +32,7 @@ skip = [ { name = "http-body", version = "0.4.6" }, { name = "http", version = "0.2.12" }, { name = "hyper", version = "0.14.28" }, - { name = "idna", version = "0.4.0" }, { name = "nix", version = "0.26.4" }, - { name = "oid-registry", version = "0.6.1" }, { name = "quick-error", version = "<2.0" }, { name = "rand_chacha", version = "<0.3" }, { name = "rand_core", version = "<0.6" }, @@ -46,16 +40,10 @@ skip = [ { name = "redox_syscall", version = "0.3.5" }, { name = "regex-automata", version = "0.1.10" }, { name = "regex-syntax", version = "0.6.29" }, - { name = "rustls-pemfile", version = "1.0.4" }, - { name = "rustls", version = "0.21.11" }, - { name = "rustls-webpki", version = "0.101.7" }, { name = "sync_wrapper", version = "0.1.2" }, - { name = "synstructure", version = "0.12.6" }, { name = "syn", version = "1.0.109" }, { name = "time", version = "<0.3" }, - { name = "tokio-rustls", version = "0.24.1" }, { name = "wasi", version = "<0.11" }, - { name = "webpki-roots", version ="0.25.4" }, { name = "windows_aarch64_gnullvm", version = "<0.52" }, { name = "windows_aarch64_msvc", version = "<0.52" }, { name = "windows-core", version = "<0.54.0" }, @@ -68,7 +56,6 @@ skip = [ { name = "windows_x86_64_gnu", version = "<0.52" }, { name = "windows_x86_64_msvc", version = "<0.52" }, { name = "winreg", version = "0.50.0" }, - { name = "x509-parser", version = "<0.16.0" }, ] diff --git a/src/imex/transfer.rs b/src/imex/transfer.rs index c8820c8a77..72d955e5bc 100644 --- a/src/imex/transfer.rs +++ b/src/imex/transfer.rs @@ -97,7 +97,7 @@ impl BackupProvider { let endpoint = Endpoint::builder() .alpns(vec![BACKUP_ALPN.to_vec()]) .relay_mode(relay_mode) - .bind(0) + .bind() .await?; let node_addr = endpoint.node_addr().await?; @@ -220,6 +220,13 @@ impl BackupProvider { conn = endpoint.accept() => { if let Some(conn) = conn { + let conn = match conn.accept() { + Ok(conn) => conn, + Err(err) => { + warn!(context, "Failed to accept iroh connection: {err:#}."); + continue; + } + }; // Got a new in-progress connection. let context = context.clone(); let auth_token = auth_token.clone(); @@ -274,7 +281,7 @@ pub async fn get_backup2( ) -> Result<()> { let relay_mode = RelayMode::Disabled; - let endpoint = Endpoint::builder().relay_mode(relay_mode).bind(0).await?; + let endpoint = Endpoint::builder().relay_mode(relay_mode).bind().await?; let conn = endpoint.connect(node_addr, BACKUP_ALPN).await?; let (mut send_stream, mut recv_stream) = conn.open_bi().await?; @@ -296,9 +303,13 @@ pub async fn get_backup2( // Send an acknowledgement, but ignore the errors. // We have imported backup successfully already. send_stream.write_all(b".").await.ok(); - send_stream.finish().await.ok(); + send_stream.finish().ok(); info!(context, "Sent backup reception acknowledgment."); + // Wait for the peer to acknowledge reception of the acknowledgement + // before closing the connection. + _ = send_stream.stopped().await; + Ok(()) } diff --git a/src/peer_channels.rs b/src/peer_channels.rs index 8b47377436..891dd7826f 100644 --- a/src/peer_channels.rs +++ b/src/peer_channels.rs @@ -253,7 +253,7 @@ impl Context { .secret_key(secret_key) .alpns(vec![GOSSIP_ALPN.to_vec()]) .relay_mode(relay_mode) - .bind(0) + .bind() .await?; // create gossip @@ -265,7 +265,6 @@ impl Context { // Shuts down on deltachat shutdown tokio::spawn(endpoint_loop(context, endpoint.clone(), gossip.clone())); - tokio::spawn(gossip_direct_address_loop(endpoint.clone(), gossip.clone())); Ok(Iroh { endpoint, @@ -285,15 +284,6 @@ impl Context { } } -/// Loop to update direct addresses of the gossip. -async fn gossip_direct_address_loop(endpoint: Endpoint, gossip: Gossip) -> Result<()> { - let mut stream = endpoint.direct_addresses(); - while let Some(addrs) = stream.next().await { - gossip.update_direct_addresses(&addrs)?; - } - Ok(()) -} - /// Cache a peers [NodeId] for one topic. pub(crate) async fn iroh_add_peer_for_topic( ctx: &Context, @@ -442,6 +432,13 @@ pub(crate) async fn create_iroh_header( async fn endpoint_loop(context: Context, endpoint: Endpoint, gossip: Gossip) { while let Some(conn) = endpoint.accept().await { + let conn = match conn.accept() { + Ok(conn) => conn, + Err(err) => { + warn!(context, "Failed to accept iroh connection: {err:#}."); + continue; + } + }; info!(context, "IROH_REALTIME: accepting iroh connection"); let gossip = gossip.clone(); let context = context.clone();