From db5d02ea3d4c59ce64889bbde765b03f22e58af5 Mon Sep 17 00:00:00 2001 From: Mohan <86064887+binarybaron@users.noreply.github.com> Date: Tue, 29 Jul 2025 20:10:15 +0200 Subject: [PATCH] refactor: Move libp2p-community-tor into monorepo (#484) * refactor: Move libp2p-community-tor into monorepo * fmt --- Cargo.lock | 1199 +++++++++++-------- Cargo.toml | 8 + libp2p-community-tor/CHANGELOG.md | 47 + libp2p-community-tor/Cargo.toml | 47 + libp2p-community-tor/LICENSE | 21 + libp2p-community-tor/README.md | 51 + libp2p-community-tor/examples/ping-onion.rs | 159 +++ libp2p-community-tor/src/address.rs | 176 +++ libp2p-community-tor/src/lib.rs | 466 +++++++ libp2p-community-tor/src/provider.rs | 86 ++ rust-toolchain.toml | 2 +- swap/Cargo.toml | 6 +- 12 files changed, 1795 insertions(+), 473 deletions(-) create mode 100644 libp2p-community-tor/CHANGELOG.md create mode 100644 libp2p-community-tor/Cargo.toml create mode 100644 libp2p-community-tor/LICENSE create mode 100644 libp2p-community-tor/README.md create mode 100644 libp2p-community-tor/examples/ping-onion.rs create mode 100644 libp2p-community-tor/src/address.rs create mode 100644 libp2p-community-tor/src/lib.rs create mode 100644 libp2p-community-tor/src/provider.rs diff --git a/Cargo.lock b/Cargo.lock index 0e9d4fc9..e16bd9a0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -167,6 +167,12 @@ dependencies = [ "libc", ] +[[package]] +name = "anes" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" + [[package]] name = "ansi_term" version = "0.12.1" @@ -276,16 +282,14 @@ checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "arti-client" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f95c20af995ff4593368e3ab2db9f0784f310993fe34ee502115c134f8604e06" +version = "0.32.0" +source = "git+https://github.com/eigenwallet/arti?rev=5db9ecbd2872d76243dd62be887efd67e4609c87#5db9ecbd2872d76243dd62be887efd67e4609c87" dependencies = [ "async-trait", "cfg-if", - "derive-deftly", + "derive-deftly 1.1.0", "derive_builder_fork_arti", - "derive_more 1.0.0", - "directories", + "derive_more 2.0.1", "educe", "fs-mistrust", "futures", @@ -295,10 +299,11 @@ dependencies = [ "libc", "once_cell", "postage", - "rand 0.8.5", + "rand 0.9.2", "safelog", "serde", "thiserror 2.0.12", + "time 0.3.41", "tor-async-utils", "tor-basic-utils", "tor-chanmgr", @@ -319,6 +324,7 @@ dependencies = [ "tor-netdoc", "tor-persist", "tor-proto", + "tor-protover", "tor-rtcompat", "tracing", "void", @@ -339,7 +345,7 @@ dependencies = [ "enumflags2", "futures-channel", "futures-util", - "rand 0.9.1", + "rand 0.9.2", "raw-window-handle", "serde", "serde_repr", @@ -383,6 +389,21 @@ dependencies = [ "time 0.3.41", ] +[[package]] +name = "asn1-rs" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56624a96882bb8c26d61312ae18cb45868e5a9992ea73c58e45c3101e56a1e60" +dependencies = [ + "asn1-rs-derive 0.6.0", + "asn1-rs-impl 0.2.0", + "displaydoc", + "nom", + "num-traits", + "rusticata-macros", + "thiserror 2.0.12", +] + [[package]] name = "asn1-rs-derive" version = "0.4.0" @@ -407,6 +428,18 @@ dependencies = [ "synstructure 0.13.2", ] +[[package]] +name = "asn1-rs-derive" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3109e49b1e4909e9db6515a30c633684d68cdeaa252f215214cb4fa1a5bfee2c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", + "synstructure 0.13.2", +] + [[package]] name = "asn1-rs-impl" version = "0.1.0" @@ -445,6 +478,12 @@ dependencies = [ "serde_json", ] +[[package]] +name = "assert_matches" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" + [[package]] name = "async-broadcast" version = "0.7.2" @@ -513,9 +552,9 @@ dependencies = [ [[package]] name = "async-io" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1237c0ae75a0f3765f58910ff9cdd0a12eeb39ab2f4c7de23262f337f0aacbb3" +checksum = "19634d6336019ef220f09fd31168ce5c184b295cbf80345437cc36094ef223ca" dependencies = [ "async-lock", "cfg-if", @@ -526,8 +565,7 @@ dependencies = [ "polling", "rustix 1.0.8", "slab", - "tracing", - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] @@ -543,9 +581,9 @@ dependencies = [ [[package]] name = "async-process" -version = "2.3.1" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cde3f4e40e6021d7acffc90095cbd6dc54cb593903d1de5832f435eb274b85dc" +checksum = "65daa13722ad51e6ab1a1b9c01299142bc75135b337923cfa10e79bbbd669f00" dependencies = [ "async-channel", "async-io", @@ -557,7 +595,6 @@ dependencies = [ "event-listener", "futures-lite", "rustix 1.0.8", - "tracing", ] [[package]] @@ -573,9 +610,9 @@ dependencies = [ [[package]] name = "async-signal" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7605a4e50d4b06df3898d5a70bf5fde51ed9059b0434b73105193bc27acce0d" +checksum = "f567af260ef69e1d52c2b560ce0ea230763e6fbb9214a85d768760a920e3e3c1" dependencies = [ "async-io", "async-lock", @@ -586,7 +623,7 @@ dependencies = [ "rustix 1.0.8", "signal-hook-registry", "slab", - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] @@ -920,7 +957,7 @@ dependencies = [ "getrandom 0.2.16", "js-sys", "log", - "miniscript 9.2.0", + "miniscript 9.2.1", "rand 0.8.5", "serde", "serde_json", @@ -946,7 +983,7 @@ source = "git+https://github.com/Einliterflasche/bdk?branch=bump/rusqlite-0.32#2 dependencies = [ "bdk_core", "bitcoin 0.32.6", - "miniscript 12.3.4", + "miniscript 12.3.5", "rusqlite", "serde", ] @@ -977,7 +1014,7 @@ source = "git+https://github.com/Einliterflasche/bdk?branch=bump/rusqlite-0.32#2 dependencies = [ "bdk_chain", "bitcoin 0.32.6", - "miniscript 12.3.4", + "miniscript 12.3.5", "rand_core 0.6.4", "serde", "serde_json", @@ -1497,8 +1534,7 @@ dependencies = [ [[package]] name = "caret" version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "061dc3258f029feaf9ff02b43c6af5ea67a7dfaed5d2aef36204c812e614ef9c" +source = "git+https://github.com/eigenwallet/arti?rev=5db9ecbd2872d76243dd62be887efd67e4609c87#5db9ecbd2872d76243dd62be887efd67e4609c87" [[package]] name = "cargo-platform" @@ -1525,14 +1561,20 @@ dependencies = [ [[package]] name = "cargo_toml" -version = "0.22.1" +version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02260d489095346e5cafd04dea8e8cb54d1d74fcd759022a9b72986ebe9a1257" +checksum = "374b7c592d9c00c1f4972ea58390ac6b18cbb6ab79011f3bdc90a0b82ca06b77" dependencies = [ "serde", - "toml 0.8.23", + "toml 0.9.3", ] +[[package]] +name = "cast" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" + [[package]] name = "cbor4ii" version = "0.3.3" @@ -1544,9 +1586,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.29" +version = "1.2.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c1599538de2394445747c8cf7935946e3cc27e9625f889d979bfb2aaf569362" +checksum = "deec109607ca693028562ed836a5f1c4b8bd77755c4e132fc5ce11b0b6211ae7" dependencies = [ "jobserver", "libc", @@ -1631,6 +1673,33 @@ dependencies = [ "windows-link", ] +[[package]] +name = "ciborium" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42e69ffd6f0917f5c029256a24d0161db17cea3997d185db0d35926308770f0e" +dependencies = [ + "ciborium-io", + "ciborium-ll", + "serde", +] + +[[package]] +name = "ciborium-io" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05afea1e0a06c9be33d539b876f1ce3692f4afea2cb41f740e7743225ed1c757" + +[[package]] +name = "ciborium-ll" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9" +dependencies = [ + "ciborium-io", + "half 2.6.0", +] + [[package]] name = "cipher" version = "0.4.4" @@ -1699,9 +1768,9 @@ checksum = "b94f61472cee1439c0b966b47e3aca9ae07e45d070759512cd390ea2bebc6675" [[package]] name = "clipboard-win" -version = "5.4.0" +version = "5.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15efe7a882b08f34e38556b14f2fb3daa98769d06c7f0c1b076dfd0d983bc892" +checksum = "bde03770d3df201d4fb868f2c9c59e66a3e4e2bd06692a0fe701e7103c7e84d4" dependencies = [ "error-code", ] @@ -1840,15 +1909,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" -[[package]] -name = "convert_case" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca" -dependencies = [ - "unicode-segmentation", -] - [[package]] name = "convert_case" version = "0.7.1" @@ -1969,6 +2029,52 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "criterion" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2b12d017a929603d80db1831cd3a24082f8137ce19c69e6447f54f5fc8d692f" +dependencies = [ + "anes", + "cast", + "ciborium", + "clap 4.5.41", + "criterion-plot", + "is-terminal", + "itertools 0.10.5", + "num-traits", + "once_cell", + "oorandom", + "plotters", + "rayon", + "regex", + "serde", + "serde_derive", + "serde_json", + "tinytemplate", + "walkdir", +] + +[[package]] +name = "criterion-cycles-per-byte" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1029452fa751c93f8834962dd74807d69f0a6c7624d5b06625b393aeb6a14fc2" +dependencies = [ + "cfg-if", + "criterion", +] + +[[package]] +name = "criterion-plot" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b50826342786a51a89e2da3a28f1c32b06e387201bc2d19791f622c673706b1" +dependencies = [ + "cast", + "itertools 0.10.5", +] + [[package]] name = "crossbeam-channel" version = "0.5.15" @@ -1978,6 +2084,16 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "crossbeam-deque" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + [[package]] name = "crossbeam-epoch" version = "0.9.18" @@ -2157,9 +2273,9 @@ dependencies = [ [[package]] name = "cxx" -version = "1.0.160" +version = "1.0.161" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be1149bab7a5580cb267215751389597c021bfad13c0bb00c54e19559333764c" +checksum = "a3523cc02ad831111491dd64b27ad999f1ae189986728e477604e61b81f828df" dependencies = [ "cc", "cxxbridge-cmd", @@ -2171,9 +2287,9 @@ dependencies = [ [[package]] name = "cxx-build" -version = "1.0.160" +version = "1.0.161" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6aeeaf1aefae8e0f5141920a7ecbc64a22ab038d4b4ac59f2d19e0effafd5b53" +checksum = "212b754247a6f07b10fa626628c157593f0abf640a3dd04cce2760eca970f909" dependencies = [ "cc", "codespan-reporting", @@ -2186,9 +2302,9 @@ dependencies = [ [[package]] name = "cxxbridge-cmd" -version = "1.0.160" +version = "1.0.161" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c36ac1f9a72064b1f41fd7b49a4c1b3bf33b9ccb1274874dda6d264f57c55964" +checksum = "f426a20413ec2e742520ba6837c9324b55ffac24ead47491a6e29f933c5b135a" dependencies = [ "clap 4.5.41", "codespan-reporting", @@ -2200,15 +2316,15 @@ dependencies = [ [[package]] name = "cxxbridge-flags" -version = "1.0.160" +version = "1.0.161" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "170c6ff5d009663866857a91ebee55b98ea4d4b34e7d7aba6dc4a4c95cc7b748" +checksum = "a258b6069020b4e5da6415df94a50ee4f586a6c38b037a180e940a43d06a070d" [[package]] name = "cxxbridge-macro" -version = "1.0.160" +version = "1.0.161" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4984a142211026786011a7e79fa22faa1eca1e9cbf0e60bffecfd57fd3db88f1" +checksum = "e8dec184b52be5008d6eaf7e62fc1802caf1ad1227d11b3b7df2c409c7ffc3f4" dependencies = [ "indexmap 2.10.0", "proc-macro2", @@ -2402,7 +2518,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5cd0a5c643689626bec213c4d8bd4d96acc8ffdb4ad4bb6bc16abf27d5f4b553" dependencies = [ "asn1-rs 0.6.2", - "cookie-factory", "displaydoc", "nom", "num-bigint", @@ -2410,6 +2525,20 @@ dependencies = [ "rusticata-macros", ] +[[package]] +name = "der-parser" +version = "10.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07da5016415d5a3c4dd39b11ed26f915f52fc4e0dc197d87908bc916e51bc1a6" +dependencies = [ + "asn1-rs 0.7.1", + "cookie-factory", + "displaydoc", + "nom", + "num-traits", + "rusticata-macros", +] + [[package]] name = "deranged" version = "0.4.0" @@ -2426,7 +2555,17 @@ version = "0.14.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8ea84d0109517cc2253d4a679bdda1e8989e9bd86987e9e4f75ffdda0095fd1" dependencies = [ - "derive-deftly-macros", + "derive-deftly-macros 0.14.6", + "heck 0.5.0", +] + +[[package]] +name = "derive-deftly" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a55a256deae70e0772adfd583c57c1403c6ddbd1d1f1f84f64e94acaecc25eeb" +dependencies = [ + "derive-deftly-macros 1.1.0", "heck 0.5.0", ] @@ -2443,7 +2582,25 @@ dependencies = [ "proc-macro2", "quote", "sha3", - "strum 0.27.1", + "strum 0.27.2", + "syn 2.0.104", + "void", +] + +[[package]] +name = "derive-deftly-macros" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47cf90c375e516cf601a57727744bdf7a547680a470a2e8a6580a12288cf0630" +dependencies = [ + "heck 0.5.0", + "indexmap 2.10.0", + "itertools 0.14.0", + "proc-macro-crate 3.3.0", + "proc-macro2", + "quote", + "sha3", + "strum 0.27.2", "syn 2.0.104", "void", ] @@ -2534,35 +2691,13 @@ dependencies = [ "syn 2.0.104", ] -[[package]] -name = "derive_more" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a9b99b9cbbe49445b21764dc0625032a89b145a2642e67603e1c936f5458d05" -dependencies = [ - "derive_more-impl 1.0.0", -] - [[package]] name = "derive_more" version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "093242cf7570c207c83073cf82f79706fe7b8317e98620a47d5be7c3d8497678" dependencies = [ - "derive_more-impl 2.0.1", -] - -[[package]] -name = "derive_more-impl" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" -dependencies = [ - "convert_case 0.6.0", - "proc-macro2", - "quote", - "syn 2.0.104", - "unicode-xid", + "derive_more-impl", ] [[package]] @@ -2649,11 +2784,11 @@ dependencies = [ [[package]] name = "directories" -version = "5.0.1" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a49173b84e034382284f27f1af4dcbbd231ffa358c0fe316541a7337f376a35" +checksum = "16f5094c54661b38d03bd7e50df373292118db60b585c08a411c6d840017fe7d" dependencies = [ - "dirs-sys 0.4.1", + "dirs-sys", ] [[package]] @@ -2666,34 +2801,13 @@ dependencies = [ "dirs-sys-next", ] -[[package]] -name = "dirs" -version = "5.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" -dependencies = [ - "dirs-sys 0.4.1", -] - [[package]] name = "dirs" version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e" dependencies = [ - "dirs-sys 0.5.0", -] - -[[package]] -name = "dirs-sys" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" -dependencies = [ - "libc", - "option-ext", - "redox_users 0.4.6", - "windows-sys 0.48.0", + "dirs-sys", ] [[package]] @@ -2792,6 +2906,12 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" +[[package]] +name = "downcast-rs" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea8a8b81cacc08888170eef4d13b775126db426d0b348bee9d18c2c1eaf123cf" + [[package]] name = "dpi" version = "0.1.2" @@ -2824,9 +2944,9 @@ checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" [[package]] name = "dyn-clone" -version = "1.0.19" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c7a8fb8a9fbf66c1f703fe16184d10ca0ee9d23be5b4436400408ba54a95005" +checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" [[package]] name = "ecdsa" @@ -3001,7 +3121,7 @@ dependencies = [ "cc", "memchr", "rustc_version", - "toml 0.9.2", + "toml 0.9.3", "vswhom", "winreg 0.55.0", ] @@ -3352,14 +3472,12 @@ dependencies = [ [[package]] name = "fs-mistrust" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b28d81b7d2feb4197784e984a09c9799404a7793ed2352a54cb2aff98a31d48a" +version = "0.10.0" +source = "git+https://github.com/eigenwallet/arti?rev=5db9ecbd2872d76243dd62be887efd67e4609c87#5db9ecbd2872d76243dd62be887efd67e4609c87" dependencies = [ "derive_builder_fork_arti", - "dirs 5.0.1", + "dirs", "libc", - "once_cell", "pwd-grp", "serde", "thiserror 2.0.12", @@ -3399,8 +3517,7 @@ dependencies = [ [[package]] name = "fslock-guard" version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed387b899db1671a47eaf17e7e6d7008577262c09319cb8e19601371192b526f" +source = "git+https://github.com/eigenwallet/arti?rev=5db9ecbd2872d76243dd62be887efd67e4609c87#5db9ecbd2872d76243dd62be887efd67e4609c87" dependencies = [ "fslock-arti-fork", "thiserror 2.0.12", @@ -4023,6 +4140,16 @@ version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b43ede17f21864e81be2fa654110bf1e793774238d86ef8555c37e6519c0403" +[[package]] +name = "half" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "459196ed295495a68f7d7fe1d84f6c4b7ff0e21fe3017b2f283c6fac3ad803c9" +dependencies = [ + "cfg-if", + "crunchy", +] + [[package]] name = "hashbrown" version = "0.12.3" @@ -4173,7 +4300,7 @@ dependencies = [ "ipnet", "once_cell", "rand 0.8.5", - "socket2", + "socket2 0.5.10", "thiserror 1.0.69", "tinyvec", "tokio", @@ -4354,7 +4481,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2", + "socket2 0.5.10", "tokio", "tower-service", "tracing", @@ -4397,7 +4524,7 @@ dependencies = [ "tokio", "tokio-rustls 0.26.2", "tower-service", - "webpki-roots 1.0.1", + "webpki-roots 1.0.2", ] [[package]] @@ -4415,9 +4542,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.15" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f66d5bd4c6f02bf0542fad85d626775bab9258cf795a4256dcaf3161114d1df" +checksum = "8d9b05277c7e8da2c93a568989bb6207bef0112e8d17df7a6eda4a3cf143bc5e" dependencies = [ "base64 0.22.1", "bytes", @@ -4431,7 +4558,7 @@ dependencies = [ "libc", "percent-encoding", "pin-project-lite", - "socket2", + "socket2 0.6.0", "tokio", "tower-service", "tracing", @@ -4682,11 +4809,11 @@ dependencies = [ [[package]] name = "inotify" -version = "0.10.2" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdd168d97690d0b8c412d6b6c10360277f4d7ee495c5d0d5d5fe0854923255cc" +checksum = "f37dccff2791ab604f9babef0ba14fbe0be30bd368dc541e2b08d07c8aa908f3" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.9.1", "inotify-sys", "libc", ] @@ -4729,9 +4856,9 @@ dependencies = [ [[package]] name = "io-uring" -version = "0.7.8" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b86e202f00093dcba4275d4636b93ef9dd75d025ae560d2521b45ea28ab49013" +checksum = "d93587f37623a1a17d94ef2bc9ada592f5465fe7732084ab7beefabe5c77c0c4" dependencies = [ "bitflags 2.9.1", "cfg-if", @@ -4744,7 +4871,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f" dependencies = [ - "socket2", + "socket2 0.5.10", "widestring", "windows-sys 0.48.0", "winreg 0.50.0", @@ -4784,6 +4911,17 @@ dependencies = [ "once_cell", ] +[[package]] +name = "is-terminal" +version = "0.4.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e04d7f318608d35d4b61ddd75cbdaee86b023ebe2bd5a66ee0915f0bf93095a9" +dependencies = [ + "hermit-abi 0.5.2", + "libc", + "windows-sys 0.59.0", +] + [[package]] name = "is-wsl" version = "0.4.0" @@ -4802,9 +4940,9 @@ checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" [[package]] name = "itertools" -version = "0.13.0" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" dependencies = [ "either", ] @@ -5096,7 +5234,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07033963ba89ebaf1584d767badaa2e8fcec21aedea6b8c0346d487d49c28667" dependencies = [ "cfg-if", - "windows-targets 0.53.2", + "windows-targets 0.53.3", ] [[package]] @@ -5178,7 +5316,6 @@ dependencies = [ [[package]] name = "libp2p-community-tor" version = "0.5.0" -source = "git+https://github.com/umgefahren/libp2p-tor?rev=e6b913e0f1ac1fc90b3ee4dd31b5511140c4a9af#e6b913e0f1ac1fc90b3ee4dd31b5511140c4a9af" dependencies = [ "anyhow", "arti-client", @@ -5187,11 +5324,13 @@ dependencies = [ "libp2p", "thiserror 1.0.69", "tokio", + "tokio-test", "tor-cell", "tor-hsservice", "tor-proto", "tor-rtcompat", "tracing", + "tracing-subscriber", ] [[package]] @@ -5372,7 +5511,7 @@ dependencies = [ "libp2p-swarm", "rand 0.8.5", "smallvec", - "socket2", + "socket2 0.5.10", "tokio", "tracing", "void", @@ -5457,7 +5596,7 @@ dependencies = [ "rand 0.8.5", "ring 0.17.14", "rustls 0.23.29", - "socket2", + "socket2 0.5.10", "thiserror 1.0.69", "tokio", "tracing", @@ -5558,7 +5697,7 @@ dependencies = [ "libc", "libp2p-core", "libp2p-identity", - "socket2", + "socket2 0.5.10", "tokio", "tracing", ] @@ -5629,18 +5768,18 @@ dependencies = [ "thiserror 1.0.69", "tracing", "yamux 0.12.1", - "yamux 0.13.5", + "yamux 0.13.6", ] [[package]] name = "libredox" -version = "0.1.4" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1580801010e535496706ba011c15f8532df6b42297d2e471fec38ceadd8c0638" +checksum = "360e552c93fa0e8152ab463bc4c4837fce76a225df11dfaeea66c313de5e61f7" dependencies = [ "bitflags 2.9.1", "libc", - "redox_syscall 0.5.13", + "redox_syscall 0.5.17", ] [[package]] @@ -5883,9 +6022,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniscript" -version = "9.2.0" +version = "9.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "152791b5a02e0841b9ff1087396e1aba9f9caf81e8b96095be483734b265c094" +checksum = "90159e891f477d5993feca28bb04bf89174855fbdfff812b8d3473184ef72ecd" dependencies = [ "bitcoin 0.29.2", "serde", @@ -5893,9 +6032,9 @@ dependencies = [ [[package]] name = "miniscript" -version = "12.3.4" +version = "12.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1eeb3bbebc87062b99fbb8c9067d30dab85469f4cf12248a2667777cc86b282" +checksum = "487906208f38448e186e3deb02f2b8ef046a9078b0de00bdb28bf4fb9b76951c" dependencies = [ "bech32 0.11.0", "bitcoin 0.32.6", @@ -5946,7 +6085,7 @@ dependencies = [ "hyper 1.6.0", "hyper-util", "log", - "rand 0.9.1", + "rand 0.9.2", "regex", "serde_json", "serde_urlencoded", @@ -6145,9 +6284,9 @@ dependencies = [ [[package]] name = "muda" -version = "0.17.0" +version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58b89bf91c19bf036347f1ab85a81c560f08c0667c8601bece664d860a600988" +checksum = "01c1738382f66ed56b3b9c8119e794a2e23148ac8ea214eda86622d4cb9d415a" dependencies = [ "crossbeam-channel", "dpi", @@ -6161,7 +6300,7 @@ dependencies = [ "png", "serde", "thiserror 2.0.12", - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] @@ -6384,12 +6523,11 @@ dependencies = [ [[package]] name = "notify" -version = "7.0.0" +version = "8.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c533b4c39709f9ba5005d8002048266593c1cfaf3c5f0739d5b8ab0c6c504009" +checksum = "3163f59cd3fa0e9ef8c32f242966a7b9994fd7378366099593e0e73077cd8c97" dependencies = [ "bitflags 2.9.1", - "filetime", "inotify", "kqueue", "libc", @@ -6397,17 +6535,14 @@ dependencies = [ "mio", "notify-types", "walkdir", - "windows-sys 0.52.0", + "windows-sys 0.60.2", ] [[package]] name = "notify-types" -version = "1.0.1" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "585d3cb5e12e01aed9e8a1f70d5c6b5e86fe2a6e48fc8cd0b3e0b8df6f6eb174" -dependencies = [ - "instant", -] +checksum = "5e0826a989adedc2a244799e823aece04662b66609d96af8dff7ac6df9a8925d" [[package]] name = "nu-ansi-term" @@ -6800,12 +6935,17 @@ checksum = "a4895175b425cb1f87721b59f0f286c2092bd4af812243672510e1ac53e2e0ad" [[package]] name = "oneshot-fused-workaround" version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff2948fd2414b613f9a97f8401270bd5d7638265ab940475cdbcfa28a0273d58" +source = "git+https://github.com/eigenwallet/arti?rev=5db9ecbd2872d76243dd62be887efd67e4609c87#5db9ecbd2872d76243dd62be887efd67e4609c87" dependencies = [ "futures", ] +[[package]] +name = "oorandom" +version = "11.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6790f58c7ff633d8771f42965289203411a5e5c68388703c06e14f24770b41e" + [[package]] name = "opaque-debug" version = "0.3.1" @@ -7044,7 +7184,7 @@ checksum = "bc838d2a56b5b1a6c25f55575dfc605fabb63bb2365f6c2353ef9159aa69e4a5" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.13", + "redox_syscall 0.5.17", "smallvec", "windows-targets 0.52.6", ] @@ -7180,6 +7320,17 @@ dependencies = [ "phf_shared 0.11.3", ] +[[package]] +name = "phf" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "913273894cec178f401a31ec4b656318d95473527be05c0752cc41cdc32be8b7" +dependencies = [ + "phf_macros 0.12.1", + "phf_shared 0.12.1", + "serde", +] + [[package]] name = "phf_codegen" version = "0.8.0" @@ -7230,6 +7381,16 @@ dependencies = [ "rand 0.8.5", ] +[[package]] +name = "phf_generator" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2cbb1126afed61dd6368748dae63b1ee7dc480191c6262a3b4ff1e29d86a6c5b" +dependencies = [ + "fastrand", + "phf_shared 0.12.1", +] + [[package]] name = "phf_macros" version = "0.10.0" @@ -7257,6 +7418,19 @@ dependencies = [ "syn 2.0.104", ] +[[package]] +name = "phf_macros" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d713258393a82f091ead52047ca779d37e5766226d009de21696c4e667044368" +dependencies = [ + "phf_generator 0.12.1", + "phf_shared 0.12.1", + "proc-macro2", + "quote", + "syn 2.0.104", +] + [[package]] name = "phf_shared" version = "0.8.0" @@ -7284,6 +7458,15 @@ dependencies = [ "siphasher 1.0.1", ] +[[package]] +name = "phf_shared" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06005508882fb681fd97892ecff4b7fd0fee13ef1aa569f8695dae7ab9099981" +dependencies = [ + "siphasher 1.0.1", +] + [[package]] name = "pin-project" version = "1.1.10" @@ -7367,6 +7550,34 @@ dependencies = [ "time 0.3.41", ] +[[package]] +name = "plotters" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aeb6f403d7a4911efb1e33402027fc44f29b5bf6def3effcc22d7bb75f2b747" +dependencies = [ + "num-traits", + "plotters-backend", + "plotters-svg", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "plotters-backend" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df42e13c12958a16b3f7f4386b9ab1f3e7933914ecea48da7139435263a4172a" + +[[package]] +name = "plotters-svg" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51bae2ac328883f7acdfea3d66a7c35751187f870bc81f94563733a154d7a670" +dependencies = [ + "plotters-backend", +] + [[package]] name = "png" version = "0.17.16" @@ -7382,17 +7593,16 @@ dependencies = [ [[package]] name = "polling" -version = "3.8.0" +version = "3.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b53a684391ad002dd6a596ceb6c74fd004fdce75f4be2e3f615068abbea5fd50" +checksum = "8ee9b2fa7a4517d2c91ff5bc6c297a427a96749d15f98fcdbb22c05571a4d4b7" dependencies = [ "cfg-if", "concurrent-queue", "hermit-abi 0.5.2", "pin-project-lite", "rustix 1.0.8", - "tracing", - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] @@ -7606,7 +7816,7 @@ dependencies = [ "bitflags 2.9.1", "lazy_static", "num-traits", - "rand 0.9.1", + "rand 0.9.2", "rand_chacha 0.9.0", "rand_xorshift", "regex-syntax 0.8.5", @@ -7641,7 +7851,7 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b94fdf3867b7f2889a736f0022ea9386766280d2cca4bdbe41629ada9e4f3b8f" dependencies = [ - "derive-deftly", + "derive-deftly 0.14.6", "libc", "paste", "thiserror 1.0.69", @@ -7742,7 +7952,7 @@ dependencies = [ "quinn-udp", "rustc-hash", "rustls 0.23.29", - "socket2", + "socket2 0.5.10", "thiserror 2.0.12", "tokio", "tracing", @@ -7758,7 +7968,7 @@ dependencies = [ "bytes", "getrandom 0.3.3", "lru-slab", - "rand 0.9.1", + "rand 0.9.2", "ring 0.17.14", "rustc-hash", "rustls 0.23.29", @@ -7779,7 +7989,7 @@ dependencies = [ "cfg_aliases", "libc", "once_cell", - "socket2", + "socket2 0.5.10", "tracing", "windows-sys 0.59.0", ] @@ -7832,9 +8042,9 @@ dependencies = [ [[package]] name = "rand" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fbfd9d094a40bf3ae768db9361049ace4c0e04a4fd6b359518bd7b73a73dd97" +checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" dependencies = [ "rand_chacha 0.9.0", "rand_core 0.9.3", @@ -7906,6 +8116,17 @@ dependencies = [ "rand_core 0.5.1", ] +[[package]] +name = "rand_jitter" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b16df48f071248e67b8fc5e866d9448d45c08ad8b672baaaf796e2f15e606ff0" +dependencies = [ + "libc", + "rand_core 0.9.3", + "winapi", +] + [[package]] name = "rand_pcg" version = "0.2.1" @@ -7930,6 +8151,26 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" +[[package]] +name = "rayon" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + [[package]] name = "rcgen" version = "0.11.3" @@ -7942,6 +8183,15 @@ dependencies = [ "yasna", ] +[[package]] +name = "rdrand" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d92195228612ac8eed47adbc2ed0f04e513a4ccb98175b6f2bd04d963b533655" +dependencies = [ + "rand_core 0.6.4", +] + [[package]] name = "redox_syscall" version = "0.2.16" @@ -7962,9 +8212,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.13" +version = "0.5.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d04b7d0ee6b4a0207a0a7adb104d23ecb0b47d6beae7152d0fa34b692b29fd6" +checksum = "5407465600fb0548f1442edf71dd20683c6ed326200ace4b1ef0763521bb3b77" dependencies = [ "bitflags 2.9.1", ] @@ -8145,7 +8395,7 @@ dependencies = [ "wasm-bindgen-futures", "wasm-streams", "web-sys", - "webpki-roots 1.0.1", + "webpki-roots 1.0.2", ] [[package]] @@ -8157,8 +8407,7 @@ checksum = "95325155c684b1c89f7765e30bc1c42e4a6da51ca513615660cb8a62ef9a88e3" [[package]] name = "retry-error" version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce97442758392c7e2a7716e06c514de75f0fe4b5a4b76e14ba1e5edfb7ba3512" +source = "git+https://github.com/eigenwallet/arti?rev=5db9ecbd2872d76243dd62be887efd67e4609c87#5db9ecbd2872d76243dd62be887efd67e4609c87" [[package]] name = "rfc6979" @@ -8335,9 +8584,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.25" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "989e6739f80c4ad5b13e0fd7fe89531180375b18520cc8c82080e4dc4035b84f" +checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" [[package]] name = "rustc-hash" @@ -8549,8 +8798,7 @@ checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" [[package]] name = "safelog" version = "0.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d343b15e1705331c25689e0fa87e8514fb33bd3c9beeb45658a7c355f317de2" +source = "git+https://github.com/eigenwallet/arti?rev=5db9ecbd2872d76243dd62be887efd67e4609c87#5db9ecbd2872d76243dd62be887efd67e4609c87" dependencies = [ "derive_more 2.0.1", "educe", @@ -8686,9 +8934,9 @@ dependencies = [ [[package]] name = "sdd" -version = "3.0.9" +version = "3.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62f5557d2bbddd5afd236ba7856b0e494f5acc7ce805bb0774cc5674b20a06b4" +checksum = "490dcfcbfef26be6800d11870ff2df8774fa6e86d047e3e8c8a76b25655e41ca" [[package]] name = "seahash" @@ -8933,7 +9181,7 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5" dependencies = [ - "half", + "half 1.8.3", "serde", ] @@ -8970,9 +9218,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.140" +version = "1.0.141" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" +checksum = "30b9eff21ebe718216c6ec64e1d9ac57087aad11efc64e32002bce4a0d4c03d3" dependencies = [ "itoa", "memchr", @@ -9233,7 +9481,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b1fdf65dd6331831494dd616b30351c38e96e45921a27745cf98490458b90bb" dependencies = [ "bstr", - "dirs 6.0.0", + "dirs", "os_str_bytes", ] @@ -9368,8 +9616,7 @@ dependencies = [ [[package]] name = "slotmap-careful" version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9500059071474a36baac642b6bb99ca1dbac0ce43727abbba02dad83822dadf2" +source = "git+https://github.com/eigenwallet/arti?rev=5db9ecbd2872d76243dd62be887efd67e4609c87#5db9ecbd2872d76243dd62be887efd67e4609c87" dependencies = [ "paste", "serde", @@ -9414,6 +9661,16 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "socket2" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "233504af464074f9d066d7b5416c5f9b894a5862a6506e306f7b816cdd6f1807" +dependencies = [ + "libc", + "windows-sys 0.59.0", +] + [[package]] name = "softbuffer" version = "0.4.6" @@ -9430,7 +9687,7 @@ dependencies = [ "objc2-foundation 0.2.2", "objc2-quartz-core 0.2.2", "raw-window-handle", - "redox_syscall 0.5.13", + "redox_syscall 0.5.17", "wasm-bindgen", "web-sys", "windows-sys 0.59.0", @@ -9832,11 +10089,11 @@ dependencies = [ [[package]] name = "strum" -version = "0.27.1" +version = "0.27.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f64def088c51c9510a8579e3c5d67c65349dcf755e5479ad3d010aa6454e2c32" +checksum = "af23d6f6c1a224baef9d3f61e287d2761385a5b88fdab4eb4c6f11aeb54c4bcf" dependencies = [ - "strum_macros 0.27.1", + "strum_macros 0.27.2", ] [[package]] @@ -9854,14 +10111,13 @@ dependencies = [ [[package]] name = "strum_macros" -version = "0.27.1" +version = "0.27.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c77a8c5abcaf0f9ce05d62342b7d298c346515365c36b673df4ebe3ced01fde8" +checksum = "7695ce3845ea4b33927c055a39dc438a45b059f7c1b3d91d38d10355fb8cbca7" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "rustversion", "syn 2.0.104", ] @@ -10245,13 +10501,13 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "tauri" -version = "2.6.2" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "124e129c9c0faa6bec792c5948c89e86c90094133b0b9044df0ce5f0a8efaa0d" +checksum = "352a4bc7bf6c25f5624227e3641adf475a6535707451b09bb83271df8b7a6ac7" dependencies = [ "anyhow", "bytes", - "dirs 6.0.0", + "dirs", "dunce", "embed_plist", "getrandom 0.3.3", @@ -10295,13 +10551,13 @@ dependencies = [ [[package]] name = "tauri-build" -version = "2.3.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f025c389d3adb83114bec704da973142e82fc6ec799c7c750c5e21cefaec83" +checksum = "182d688496c06bf08ea896459bf483eb29cdff35c1c4c115fb14053514303064" dependencies = [ "anyhow", "cargo_toml", - "dirs 6.0.0", + "dirs", "glob", "heck 0.5.0", "json-patch", @@ -10317,9 +10573,9 @@ dependencies = [ [[package]] name = "tauri-codegen" -version = "2.3.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5df493a1075a241065bc865ed5ef8d0fbc1e76c7afdc0bf0eccfaa7d4f0e406" +checksum = "b54a99a6cd8e01abcfa61508177e6096a4fe2681efecee9214e962f2f073ae4a" dependencies = [ "base64 0.22.1", "brotli 8.0.1", @@ -10344,9 +10600,9 @@ dependencies = [ [[package]] name = "tauri-macros" -version = "2.3.1" +version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f237fbea5866fa5f2a60a21bea807a2d6e0379db070d89c3a10ac0f2d4649bbc" +checksum = "7945b14dc45e23532f2ded6e120170bbdd4af5ceaa45784a6b33d250fbce3f9e" dependencies = [ "heck 0.5.0", "proc-macro2", @@ -10358,9 +10614,9 @@ dependencies = [ [[package]] name = "tauri-plugin" -version = "2.3.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d9a0bd00bf1930ad1a604d08b0eb6b2a9c1822686d65d7f4731a7723b8901d3" +checksum = "5bd5c1e56990c70a906ef67a9851bbdba9136d26075ee9a2b19c8b46986b3e02" dependencies = [ "anyhow", "glob", @@ -10405,9 +10661,9 @@ dependencies = [ [[package]] name = "tauri-plugin-dialog" -version = "2.3.0" +version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aefb14219b492afb30b12647b5b1247cadd2c0603467310c36e0f7ae1698c28" +checksum = "37e5858cc7b455a73ab4ea2ebc08b5be33682c00ff1bf4cad5537d4fb62499d9" dependencies = [ "log", "raw-window-handle", @@ -10423,9 +10679,9 @@ dependencies = [ [[package]] name = "tauri-plugin-fs" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c341290d31991dbca38b31d412c73dfbdb070bb11536784f19dd2211d13b778f" +checksum = "8c6ef84ee2f2094ce093e55106d90d763ba343fad57566992962e8f76d113f99" dependencies = [ "anyhow", "dunce", @@ -10498,9 +10754,9 @@ dependencies = [ [[package]] name = "tauri-plugin-single-instance" -version = "2.3.0" +version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b441b6d5d1a194e9fee0b358fe0d602ded845d0f580e1f8c8ef78ebc3c8b225d" +checksum = "50a0e5a4ce43cb3a733c3aef85e8478bc769dac743c615e26639cbf5d953faf7" dependencies = [ "serde", "serde_json", @@ -10534,7 +10790,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "27cbc31740f4d507712550694749572ec0e43bdd66992db7599b89fbfd6b167b" dependencies = [ "base64 0.22.1", - "dirs 6.0.0", + "dirs", "flate2", "futures-util", "http 1.3.1", @@ -10561,9 +10817,9 @@ dependencies = [ [[package]] name = "tauri-runtime" -version = "2.7.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e7bb73d1bceac06c20b3f755b2c8a2cb13b20b50083084a8cf3700daf397ba4" +checksum = "2b1cc885be806ea15ff7b0eb47098a7b16323d9228876afda329e34e2d6c4676" dependencies = [ "cookie", "dpi", @@ -10583,9 +10839,9 @@ dependencies = [ [[package]] name = "tauri-runtime-wry" -version = "2.7.1" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "902b5aa9035e16f342eb64f8bf06ccdc2808e411a2525ed1d07672fa4e780bad" +checksum = "fe653a2fbbef19fe898efc774bc52c8742576342a33d3d028c189b57eb1d2439" dependencies = [ "gtk", "http 1.3.1", @@ -10610,9 +10866,9 @@ dependencies = [ [[package]] name = "tauri-utils" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41743bbbeb96c3a100d234e5a0b60a46d5aa068f266160862c7afdbf828ca02e" +checksum = "9330c15cabfe1d9f213478c9e8ec2b0c76dab26bb6f314b8ad1c8a568c1d186e" dependencies = [ "anyhow", "brotli 8.0.1", @@ -10847,6 +11103,16 @@ dependencies = [ "zerovec", ] +[[package]] +name = "tinytemplate" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc" +dependencies = [ + "serde", + "serde_json", +] + [[package]] name = "tinyvec" version = "1.9.0" @@ -10864,9 +11130,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.46.1" +version = "1.47.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cc3a2344dafbe23a245241fe8b09735b521110d30fcefbbd5feb1797ca35d17" +checksum = "43864ed400b6043a4757a25c7a64a8efde741aed79a056a2fb348a406701bb35" dependencies = [ "backtrace", "bytes", @@ -10877,10 +11143,10 @@ dependencies = [ "pin-project-lite", "signal-hook-registry", "slab", - "socket2", + "socket2 0.6.0", "tokio-macros", "tracing", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -11011,9 +11277,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.9.2" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed0aee96c12fa71097902e0bb061a5e1ebd766a6636bb605ba401c45c1650eac" +checksum = "e06723639aaded957e5a80be250c1f82f274b9d23ebb4d94163668470623461c" dependencies = [ "indexmap 2.10.0", "serde", @@ -11101,11 +11367,10 @@ checksum = "fcc842091f2def52017664b53082ecbbeb5c7731092bad69d2c63050401dfd64" [[package]] name = "tor-async-utils" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be3bd618574a23e0039e34db64d1ea15a8550fc3c70bfdb9e67715861827253" +version = "0.32.0" +source = "git+https://github.com/eigenwallet/arti?rev=5db9ecbd2872d76243dd62be887efd67e4609c87#5db9ecbd2872d76243dd62be887efd67e4609c87" dependencies = [ - "derive-deftly", + "derive-deftly 1.1.0", "educe", "futures", "oneshot-fused-workaround", @@ -11117,17 +11382,16 @@ dependencies = [ [[package]] name = "tor-basic-utils" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9c4d6a13574abc514ceed58562cfd37ffd2f006d0552a0899ddf85367d47f56" +version = "0.32.0" +source = "git+https://github.com/eigenwallet/arti?rev=5db9ecbd2872d76243dd62be887efd67e4609c87#5db9ecbd2872d76243dd62be887efd67e4609c87" dependencies = [ - "derive_more 1.0.0", + "derive_more 2.0.1", "hex", - "itertools 0.13.0", + "itertools 0.14.0", "libc", "paste", - "rand 0.8.5", - "rand_chacha 0.3.1", + "rand 0.9.2", + "rand_chacha 0.9.0", "serde", "slab", "smallvec", @@ -11136,15 +11400,14 @@ dependencies = [ [[package]] name = "tor-bytes" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e763faf9664e373cf1171d739af939ec327d04fa5afba142f6b37651a1531a6a" +version = "0.32.0" +source = "git+https://github.com/eigenwallet/arti?rev=5db9ecbd2872d76243dd62be887efd67e4609c87#5db9ecbd2872d76243dd62be887efd67e4609c87" dependencies = [ "bytes", - "derive-deftly", + "derive-deftly 1.1.0", "digest 0.10.7", "educe", - "getrandom 0.2.16", + "getrandom 0.3.3", "safelog", "thiserror 2.0.12", "tor-error", @@ -11154,19 +11417,18 @@ dependencies = [ [[package]] name = "tor-cell" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d97937a95abe1325ef00ee2fa712fe73cc5bf59ef56c7f2ab7cc22ae7f385334" +version = "0.32.0" +source = "git+https://github.com/eigenwallet/arti?rev=5db9ecbd2872d76243dd62be887efd67e4609c87#5db9ecbd2872d76243dd62be887efd67e4609c87" dependencies = [ "amplify", "bitflags 2.9.1", "bytes", "caret", - "derive-deftly", - "derive_more 1.0.0", + "derive-deftly 1.1.0", + "derive_more 2.0.1", "educe", "paste", - "rand 0.8.5", + "rand 0.9.2", "smallvec", "thiserror 2.0.12", "tor-basic-utils", @@ -11177,19 +11439,19 @@ dependencies = [ "tor-linkspec", "tor-llcrypto", "tor-memquota", + "tor-protover", "tor-units", "void", ] [[package]] name = "tor-cert" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73504fa89511021b1f681b51db714d789d96da01911d090755e1d26e5f05d623" +version = "0.32.0" +source = "git+https://github.com/eigenwallet/arti?rev=5db9ecbd2872d76243dd62be887efd67e4609c87#5db9ecbd2872d76243dd62be887efd67e4609c87" dependencies = [ "caret", "derive_builder_fork_arti", - "derive_more 1.0.0", + "derive_more 2.0.1", "digest 0.10.7", "thiserror 2.0.12", "tor-bytes", @@ -11199,18 +11461,18 @@ dependencies = [ [[package]] name = "tor-chanmgr" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ba8a12416714ede2792bd983bd02912fe8e6f0018c0d4c79c3627062ec244b5" +version = "0.32.0" +source = "git+https://github.com/eigenwallet/arti?rev=5db9ecbd2872d76243dd62be887efd67e4609c87#5db9ecbd2872d76243dd62be887efd67e4609c87" dependencies = [ "async-trait", + "caret", "derive_builder_fork_arti", - "derive_more 1.0.0", + "derive_more 2.0.1", "educe", "futures", "oneshot-fused-workaround", "postage", - "rand 0.8.5", + "rand 0.9.2", "safelog", "serde", "thiserror 2.0.12", @@ -11233,9 +11495,8 @@ dependencies = [ [[package]] name = "tor-checkable" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614009c7733b955630686aa15d072024a6e82a6c3101749b7c30cd37af79a8de" +version = "0.32.0" +source = "git+https://github.com/eigenwallet/arti?rev=5db9ecbd2872d76243dd62be887efd67e4609c87#5db9ecbd2872d76243dd62be887efd67e4609c87" dependencies = [ "humantime", "signature 2.2.0", @@ -11245,26 +11506,25 @@ dependencies = [ [[package]] name = "tor-circmgr" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72f761292f361a4acebc041e42f820d3cc44a532dbcb26b233a4dd04fe7eee3f" +version = "0.32.0" +source = "git+https://github.com/eigenwallet/arti?rev=5db9ecbd2872d76243dd62be887efd67e4609c87#5db9ecbd2872d76243dd62be887efd67e4609c87" dependencies = [ "amplify", "async-trait", "bounded-vec-deque", "cfg-if", "derive_builder_fork_arti", - "derive_more 1.0.0", - "downcast-rs", + "derive_more 2.0.1", + "downcast-rs 2.0.1", "dyn-clone", "educe", "futures", "humantime-serde", - "itertools 0.13.0", + "itertools 0.14.0", "once_cell", "oneshot-fused-workaround", "pin-project", - "rand 0.8.5", + "rand 0.9.2", "retry-error", "safelog", "serde", @@ -11285,6 +11545,7 @@ dependencies = [ "tor-protover", "tor-relay-selection", "tor-rtcompat", + "tor-units", "tracing", "void", "weak-table", @@ -11292,29 +11553,27 @@ dependencies = [ [[package]] name = "tor-config" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e8282abe3e4a7e800f0a826acc6f2815887c8b3804b3061b5181223e53be37b" +version = "0.32.0" +source = "git+https://github.com/eigenwallet/arti?rev=5db9ecbd2872d76243dd62be887efd67e4609c87#5db9ecbd2872d76243dd62be887efd67e4609c87" dependencies = [ "amplify", "cfg-if", - "derive-deftly", + "derive-deftly 1.1.0", "derive_builder_fork_arti", "educe", "either", "figment", "fs-mistrust", "futures", - "itertools 0.13.0", + "itertools 0.14.0", "notify", - "once_cell", "paste", "postage", "regex", "serde", "serde-value", "serde_ignored", - "strum 0.26.3", + "strum 0.27.2", "thiserror 2.0.12", "toml 0.8.23", "tor-basic-utils", @@ -11326,12 +11585,10 @@ dependencies = [ [[package]] name = "tor-config-path" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca216bb068d03dc260c821bac24d0b0efdb838bb16117eb57475bb5fa43dfe16" +version = "0.32.0" +source = "git+https://github.com/eigenwallet/arti?rev=5db9ecbd2872d76243dd62be887efd67e4609c87#5db9ecbd2872d76243dd62be887efd67e4609c87" dependencies = [ "directories", - "once_cell", "serde", "shellexpand", "thiserror 2.0.12", @@ -11341,9 +11598,8 @@ dependencies = [ [[package]] name = "tor-consdiff" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e9ce0f35f46f4edcb2495ec71d4607c291bc9b9da0386e0a3cc9ab64bbe41f1" +version = "0.32.0" +source = "git+https://github.com/eigenwallet/arti?rev=5db9ecbd2872d76243dd62be887efd67e4609c87#5db9ecbd2872d76243dd62be887efd67e4609c87" dependencies = [ "digest 0.10.7", "hex", @@ -11353,19 +11609,18 @@ dependencies = [ [[package]] name = "tor-dirclient" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f4b1eec6c4cd0dbb682982ef3db87d0da030bff5d7903604529e8562eaacb45" +version = "0.32.0" +source = "git+https://github.com/eigenwallet/arti?rev=5db9ecbd2872d76243dd62be887efd67e4609c87#5db9ecbd2872d76243dd62be887efd67e4609c87" dependencies = [ "async-compression 0.4.27", "base64ct", - "derive_more 1.0.0", + "derive_more 2.0.1", "futures", "hex", "http 1.3.1", "httparse", "httpdate", - "itertools 0.13.0", + "itertools 0.14.0", "memchr", "thiserror 2.0.12", "tor-circmgr", @@ -11381,14 +11636,13 @@ dependencies = [ [[package]] name = "tor-dirmgr" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca8e2a3a967ef059885cf097cb5cff12493137a05d49a54e63f04379f5ff3c98" +version = "0.32.0" +source = "git+https://github.com/eigenwallet/arti?rev=5db9ecbd2872d76243dd62be887efd67e4609c87#5db9ecbd2872d76243dd62be887efd67e4609c87" dependencies = [ "async-trait", "base64ct", "derive_builder_fork_arti", - "derive_more 1.0.0", + "derive_more 2.0.1", "digest 0.10.7", "educe", "event-listener", @@ -11398,19 +11652,20 @@ dependencies = [ "hex", "humantime", "humantime-serde", - "itertools 0.13.0", + "itertools 0.14.0", "memmap2", - "once_cell", "oneshot-fused-workaround", "paste", "postage", - "rand 0.8.5", + "rand 0.9.2", "rusqlite", "safelog", "scopeguard", "serde", + "serde_json", "signature 2.2.0", - "strum 0.26.3", + "static_assertions", + "strum 0.27.2", "thiserror 2.0.12", "time 0.3.41", "tor-async-utils", @@ -11427,23 +11682,22 @@ dependencies = [ "tor-netdoc", "tor-persist", "tor-proto", + "tor-protover", "tor-rtcompat", "tracing", ] [[package]] name = "tor-error" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53eb5b9557ddb66c45d8d60e731d58fdabaf134e3708ee601accc347b3b9ea24" +version = "0.32.0" +source = "git+https://github.com/eigenwallet/arti?rev=5db9ecbd2872d76243dd62be887efd67e4609c87#5db9ecbd2872d76243dd62be887efd67e4609c87" dependencies = [ - "derive_more 1.0.0", + "derive_more 2.0.1", "futures", - "once_cell", "paste", "retry-error", "static_assertions", - "strum 0.26.3", + "strum 0.27.2", "thiserror 2.0.12", "tracing", "void", @@ -11451,40 +11705,38 @@ dependencies = [ [[package]] name = "tor-general-addr" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f60b135845a8c4546cdb4da673123e5ae3daf4597d9857fd7d720350efac173c" +version = "0.32.0" +source = "git+https://github.com/eigenwallet/arti?rev=5db9ecbd2872d76243dd62be887efd67e4609c87#5db9ecbd2872d76243dd62be887efd67e4609c87" dependencies = [ - "derive_more 1.0.0", + "derive_more 2.0.1", "thiserror 2.0.12", "void", ] [[package]] name = "tor-guardmgr" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79fe4522964d1e843cc8f9d265ee66c99a54ac135d85c70a0d619a11317bf32a" +version = "0.32.0" +source = "git+https://github.com/eigenwallet/arti?rev=5db9ecbd2872d76243dd62be887efd67e4609c87#5db9ecbd2872d76243dd62be887efd67e4609c87" dependencies = [ "amplify", "base64ct", - "derive-deftly", + "derive-deftly 1.1.0", "derive_builder_fork_arti", - "derive_more 1.0.0", + "derive_more 2.0.1", "dyn-clone", "educe", "futures", "humantime", "humantime-serde", - "itertools 0.13.0", + "itertools 0.14.0", "num_enum", "oneshot-fused-workaround", "pin-project", "postage", - "rand 0.8.5", + "rand 0.9.2", "safelog", "serde", - "strum 0.26.3", + "strum 0.27.2", "thiserror 2.0.12", "tor-async-utils", "tor-basic-utils", @@ -11504,24 +11756,23 @@ dependencies = [ [[package]] name = "tor-hsclient" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9304ea1bcfe46baffd1d0307e56520c855541e54623ca1afe0746a6701f53722" +version = "0.32.0" +source = "git+https://github.com/eigenwallet/arti?rev=5db9ecbd2872d76243dd62be887efd67e4609c87#5db9ecbd2872d76243dd62be887efd67e4609c87" dependencies = [ "async-trait", - "derive-deftly", - "derive_more 1.0.0", + "derive-deftly 1.1.0", + "derive_more 2.0.1", "educe", "either", "futures", - "itertools 0.13.0", + "itertools 0.14.0", "oneshot-fused-workaround", "postage", - "rand 0.8.5", + "rand 0.9.2", "retry-error", "safelog", "slotmap-careful", - "strum 0.26.3", + "strum 0.27.2", "thiserror 2.0.12", "tor-async-utils", "tor-basic-utils", @@ -11541,31 +11792,35 @@ dependencies = [ "tor-netdoc", "tor-persist", "tor-proto", + "tor-protover", "tor-rtcompat", "tracing", ] [[package]] name = "tor-hscrypto" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4538644fce1b94d650fb5f9cbb82133ceb32c7dfab44c01da2aa6747c655730" +version = "0.32.0" +source = "git+https://github.com/eigenwallet/arti?rev=5db9ecbd2872d76243dd62be887efd67e4609c87#5db9ecbd2872d76243dd62be887efd67e4609c87" dependencies = [ "cipher", "data-encoding", - "derive-deftly", - "derive_more 1.0.0", + "derive-deftly 1.1.0", + "derive_more 2.0.1", "digest 0.10.7", - "itertools 0.13.0", + "hex", + "humantime", + "itertools 0.14.0", "paste", - "rand 0.8.5", + "rand 0.9.2", "safelog", + "serde", "signature 2.2.0", "subtle", "thiserror 2.0.12", "tor-basic-utils", "tor-bytes", "tor-error", + "tor-key-forge", "tor-llcrypto", "tor-memquota", "tor-units", @@ -11575,17 +11830,16 @@ dependencies = [ [[package]] name = "tor-hsservice" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b4573677a829ab940cfd005f1b13867cb818148c9bfb7d61b2f30fc3005b6cf" +version = "0.32.0" +source = "git+https://github.com/eigenwallet/arti?rev=5db9ecbd2872d76243dd62be887efd67e4609c87#5db9ecbd2872d76243dd62be887efd67e4609c87" dependencies = [ "amplify", "async-trait", "base64ct", "cfg-if", - "derive-deftly", + "derive-deftly 1.1.0", "derive_builder_fork_arti", - "derive_more 1.0.0", + "derive_more 2.0.1", "digest 0.10.7", "educe", "fs-mistrust", @@ -11593,18 +11847,18 @@ dependencies = [ "growable-bloom-filter", "hex", "humantime", - "itertools 0.13.0", + "itertools 0.14.0", "k12", "once_cell", "oneshot-fused-workaround", "postage", - "rand 0.8.5", - "rand_core 0.6.4", + "rand 0.9.2", + "rand_core 0.9.3", "retry-error", "safelog", "serde", "serde_with 3.14.0", - "strum 0.26.3", + "strum 0.27.2", "thiserror 2.0.12", "tor-async-utils", "tor-basic-utils", @@ -11633,48 +11887,49 @@ dependencies = [ [[package]] name = "tor-key-forge" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "288909e7e606ae44577857b2b1fcd13d82af8f2cf9d6128a49f2960bd00ea2d0" +version = "0.32.0" +source = "git+https://github.com/eigenwallet/arti?rev=5db9ecbd2872d76243dd62be887efd67e4609c87#5db9ecbd2872d76243dd62be887efd67e4609c87" dependencies = [ - "derive-deftly", - "derive_more 1.0.0", - "downcast-rs", + "derive-deftly 1.1.0", + "derive_more 2.0.1", + "downcast-rs 2.0.1", "paste", - "rand 0.8.5", + "rand 0.9.2", "signature 2.2.0", "ssh-key", "thiserror 2.0.12", + "tor-bytes", + "tor-cert", + "tor-checkable", "tor-error", - "tor-hscrypto", "tor-llcrypto", ] [[package]] name = "tor-keymgr" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42122694c35e5528a4796c1abf18bf3826da9f7fb24b114909da126e584739ea" +version = "0.32.0" +source = "git+https://github.com/eigenwallet/arti?rev=5db9ecbd2872d76243dd62be887efd67e4609c87#5db9ecbd2872d76243dd62be887efd67e4609c87" dependencies = [ "amplify", "arrayvec", "cfg-if", - "derive-deftly", + "derive-deftly 1.1.0", "derive_builder_fork_arti", - "derive_more 1.0.0", - "downcast-rs", + "derive_more 2.0.1", + "downcast-rs 2.0.1", "dyn-clone", "fs-mistrust", "glob-match", "humantime", "inventory", - "itertools 0.13.0", - "rand 0.8.5", + "itertools 0.14.0", + "rand 0.9.2", "serde", "signature 2.2.0", "ssh-key", "thiserror 2.0.12", "tor-basic-utils", + "tor-bytes", "tor-config", "tor-config-path", "tor-error", @@ -11683,28 +11938,28 @@ dependencies = [ "tor-llcrypto", "tor-persist", "tracing", + "visibility", "walkdir", "zeroize", ] [[package]] name = "tor-linkspec" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3beb6a88523ee3e218e22dc1709588ce2fb40353f8e1fb910208cea42af28c8" +version = "0.32.0" +source = "git+https://github.com/eigenwallet/arti?rev=5db9ecbd2872d76243dd62be887efd67e4609c87#5db9ecbd2872d76243dd62be887efd67e4609c87" dependencies = [ "base64ct", "by_address", "caret", - "derive-deftly", + "derive-deftly 1.1.0", "derive_builder_fork_arti", - "derive_more 1.0.0", + "derive_more 2.0.1", "hex", - "itertools 0.13.0", + "itertools 0.14.0", "safelog", "serde", "serde_with 3.14.0", - "strum 0.26.3", + "strum 0.27.2", "thiserror 2.0.12", "tor-basic-utils", "tor-bytes", @@ -11716,23 +11971,27 @@ dependencies = [ [[package]] name = "tor-llcrypto" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80d1334d3cd0bb0da174a9253335655a30cf30246051886e2a669431f3121b8a" +version = "0.32.0" +source = "git+https://github.com/eigenwallet/arti?rev=5db9ecbd2872d76243dd62be887efd67e4609c87#5db9ecbd2872d76243dd62be887efd67e4609c87" dependencies = [ "aes", "base64ct", "ctr", "curve25519-dalek 4.1.3", - "der-parser 9.0.0", - "derive-deftly", - "derive_more 1.0.0", + "der-parser 10.0.0", + "derive-deftly 1.1.0", + "derive_more 2.0.1", "digest 0.10.7", "ed25519-dalek 2.2.0", "educe", - "getrandom 0.2.16", + "getrandom 0.3.3", "hex", + "rand 0.9.2", + "rand_chacha 0.9.0", "rand_core 0.6.4", + "rand_core 0.9.3", + "rand_jitter", + "rdrand", "rsa", "safelog", "serde", @@ -11750,13 +12009,11 @@ dependencies = [ [[package]] name = "tor-log-ratelim" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b9df274877407145d778375a3b5ea40caefe2172cd0269e803f1c1b4b6cff7d" +version = "0.32.0" +source = "git+https://github.com/eigenwallet/arti?rev=5db9ecbd2872d76243dd62be887efd67e4609c87#5db9ecbd2872d76243dd62be887efd67e4609c87" dependencies = [ "futures", "humantime", - "once_cell", "thiserror 2.0.12", "tor-error", "tor-rtcompat", @@ -11766,16 +12023,15 @@ dependencies = [ [[package]] name = "tor-memquota" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9210e16890a34c549cc7ba9cb6c85788c345010c00ef10a0c78853dee9910b38" +version = "0.32.0" +source = "git+https://github.com/eigenwallet/arti?rev=5db9ecbd2872d76243dd62be887efd67e4609c87#5db9ecbd2872d76243dd62be887efd67e4609c87" dependencies = [ - "derive-deftly", - "derive_more 1.0.0", + "derive-deftly 1.1.0", + "derive_more 2.0.1", "dyn-clone", "educe", "futures", - "itertools 0.13.0", + "itertools 0.14.0", "paste", "pin-project", "serde", @@ -11794,23 +12050,22 @@ dependencies = [ [[package]] name = "tor-netdir" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66f6a0f1d0639ac75b9c1e1ca5f8e7a09f88cb0d4944a75bd0a58a33ecad0299" +version = "0.32.0" +source = "git+https://github.com/eigenwallet/arti?rev=5db9ecbd2872d76243dd62be887efd67e4609c87#5db9ecbd2872d76243dd62be887efd67e4609c87" dependencies = [ "async-trait", "bitflags 2.9.1", - "derive_more 1.0.0", + "derive_more 2.0.1", "digest 0.10.7", "futures", "hex", "humantime", - "itertools 0.13.0", + "itertools 0.14.0", "num_enum", - "rand 0.8.5", + "rand 0.9.2", "serde", "static_assertions", - "strum 0.26.3", + "strum 0.27.2", "thiserror 2.0.12", "time 0.3.41", "tor-basic-utils", @@ -11827,24 +12082,23 @@ dependencies = [ [[package]] name = "tor-netdoc" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b06ea3442a7918df190ad633d70c0da52b0e90a07c3439d4e3354f02448623e" +version = "0.32.0" +source = "git+https://github.com/eigenwallet/arti?rev=5db9ecbd2872d76243dd62be887efd67e4609c87#5db9ecbd2872d76243dd62be887efd67e4609c87" dependencies = [ "amplify", "base64ct", "bitflags 2.9.1", "cipher", "derive_builder_fork_arti", - "derive_more 1.0.0", + "derive_more 2.0.1", "digest 0.10.7", "educe", "hex", "humantime", - "itertools 0.13.0", - "once_cell", - "phf 0.11.3", - "rand 0.8.5", + "itertools 0.14.0", + "memchr", + "phf 0.12.1", + "rand 0.9.2", "serde", "serde_with 3.14.0", "signature 2.2.0", @@ -11871,19 +12125,18 @@ dependencies = [ [[package]] name = "tor-persist" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d30502ee9a3652ac37e9bba74959fa763a16b096e34c45b8e91b297f0e2d458" +version = "0.32.0" +source = "git+https://github.com/eigenwallet/arti?rev=5db9ecbd2872d76243dd62be887efd67e4609c87#5db9ecbd2872d76243dd62be887efd67e4609c87" dependencies = [ "amplify", - "derive-deftly", - "derive_more 1.0.0", + "derive-deftly 1.1.0", + "derive_more 2.0.1", "filetime", "fs-mistrust", "fslock", "fslock-guard", "futures", - "itertools 0.13.0", + "itertools 0.14.0", "oneshot-fused-workaround", "paste", "sanitize-filename", @@ -11900,29 +12153,39 @@ dependencies = [ [[package]] name = "tor-proto" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e60307f21d42f875cb8c6e5525e0c1cc76621a79c27bf4fa76c15b0e114dc1a" +version = "0.32.0" +source = "git+https://github.com/eigenwallet/arti?rev=5db9ecbd2872d76243dd62be887efd67e4609c87#5db9ecbd2872d76243dd62be887efd67e4609c87" dependencies = [ + "amplify", "asynchronous-codec 0.7.0", "bitvec", "bytes", + "caret", + "cfg-if", "cipher", "coarsetime", - "derive-deftly", + "criterion-cycles-per-byte", + "derive-deftly 1.1.0", "derive_builder_fork_arti", - "derive_more 1.0.0", + "derive_more 2.0.1", "digest 0.10.7", "educe", "futures", + "futures-util", "hkdf", "hmac", + "itertools 0.14.0", "oneshot-fused-workaround", "pin-project", - "rand 0.8.5", - "rand_core 0.6.4", + "postage", + "rand 0.9.2", + "rand_core 0.9.3", "safelog", + "slotmap-careful", + "smallvec", + "static_assertions", "subtle", + "sync_wrapper 1.0.2", "thiserror 2.0.12", "tokio", "tokio-util", @@ -11939,6 +12202,7 @@ dependencies = [ "tor-llcrypto", "tor-log-ratelim", "tor-memquota", + "tor-protover", "tor-rtcompat", "tor-rtmock", "tor-units", @@ -11951,21 +12215,22 @@ dependencies = [ [[package]] name = "tor-protover" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a95780782ff7c5a7c942da6a375d1150acfab445d8f3b840e4244a8267d9a3d" +version = "0.32.0" +source = "git+https://github.com/eigenwallet/arti?rev=5db9ecbd2872d76243dd62be887efd67e4609c87#5db9ecbd2872d76243dd62be887efd67e4609c87" dependencies = [ "caret", + "paste", + "serde_with 3.14.0", "thiserror 2.0.12", + "tor-bytes", ] [[package]] name = "tor-relay-selection" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "420da7174f565a75cefb65c3beac5401cca2785d44b192ff2a87edeaddf4d52f" +version = "0.32.0" +source = "git+https://github.com/eigenwallet/arti?rev=5db9ecbd2872d76243dd62be887efd67e4609c87#5db9ecbd2872d76243dd62be887efd67e4609c87" dependencies = [ - "rand 0.8.5", + "rand 0.9.2", "serde", "tor-basic-utils", "tor-linkspec", @@ -11975,21 +12240,24 @@ dependencies = [ [[package]] name = "tor-rtcompat" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1cafe52a2d6a56013e3c43d9ccf396d7b02955d554dcfc26c4ecf7567742d7e" +version = "0.32.0" +source = "git+https://github.com/eigenwallet/arti?rev=5db9ecbd2872d76243dd62be887efd67e4609c87#5db9ecbd2872d76243dd62be887efd67e4609c87" dependencies = [ "async-trait", "async_executors", + "asynchronous-codec 0.7.0", "coarsetime", - "derive_more 1.0.0", + "derive_more 2.0.1", "dyn-clone", "educe", "futures", "futures-rustls 0.26.0", + "hex", + "libc", "paste", "pin-project", "rustls-pki-types", + "rustls-webpki 0.103.4", "thiserror 2.0.12", "tokio", "tokio-util", @@ -11997,28 +12265,27 @@ dependencies = [ "tor-general-addr", "tracing", "void", - "x509-signature", ] [[package]] name = "tor-rtmock" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34efd1ca1ed977e0155cf63df7dc81322970155f299950a1127e80b6bab74192" +version = "0.32.0" +source = "git+https://github.com/eigenwallet/arti?rev=5db9ecbd2872d76243dd62be887efd67e4609c87#5db9ecbd2872d76243dd62be887efd67e4609c87" dependencies = [ "amplify", + "assert_matches", "async-trait", - "derive-deftly", - "derive_more 1.0.0", + "derive-deftly 1.1.0", + "derive_more 2.0.1", "educe", "futures", "humantime", - "itertools 0.13.0", + "itertools 0.14.0", "oneshot-fused-workaround", "pin-project", "priority-queue", "slotmap-careful", - "strum 0.26.3", + "strum 0.27.2", "thiserror 2.0.12", "tor-error", "tor-general-addr", @@ -12030,13 +12297,12 @@ dependencies = [ [[package]] name = "tor-socksproto" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f59ccd382fc36b4414f9b7a9511ffb323573a09110248a338b2443d302bdcd26" +version = "0.32.0" +source = "git+https://github.com/eigenwallet/arti?rev=5db9ecbd2872d76243dd62be887efd67e4609c87#5db9ecbd2872d76243dd62be887efd67e4609c87" dependencies = [ "amplify", "caret", - "derive-deftly", + "derive-deftly 1.1.0", "educe", "safelog", "subtle", @@ -12047,12 +12313,12 @@ dependencies = [ [[package]] name = "tor-units" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdeb3e823e4d194227eab21dff65c738c6ce1755a41395538e4e48e04f37c7f" +version = "0.32.0" +source = "git+https://github.com/eigenwallet/arti?rev=5db9ecbd2872d76243dd62be887efd67e4609c87#5db9ecbd2872d76243dd62be887efd67e4609c87" dependencies = [ - "derive-deftly", - "derive_more 1.0.0", + "derive-deftly 1.1.0", + "derive_more 2.0.1", + "serde", "thiserror 2.0.12", "tor-memquota", ] @@ -12281,12 +12547,12 @@ dependencies = [ [[package]] name = "tray-icon" -version = "0.21.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2da75ec677957aa21f6e0b361df0daab972f13a5bee3606de0638fd4ee1c666a" +checksum = "a0d92153331e7d02ec09137538996a7786fe679c629c279e82a6be762b7e6fe2" dependencies = [ "crossbeam-channel", - "dirs 6.0.0", + "dirs", "libappindicator", "muda", "objc2 0.6.1", @@ -12344,9 +12610,13 @@ dependencies = [ [[package]] name = "typed-index-collections" -version = "3.1.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "183496e014253d15abbe6235677b1392dba2d40524c88938991226baa38ac7c4" +checksum = "3fd393dbd1e7b23e0cab7396570309b4068aa504e9dac2cd41d827583b4e9ab7" +dependencies = [ + "bincode 2.0.1", + "serde", +] [[package]] name = "typeid" @@ -12898,13 +13168,13 @@ dependencies = [ [[package]] name = "wayland-backend" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe770181423e5fc79d3e2a7f4410b7799d5aab1de4372853de3c6aa13ca24121" +checksum = "673a33c33048a5ade91a6b139580fa174e19fb0d23f396dca9fa15f2e1e49b35" dependencies = [ "cc", - "downcast-rs", - "rustix 0.38.44", + "downcast-rs 1.2.1", + "rustix 1.0.8", "scoped-tls", "smallvec", "wayland-sys", @@ -12912,21 +13182,21 @@ dependencies = [ [[package]] name = "wayland-client" -version = "0.31.10" +version = "0.31.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978fa7c67b0847dbd6a9f350ca2569174974cd4082737054dbb7fbb79d7d9a61" +checksum = "c66a47e840dc20793f2264eb4b3e4ecb4b75d91c0dd4af04b456128e0bdd449d" dependencies = [ "bitflags 2.9.1", - "rustix 0.38.44", + "rustix 1.0.8", "wayland-backend", "wayland-scanner", ] [[package]] name = "wayland-protocols" -version = "0.32.8" +version = "0.32.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "779075454e1e9a521794fed15886323ea0feda3f8b0fc1390f5398141310422a" +checksum = "efa790ed75fbfd71283bd2521a1cfdc022aabcc28bdcff00851f9e4ae88d9901" dependencies = [ "bitflags 2.9.1", "wayland-backend", @@ -12936,9 +13206,9 @@ dependencies = [ [[package]] name = "wayland-protocols-wlr" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cb6cdc73399c0e06504c437fe3cf886f25568dd5454473d565085b36d6a8bbf" +checksum = "efd94963ed43cf9938a090ca4f7da58eb55325ec8200c3848963e98dc25b78ec" dependencies = [ "bitflags 2.9.1", "wayland-backend", @@ -12949,9 +13219,9 @@ dependencies = [ [[package]] name = "wayland-scanner" -version = "0.31.6" +version = "0.31.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "896fdafd5d28145fce7958917d69f2fd44469b1d4e861cb5961bcbeebc6d1484" +checksum = "54cb1e9dc49da91950bdfd8b848c49330536d9d1fb03d4bfec8cae50caa50ae3" dependencies = [ "proc-macro2", "quick-xml 0.37.5", @@ -12960,9 +13230,9 @@ dependencies = [ [[package]] name = "wayland-sys" -version = "0.31.6" +version = "0.31.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbcebb399c77d5aa9fa5db874806ee7b4eba4e73650948e8f93963f128896615" +checksum = "34949b42822155826b41db8e5d0c1be3a2bd296c747577a43a3e6daefc296142" dependencies = [ "dlib", "log", @@ -13089,14 +13359,14 @@ version = "0.26.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "521bc38abb08001b01866da9f51eb7c5d647a19260e00054a8c7fd5f9e57f7a9" dependencies = [ - "webpki-roots 1.0.1", + "webpki-roots 1.0.2", ] [[package]] name = "webpki-roots" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8782dd5a41a24eed3a4f40b606249b3e236ca61adf1f25ea4d45c73de122b502" +checksum = "7e8983c3ab33d6fb807cfcdad2491c4ea8cbc8ed839181c7dfd9c67c83e261b2" dependencies = [ "rustls-pki-types", ] @@ -13149,7 +13419,7 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6994d13118ab492c3c80c1f81928718159254c53c472bf9ce36f8dae4add02a7" dependencies = [ - "redox_syscall 0.5.13", + "redox_syscall 0.5.17", "wasite", ] @@ -13378,7 +13648,7 @@ version = "0.60.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" dependencies = [ - "windows-targets 0.53.2", + "windows-targets 0.53.3", ] [[package]] @@ -13429,10 +13699,11 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.53.2" +version = "0.53.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c66f69fcc9ce11da9966ddb31a40968cad001c5bedeb5c2b82ede4253ab48aef" +checksum = "d5fe6031c4041849d7c496a8ded650796e7b6ecc19df1a431c1a363342e5dc91" dependencies = [ + "windows-link", "windows_aarch64_gnullvm 0.53.0", "windows_aarch64_msvc 0.53.0", "windows_i686_gnu 0.53.0", @@ -13850,16 +14121,6 @@ dependencies = [ "time 0.3.41", ] -[[package]] -name = "x509-signature" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb2bc2a902d992cd5f471ee3ab0ffd6603047a4207384562755b9d6de977518" -dependencies = [ - "ring 0.16.20", - "untrusted 0.7.1", -] - [[package]] name = "xattr" version = "1.5.1" @@ -13908,16 +14169,16 @@ dependencies = [ [[package]] name = "yamux" -version = "0.13.5" +version = "0.13.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3da1acad1c2dc53f0dde419115a38bd8221d8c3e47ae9aeceaf453266d29307e" +checksum = "2b2dd50a6d6115feb3e5d7d0efd45e8ca364b6c83722c1e9c602f5764e0e9597" dependencies = [ "futures", "log", "nohash-hasher", "parking_lot 0.12.4", "pin-project", - "rand 0.9.1", + "rand 0.9.2", "static_assertions", "web-time", ] @@ -13957,9 +14218,9 @@ dependencies = [ [[package]] name = "zbus" -version = "5.8.0" +version = "5.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597f45e98bc7e6f0988276012797855613cd8269e23b5be62cc4e5d28b7e515d" +checksum = "4bb4f9a464286d42851d18a605f7193b8febaf5b0919d71c6399b7b26e5b0aad" dependencies = [ "async-broadcast", "async-executor", @@ -13991,9 +14252,9 @@ dependencies = [ [[package]] name = "zbus_macros" -version = "5.8.0" +version = "5.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5c8e4e14dcdd9d97a98b189cd1220f30e8394ad271e8c987da84f73693862c2" +checksum = "ef9859f68ee0c4ee2e8cde84737c78e3f4c54f946f2a38645d0d4c7a95327659" dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", diff --git a/Cargo.toml b/Cargo.toml index 4ed59411..929c00e0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,6 +2,7 @@ resolver = "2" members = [ "electrum-pool", + "libp2p-community-tor", "monero-rpc", "monero-rpc-pool", "monero-seed", @@ -36,6 +37,13 @@ typeshare = "1.0" url = { version = "2", features = ["serde"] } uuid = { version = "1", features = ["v4"] } +# Tor/Arti crates +arti-client = { git = "https://github.com/eigenwallet/arti", rev = "5db9ecbd2872d76243dd62be887efd67e4609c87", default-features = false } +tor-cell = { git = "https://github.com/eigenwallet/arti", rev = "5db9ecbd2872d76243dd62be887efd67e4609c87" } +tor-hsservice = { git = "https://github.com/eigenwallet/arti", rev = "5db9ecbd2872d76243dd62be887efd67e4609c87" } +tor-proto = { git = "https://github.com/eigenwallet/arti", rev = "5db9ecbd2872d76243dd62be887efd67e4609c87" } +tor-rtcompat = { git = "https://github.com/eigenwallet/arti", rev = "5db9ecbd2872d76243dd62be887efd67e4609c87" } + [patch.crates-io] # patch until new release https://github.com/thomaseizinger/rust-jsonrpc-client/pull/51 jsonrpc_client = { git = "https://github.com/delta1/rust-jsonrpc-client.git", rev = "3b6081697cd616c952acb9c2f02d546357d35506" } diff --git a/libp2p-community-tor/CHANGELOG.md b/libp2p-community-tor/CHANGELOG.md new file mode 100644 index 00000000..976d5c6f --- /dev/null +++ b/libp2p-community-tor/CHANGELOG.md @@ -0,0 +1,47 @@ +# 0.4.1 + +- Remove double features: See [PR 21] +- Correct typo in `src/lib.rs`: See [PR 21] +- Update `CHANGELOG.md`: See [PR 21] + +[PR 21]: https://github.com/umgefahren/libp2p-tor/pull/21 + +# 0.4.0 + +## Changes + +- Updated dependencies: See [PR 18] + - [`arti-client` to `v0.24.0`] + - [`libp2p` to `v0.53.0`] + - [`tor-rtcompat` to `v0.24.0`] +- Add tracing: See [PR 18] +- Update CI: See [PR 20] + - `actions/checkout` to `v4` + - Remove `arduino/setup-protoc` + +## First time contributor + +- @binarybaron + +Thanks! :rocket: + +[PR 18]: https://github.com/umgefahren/libp2p-tor/pull/18 +[PR 20]: https://github.com/umgefahren/libp2p-tor/pull/20 + +# 0.3.0-alpha + +- Updated dependencies: See [PR 6]. + - [`arti-client` to `v0.8` + +- Updated dependencies: See [PR 8]. + - `libp2p-core` to `v0.39` + - `libp2p` to `0.51` + +[PR 6]: https://github.com/umgefahren/libp2p-tor/pull/6 +[PR 8]: https://github.com/umgefahren/libp2p-tor/pull/8 + +# 0.2.0-alpha + +- Updated dependencies: + - [`libp2p` to `v0.50.0`](#2) + - [`libp2p-core` to `v0.38.0`](#3) diff --git a/libp2p-community-tor/Cargo.toml b/libp2p-community-tor/Cargo.toml new file mode 100644 index 00000000..5b3dc244 --- /dev/null +++ b/libp2p-community-tor/Cargo.toml @@ -0,0 +1,47 @@ +[package] +name = "libp2p-community-tor" +version = "0.5.0" +authors = ["umgefahren "] +edition = "2021" +license = "MIT" +repository = "https://github.com/umgefahren/libp2p-tor" +resolver = "2" +description = "Tor transport for libp2p." + +[dependencies] +anyhow = { workspace = true } +futures = { workspace = true } +thiserror = { workspace = true } +tokio = { workspace = true } + +arti-client = { workspace = true, features = ["tokio", "rustls", "onion-service-client", "static-sqlite"] } +libp2p = { workspace = true, features = ["tokio", "tcp", "tls"] } + +data-encoding = { version = "2.6.0" } +tor-cell = { workspace = true, optional = true } +tor-hsservice = { workspace = true, optional = true } +tor-proto = { workspace = true, optional = true } +tor-rtcompat = { workspace = true, features = ["tokio", "rustls"] } +tracing = { workspace = true } + +[dev-dependencies] +libp2p = { workspace = true, features = ["tokio", "noise", "yamux", "ping", "macros", "tcp", "tls"] } +tokio = { workspace = true, features = ["macros"] } +tokio-test = "0.4.4" +tracing-subscriber = { workspace = true } + +[features] +listen-onion-service = [ + "arti-client/onion-service-service", + "dep:tor-hsservice", + "dep:tor-cell", + "dep:tor-proto", +] + +[[example]] +name = "ping-onion" +required-features = ["listen-onion-service"] + +[package.metadata.docs.rs] +all-features = true +rustdoc-args = ["--cfg", "docsrs"] diff --git a/libp2p-community-tor/LICENSE b/libp2p-community-tor/LICENSE new file mode 100644 index 00000000..582138e0 --- /dev/null +++ b/libp2p-community-tor/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 Hannes Furmans + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/libp2p-community-tor/README.md b/libp2p-community-tor/README.md new file mode 100644 index 00000000..1575425e --- /dev/null +++ b/libp2p-community-tor/README.md @@ -0,0 +1,51 @@ +[![Continuous integration](https://github.com/umgefahren/libp2p-tor/actions/workflows/ci.yml/badge.svg)](https://github.com/umgefahren/libp2p-tor/actions/workflows/ci.yml) +[![docs.rs](https://img.shields.io/docsrs/libp2p-community-tor?style=flat-square)](https://docs.rs/libp2p-community-tor/latest) +[![Crates.io](https://img.shields.io/crates/v/libp2p-community-tor?style=flat-square)](https://crates.io/crates/libp2p-community-tor) + +# libp2p Tor + +Tor based transport for libp2p. Connect through the Tor network to TCP listeners. + +Build on top of [Arti](https://gitlab.torproject.org/tpo/core/arti). + +## New Feature + +This crate supports, since #21 (thanks to @binarybaron), listening as a Tor hidden service as well as connecting to them. + +## ⚠️ Misuse warning ⚠️ - read carefully before using + +Although the sound of "Tor" might convey a sense of security it is _very_ easy to misuse this +crate and leaking private information while using. Study libp2p carefully and try to make sure +you fully understand it's current limits regarding privacy. I.e. using identify might already +render this transport obsolete. + +This transport explicitly **doesn't** provide any enhanced privacy if it's just used like a regular transport. +Use with caution and at your own risk. **Don't** just blindly advertise Tor without fully understanding what you +are dealing with. + +### Add to your dependencies + +```bash +cargo add libp2p-community-tor +``` + +This crate uses tokio with rustls for its runtime and TLS implementation. +No other combinations are supported. + +- [`rustls`](https://github.com/rustls/rustls) +- [`tokio`](https://github.com/tokio-rs/tokio) + +### Example + +```rust +let address = "/dns/www.torproject.org/tcp/1000".parse()?; +let mut transport = libp2p_community_tor::TorTransport::bootstrapped().await?; +// we have achieved tor connection +let _conn = transport.dial(address)?.await?; +``` + +### About + +This crate originates in a PR to bring Tor support too rust-libp2p. Read more about it here: libp2p/rust-libp2p#2899 + +License: MIT diff --git a/libp2p-community-tor/examples/ping-onion.rs b/libp2p-community-tor/examples/ping-onion.rs new file mode 100644 index 00000000..59f40a5d --- /dev/null +++ b/libp2p-community-tor/examples/ping-onion.rs @@ -0,0 +1,159 @@ +// Copyright 2022 Hannes Furmans +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. + +//! Ping-Onion example +//! +//! See ../src/tutorial.rs for a step-by-step guide building the example below. +//! +//! This example requires two seperate computers, one of which has to be reachable from the +//! internet. +//! +//! On the first computer run: +//! ```sh +//! cargo run --example ping +//! ``` +//! +//! It will print the PeerId and the listening addresses, e.g. `Listening on +//! "/ip4/0.0.0.0/tcp/24915"` +//! +//! Make sure that the first computer is reachable under one of these ip addresses and port. +//! +//! On the second computer run: +//! ```sh +//! cargo run --example ping-onion -- /ip4/123.45.67.89/tcp/24915 +//! ``` +//! +//! The two nodes establish a connection, negotiate the ping protocol +//! and begin pinging each other over Tor. + +use futures::StreamExt; +use libp2p::core::upgrade::Version; +use libp2p::Transport; +use libp2p::{ + core::muxing::StreamMuxerBox, + identity, noise, + swarm::{NetworkBehaviour, SwarmEvent}, + yamux, Multiaddr, PeerId, SwarmBuilder, +}; +use libp2p_community_tor::{AddressConversion, TorTransport}; +use std::error::Error; +use tor_hsservice::config::OnionServiceConfigBuilder; + +/// Create a transport +/// Returns a tuple of the transport and the onion address we can instruct it to listen on +async fn onion_transport( + keypair: identity::Keypair, +) -> Result< + ( + libp2p::core::transport::Boxed<(PeerId, libp2p::core::muxing::StreamMuxerBox)>, + Multiaddr, + ), + Box, +> { + let mut transport = TorTransport::bootstrapped() + .await? + .with_address_conversion(AddressConversion::IpAndDns); + + // We derive the nickname for the onion address from the peer id + let svg_cfg = OnionServiceConfigBuilder::default() + .nickname( + keypair + .public() + .to_peer_id() + .to_base58() + .to_ascii_lowercase() + .parse() + .unwrap(), + ) + .num_intro_points(3) + .build() + .unwrap(); + + let onion_listen_address = transport.add_onion_service(svg_cfg, 999).unwrap(); + + let auth_upgrade = noise::Config::new(&keypair)?; + let multiplex_upgrade = yamux::Config::default(); + + let transport = transport + .boxed() + .upgrade(Version::V1) + .authenticate(auth_upgrade) + .multiplex(multiplex_upgrade) + .map(|(peer, muxer), _| (peer, StreamMuxerBox::new(muxer))) + .boxed(); + + Ok((transport, onion_listen_address)) +} + +#[tokio::main] +async fn main() -> Result<(), Box> { + tracing_subscriber::fmt::init(); + + let local_key = identity::Keypair::generate_ed25519(); + let local_peer_id = PeerId::from(local_key.public()); + + println!("Local peer id: {local_peer_id}"); + + let (transport, onion_listen_address) = onion_transport(local_key).await?; + + let mut swarm = SwarmBuilder::with_new_identity() + .with_tokio() + .with_other_transport(|_| transport) + .unwrap() + .with_behaviour(|_| Behaviour { + ping: libp2p::ping::Behaviour::default(), + }) + .unwrap() + .build(); + + // Dial the peer identified by the multi-address given as the second + // command-line argument, if any. + if let Some(addr) = std::env::args().nth(1) { + let remote: Multiaddr = addr.parse()?; + swarm.dial(remote)?; + println!("Dialed {addr}") + } else { + // If we are not dialing, we need to listen + // Tell the swarm to listen on a specific onion address + swarm.listen_on(onion_listen_address).unwrap(); + } + + loop { + match swarm.select_next_some().await { + SwarmEvent::ConnectionEstablished { + endpoint, peer_id, .. + } => { + println!("Connection established with {peer_id} on {endpoint:?}"); + } + SwarmEvent::OutgoingConnectionError { peer_id, error, .. } => { + println!("Outgoing connection error with {peer_id:?}: {error:?}"); + } + SwarmEvent::NewListenAddr { address, .. } => println!("Listening on {address:?}"), + SwarmEvent::Behaviour(event) => println!("{event:?}"), + _ => {} + } + } +} + +/// Our network behaviour. +#[derive(NetworkBehaviour)] +struct Behaviour { + ping: libp2p::ping::Behaviour, +} diff --git a/libp2p-community-tor/src/address.rs b/libp2p-community-tor/src/address.rs new file mode 100644 index 00000000..dedcac59 --- /dev/null +++ b/libp2p-community-tor/src/address.rs @@ -0,0 +1,176 @@ +// Copyright 2022 Hannes Furmans +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. +use arti_client::{DangerouslyIntoTorAddr, IntoTorAddr, TorAddr}; +use libp2p::{core::multiaddr::Protocol, multiaddr::Onion3Addr, Multiaddr}; +use std::net::SocketAddr; + +/// "Dangerously" extract a Tor address from the provided [`Multiaddr`]. +/// +/// See [`DangerouslyIntoTorAddr`] for details around the safety / privacy considerations. +pub fn dangerous_extract(multiaddr: &Multiaddr) -> Option { + if let Some(tor_addr) = safe_extract(multiaddr) { + return Some(tor_addr); + } + + let mut protocols = multiaddr.into_iter(); + + let tor_addr = try_to_socket_addr(&protocols.next()?, &protocols.next()?)? + .into_tor_addr_dangerously() + .ok()?; + + Some(tor_addr) +} + +/// "Safely" extract a Tor address from the provided [`Multiaddr`]. +/// +/// See [`IntoTorAddr`] for details around the safety / privacy considerations. +pub fn safe_extract(multiaddr: &Multiaddr) -> Option { + let mut protocols = multiaddr.into_iter(); + + let tor_addr = try_to_domain_and_port(&protocols.next()?, &protocols.next())? + .into_tor_addr() + .ok()?; + + Some(tor_addr) +} + +fn libp2p_onion_address_to_domain_and_port<'a>( + onion_address: &'a Onion3Addr<'_>, +) -> (&'a str, u16) { + // Here we convert from Onion3Addr to TorAddr + // We need to leak the string because it's a temporary string that would otherwise be freed + let hash = data_encoding::BASE32.encode(onion_address.hash()); + let onion_domain = format!("{hash}.onion"); + let onion_domain = Box::leak(onion_domain.into_boxed_str()); + + (onion_domain, onion_address.port()) +} + +fn try_to_domain_and_port<'a>( + maybe_domain: &'a Protocol, + maybe_port: &Option, +) -> Option<(&'a str, u16)> { + match (maybe_domain, maybe_port) { + ( + Protocol::Dns(domain) | Protocol::Dns4(domain) | Protocol::Dns6(domain), + Some(Protocol::Tcp(port)), + ) => Some((domain.as_ref(), *port)), + (Protocol::Onion3(domain), _) => Some(libp2p_onion_address_to_domain_and_port(domain)), + _ => None, + } +} + +fn try_to_socket_addr(maybe_ip: &Protocol, maybe_port: &Protocol) -> Option { + match (maybe_ip, maybe_port) { + (Protocol::Ip4(ip), Protocol::Tcp(port)) => Some(SocketAddr::from((*ip, *port))), + (Protocol::Ip6(ip), Protocol::Tcp(port)) => Some(SocketAddr::from((*ip, *port))), + _ => None, + } +} + +#[cfg(test)] +mod tests { + use super::*; + use arti_client::TorAddr; + use std::net::{Ipv4Addr, Ipv6Addr}; + + #[test] + fn extract_correct_address_from_dns() { + let addresses = [ + "/dns/ip.tld/tcp/10".parse().unwrap(), + "/dns4/dns.ip4.tld/tcp/11".parse().unwrap(), + "/dns6/dns.ip6.tld/tcp/12".parse().unwrap(), + ]; + + let actual = addresses + .iter() + .filter_map(safe_extract) + .collect::>(); + + assert_eq!( + &[ + TorAddr::from(("ip.tld", 10)).unwrap(), + TorAddr::from(("dns.ip4.tld", 11)).unwrap(), + TorAddr::from(("dns.ip6.tld", 12)).unwrap(), + ], + actual.as_slice() + ); + } + + #[test] + fn extract_correct_address_from_ips() { + let addresses = [ + "/ip4/127.0.0.1/tcp/10".parse().unwrap(), + "/ip6/::1/tcp/10".parse().unwrap(), + ]; + + let actual = addresses + .iter() + .filter_map(dangerous_extract) + .collect::>(); + + assert_eq!( + &[ + TorAddr::dangerously_from((Ipv4Addr::LOCALHOST, 10)).unwrap(), + TorAddr::dangerously_from((Ipv6Addr::LOCALHOST, 10)).unwrap(), + ], + actual.as_slice() + ); + } + + #[test] + fn dangerous_extract_works_on_domains_too() { + let addresses = [ + "/dns/ip.tld/tcp/10".parse().unwrap(), + "/ip4/127.0.0.1/tcp/10".parse().unwrap(), + "/ip6/::1/tcp/10".parse().unwrap(), + ]; + + let actual = addresses + .iter() + .filter_map(dangerous_extract) + .collect::>(); + + assert_eq!( + &[ + TorAddr::from(("ip.tld", 10)).unwrap(), + TorAddr::dangerously_from((Ipv4Addr::LOCALHOST, 10)).unwrap(), + TorAddr::dangerously_from((Ipv6Addr::LOCALHOST, 10)).unwrap(), + ], + actual.as_slice() + ); + } + + #[test] + fn detect_incorrect_address() { + let addresses = [ + "/tcp/10/udp/12".parse().unwrap(), + "/dns/ip.tld/dns4/ip.tld/dns6/ip.tld".parse().unwrap(), + "/tcp/10/ip4/1.1.1.1".parse().unwrap(), + ]; + + let all_correct = addresses.iter().map(safe_extract).all(|res| res.is_none()); + + assert!( + all_correct, + "During the parsing of the faulty addresses, there was an incorrectness" + ); + } +} diff --git a/libp2p-community-tor/src/lib.rs b/libp2p-community-tor/src/lib.rs new file mode 100644 index 00000000..70b17999 --- /dev/null +++ b/libp2p-community-tor/src/lib.rs @@ -0,0 +1,466 @@ +// Copyright 2022 Hannes Furmans +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. + +#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] +#![warn(clippy::pedantic)] +#![deny(unsafe_code)] +//! Tor based transport for libp2p. Connect through the Tor network to TCP listeners. +//! +//! # ⚠️ Misuse warning ⚠️ - read carefully before using +//! Although the sound of "Tor" might convey a sense of security it is *very* easy to misuse this +//! crate and leaking private information while using. Study libp2p carefully and try to make sure +//! you fully understand it's current limits regarding privacy. I.e. using identify might already +//! render this transport obsolete. +//! +//! This transport explicitly **doesn't** provide any enhanced privacy if it's just used like a regular transport. +//! Use with caution and at your own risk. **Don't** just blindly advertise Tor without fully understanding what you +//! are dealing with. +//! +//! ## Runtime +//! +//! This crate uses tokio with rustls for its runtime and TLS implementation. +//! No other combinations are supported. +//! +//! ## Example +//! ```no_run +//! use libp2p::core::Transport; +//! # async fn test_func() -> Result<(), Box> { +//! let address = "/dns/www.torproject.org/tcp/1000".parse()?; +//! let mut transport = libp2p_community_tor::TorTransport::bootstrapped().await?; +//! // we have achieved tor connection +//! let _conn = transport.dial(address)?.await?; +//! # Ok(()) +//! # } +//! # tokio_test::block_on(test_func()); +//! ``` + +use arti_client::{TorClient, TorClientBuilder}; +use futures::future::BoxFuture; +use libp2p::{ + core::transport::{ListenerId, TransportEvent}, + Multiaddr, Transport, TransportError, +}; +use std::pin::Pin; +use std::sync::Arc; +use std::task::{Context, Poll}; +use thiserror::Error; +use tor_rtcompat::tokio::TokioRustlsRuntime; + +// We only need these imports if the `listen-onion-service` feature is enabled +#[cfg(feature = "listen-onion-service")] +use std::collections::HashMap; +#[cfg(feature = "listen-onion-service")] +use std::str::FromStr; +#[cfg(feature = "listen-onion-service")] +use tor_cell::relaycell::msg::{Connected, End, EndReason}; +#[cfg(feature = "listen-onion-service")] +use tor_hsservice::{ + handle_rend_requests, status::OnionServiceStatus, HsId, OnionServiceConfig, + RunningOnionService, StreamRequest, +}; +#[cfg(feature = "listen-onion-service")] +use tor_proto::stream::IncomingStreamRequest; + +mod address; +mod provider; + +use address::{dangerous_extract, safe_extract}; +pub use provider::TokioTorStream; + +pub type TorError = arti_client::Error; + +type PendingUpgrade = BoxFuture<'static, Result>; +#[cfg(feature = "listen-onion-service")] +type OnionServiceStream = futures::stream::BoxStream<'static, StreamRequest>; +#[cfg(feature = "listen-onion-service")] +type OnionServiceStatusStream = futures::stream::BoxStream<'static, OnionServiceStatus>; + +/// Struct representing an onion address we are listening on for libp2p connections. +#[cfg(feature = "listen-onion-service")] +struct TorListener { + #[allow(dead_code)] // We need to own this to keep the RunningOnionService alive + /// The onion service we are listening on + service: Arc, + /// The stream of status updates for the onion service + status_stream: OnionServiceStatusStream, + /// The stream incoming [`StreamRequest`]s + request_stream: OnionServiceStream, + + /// The port we are listening on + port: u16, + /// The onion address we are listening on + onion_address: Multiaddr, + /// Whether we have already announced this address + announced: bool, +} + +/// Mode of address conversion. +/// Refer tor [arti_client::TorAddr](https://docs.rs/arti-client/latest/arti_client/struct.TorAddr.html) for details +#[derive(Debug, Clone, Copy, Hash, Default, PartialEq, Eq, PartialOrd, Ord)] +pub enum AddressConversion { + /// Uses only DNS for address resolution (default). + #[default] + DnsOnly, + /// Uses IP and DNS for addresses. + IpAndDns, +} + +pub struct TorTransport { + pub conversion_mode: AddressConversion, + + /// The Tor client. + client: Arc>, + + /// Onion services we are listening on. + #[cfg(feature = "listen-onion-service")] + listeners: HashMap, + + /// Onion services we are running but currently not listening on + #[cfg(feature = "listen-onion-service")] + services: Vec<(Arc, OnionServiceStream)>, +} + +impl TorTransport { + /// Creates a new `TorClientBuilder`. + /// + /// # Panics + /// Panics if the current runtime is not a `TokioRustlsRuntime`. + pub fn builder() -> TorClientBuilder { + let runtime = + TokioRustlsRuntime::current().expect("Couldn't get the current tokio rustls runtime"); + TorClient::with_runtime(runtime) + } + + /// Creates a bootstrapped `TorTransport` + /// + /// # Errors + /// Could return error emitted during Tor bootstrap by Arti. + pub async fn bootstrapped() -> Result { + let builder = Self::builder(); + let ret = Self::from_builder(&builder, AddressConversion::DnsOnly)?; + ret.bootstrap().await?; + Ok(ret) + } + + /// Builds a `TorTransport` from an Arti `TorClientBuilder` but does not bootstrap it. + /// + /// # Errors + /// Could return error emitted during creation of the `TorClient`. + pub fn from_builder( + builder: &TorClientBuilder, + conversion_mode: AddressConversion, + ) -> Result { + let client = Arc::new(builder.create_unbootstrapped()?); + + Ok(Self::from_client(client, conversion_mode)) + } + + /// Builds a `TorTransport` from an existing Arti `TorClient`. + pub fn from_client( + client: Arc>, + conversion_mode: AddressConversion, + ) -> Self { + Self { + conversion_mode, + client, + #[cfg(feature = "listen-onion-service")] + listeners: HashMap::new(), + #[cfg(feature = "listen-onion-service")] + services: Vec::new(), + } + } + + /// Bootstraps the `TorTransport` into the Tor network. + /// + /// # Errors + /// Could return error emitted during bootstrap by Arti. + pub async fn bootstrap(&self) -> Result<(), TorError> { + self.client.bootstrap().await + } + + /// Set the address conversion mode + #[must_use] + pub fn with_address_conversion(mut self, conversion_mode: AddressConversion) -> Self { + self.conversion_mode = conversion_mode; + self + } + + /// Call this function to instruct the transport to listen on a specific onion address + /// You need to call this function **before** calling `listen_on` + /// + /// # Returns + /// Returns the Multiaddr of the onion address that the transport can be instructed to listen on + /// To actually listen on the address, you need to call [`listen_on`] with the returned address + /// + /// # Errors + /// Returns an error if we cannot get the onion address of the service + #[cfg(feature = "listen-onion-service")] + pub fn add_onion_service( + &mut self, + svc_cfg: OnionServiceConfig, + port: u16, + ) -> anyhow::Result { + let (service, request_stream) = self.client.launch_onion_service(svc_cfg)?; + let request_stream = Box::pin(handle_rend_requests(request_stream)); + + let multiaddr = service + .onion_name() + .ok_or_else(|| anyhow::anyhow!("Onion service has no onion address"))? + .to_multiaddr(port); + + self.services.push((service, request_stream)); + + Ok(multiaddr) + } +} + +#[derive(Debug, Error)] +pub enum TorTransportError { + #[error(transparent)] + Client(#[from] TorError), + #[cfg(feature = "listen-onion-service")] + #[error(transparent)] + Service(#[from] tor_hsservice::ClientError), + #[cfg(feature = "listen-onion-service")] + #[error("Stream closed before receiving data")] + StreamClosed, + #[cfg(feature = "listen-onion-service")] + #[error("Stream port does not match listener port")] + StreamPortMismatch, + #[cfg(feature = "listen-onion-service")] + #[error("Onion service is broken")] + Broken, +} + +#[cfg(feature = "listen-onion-service")] +trait HsIdExt { + fn to_multiaddr(&self, port: u16) -> Multiaddr; +} + +#[cfg(feature = "listen-onion-service")] +impl HsIdExt for HsId { + /// Convert an `HsId` to a `Multiaddr` + fn to_multiaddr(&self, port: u16) -> Multiaddr { + let onion_domain = self.to_string(); + let onion_without_dot_onion = onion_domain + .split('.') + .nth(0) + .expect("Display formatting of HsId to contain .onion suffix"); + let multiaddress_string = format!("/onion3/{onion_without_dot_onion}:{port}"); + + Multiaddr::from_str(&multiaddress_string) + .expect("A valid onion address to be convertible to a Multiaddr") + } +} + +impl Transport for TorTransport { + type Output = TokioTorStream; + type Error = TorTransportError; + type Dial = BoxFuture<'static, Result>; + type ListenerUpgrade = PendingUpgrade; + + #[cfg(not(feature = "listen-onion-service"))] + fn listen_on( + &mut self, + _id: ListenerId, + onion_address: Multiaddr, + ) -> Result<(), TransportError> { + // If the `listen-onion-service` feature is not enabled, we do not support listening + Err(TransportError::MultiaddrNotSupported(onion_address.clone())) + } + + #[cfg(feature = "listen-onion-service")] + fn listen_on( + &mut self, + id: ListenerId, + onion_address: Multiaddr, + ) -> Result<(), TransportError> { + // If the address is not an onion3 address, return an error + let Some(libp2p::multiaddr::Protocol::Onion3(address)) = onion_address.into_iter().nth(0) + else { + return Err(TransportError::MultiaddrNotSupported(onion_address.clone())); + }; + + // Find the running onion service that matches the requested address + // If we find it, remove it from [`services`] and insert it into [`listeners`] + let position = self + .services + .iter() + .position(|(service, _)| { + service.onion_name().map_or(false, |name| { + name.to_multiaddr(address.port()) == onion_address + }) + }) + .ok_or_else(|| TransportError::MultiaddrNotSupported(onion_address.clone()))?; + + let (service, request_stream) = self.services.remove(position); + + let status_stream = Box::pin(service.status_events()); + + self.listeners.insert( + id, + TorListener { + service, + request_stream, + onion_address: onion_address.clone(), + port: address.port(), + status_stream, + announced: false, + }, + ); + + Ok(()) + } + + // We do not support removing listeners if the `listen-onion-service` feature is not enabled + #[cfg(not(feature = "listen-onion-service"))] + fn remove_listener(&mut self, _id: ListenerId) -> bool { + false + } + + #[cfg(feature = "listen-onion-service")] + fn remove_listener(&mut self, id: ListenerId) -> bool { + // Take the listener out of the map. This will stop listening on onion service for libp2p connections (we will not poll it anymore) + // However, we will not stop the onion service itself because we might want to reuse it later + // The onion service will be stopped when the transport is dropped + if let Some(listener) = self.listeners.remove(&id) { + self.services + .push((listener.service, listener.request_stream)); + return true; + } + + false + } + + fn dial(&mut self, addr: Multiaddr) -> Result> { + let maybe_tor_addr = match self.conversion_mode { + AddressConversion::DnsOnly => safe_extract(&addr), + AddressConversion::IpAndDns => dangerous_extract(&addr), + }; + + let tor_address = + maybe_tor_addr.ok_or(TransportError::MultiaddrNotSupported(addr.clone()))?; + let onion_client = self.client.clone(); + + Ok(Box::pin(async move { + let stream = onion_client.connect(tor_address).await?; + + tracing::debug!(%addr, "Established connection to peer through Tor"); + + Ok(TokioTorStream::from(stream)) + })) + } + + fn dial_as_listener( + &mut self, + addr: Multiaddr, + ) -> Result> { + self.dial(addr) + } + + fn address_translation(&self, _listen: &Multiaddr, _observed: &Multiaddr) -> Option { + None + } + + #[cfg(not(feature = "listen-onion-service"))] + fn poll( + self: Pin<&mut Self>, + _cx: &mut Context<'_>, + ) -> Poll> { + // If the `listen-onion-service` feature is not enabled, we do not support listening + Poll::Pending + } + + #[cfg(feature = "listen-onion-service")] + fn poll( + mut self: Pin<&mut Self>, + cx: &mut Context<'_>, + ) -> Poll> { + for (listener_id, listener) in &mut self.listeners { + // Check if the service has any new statuses + if let Poll::Ready(Some(status)) = listener.status_stream.as_mut().poll_next(cx) { + tracing::debug!( + status = ?status.state(), + address = listener.onion_address.to_string(), + "Onion service status changed" + ); + } + + // Check if we have already announced this address, if not, do it now + if !listener.announced { + listener.announced = true; + + // We announce the address here to the swarm even though we technically cannot guarantee + // that the address is reachable yet from the outside. We might not have registered the + // onion service fully yet (introduction points, hsdir, ...) + // + // However, we need to announce it now because otherwise libp2p might not poll the listener + // again and we will not be able to announce it later. + // TODO: Find out why this is the case, if this is intended behaviour or a bug + return Poll::Ready(TransportEvent::NewAddress { + listener_id: *listener_id, + listen_addr: listener.onion_address.clone(), + }); + } + + match listener.request_stream.as_mut().poll_next(cx) { + Poll::Ready(Some(request)) => { + let port = listener.port; + let upgrade: PendingUpgrade = Box::pin(async move { + // Check if the port matches what we expect + if let IncomingStreamRequest::Begin(begin) = request.request() { + if begin.port() != port { + // Reject the connection with CONNECTREFUSED + request + .reject(End::new_with_reason(EndReason::CONNECTREFUSED)) + .await?; + + return Err(TorTransportError::StreamPortMismatch); + } + } + + // Accept the stream and forward it to the swarm + let data_stream = request.accept(Connected::new_empty()).await?; + Ok(TokioTorStream::from(data_stream)) + }); + + return Poll::Ready(TransportEvent::Incoming { + listener_id: *listener_id, + upgrade, + local_addr: listener.onion_address.clone(), + send_back_addr: listener.onion_address.clone(), + }); + } + + // The stream has ended + // This means that the onion service was shut down, and we will not receive any more connections on it + Poll::Ready(None) => { + return Poll::Ready(TransportEvent::ListenerClosed { + listener_id: *listener_id, + reason: Ok(()), + }); + } + Poll::Pending => {} + } + } + + Poll::Pending + } +} diff --git a/libp2p-community-tor/src/provider.rs b/libp2p-community-tor/src/provider.rs new file mode 100644 index 00000000..9904aecd --- /dev/null +++ b/libp2p-community-tor/src/provider.rs @@ -0,0 +1,86 @@ +// Copyright 2022 Hannes Furmans +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. + +use arti_client::DataStream; +use futures::{AsyncRead, AsyncWrite}; +use tokio::io::{AsyncRead as TokioAsyncRead, AsyncWrite as TokioAsyncWrite, ReadBuf}; + +#[derive(Debug)] +pub struct TokioTorStream { + inner: DataStream, +} + +impl From for TokioTorStream { + fn from(inner: DataStream) -> Self { + Self { inner } + } +} + +impl AsyncRead for TokioTorStream { + fn poll_read( + mut self: std::pin::Pin<&mut Self>, + cx: &mut std::task::Context<'_>, + buf: &mut [u8], + ) -> std::task::Poll> { + let mut read_buf = ReadBuf::new(buf); + futures::ready!(TokioAsyncRead::poll_read( + std::pin::Pin::new(&mut self.inner), + cx, + &mut read_buf + ))?; + std::task::Poll::Ready(Ok(read_buf.filled().len())) + } +} + +impl AsyncWrite for TokioTorStream { + #[inline] + fn poll_write( + mut self: std::pin::Pin<&mut Self>, + cx: &mut std::task::Context<'_>, + buf: &[u8], + ) -> std::task::Poll> { + TokioAsyncWrite::poll_write(std::pin::Pin::new(&mut self.inner), cx, buf) + } + + #[inline] + fn poll_flush( + mut self: std::pin::Pin<&mut Self>, + cx: &mut std::task::Context<'_>, + ) -> std::task::Poll> { + TokioAsyncWrite::poll_flush(std::pin::Pin::new(&mut self.inner), cx) + } + + #[inline] + fn poll_close( + mut self: std::pin::Pin<&mut Self>, + cx: &mut std::task::Context<'_>, + ) -> std::task::Poll> { + TokioAsyncWrite::poll_shutdown(std::pin::Pin::new(&mut self.inner), cx) + } + + #[inline] + fn poll_write_vectored( + mut self: std::pin::Pin<&mut Self>, + cx: &mut std::task::Context<'_>, + bufs: &[std::io::IoSlice<'_>], + ) -> std::task::Poll> { + TokioAsyncWrite::poll_write_vectored(std::pin::Pin::new(&mut self.inner), cx, bufs) + } +} diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 58368ac7..a5d9065b 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,5 +1,5 @@ [toolchain] # also update this in the readme, changelog, and github actions -channel = "1.85" +channel = "1.87" components = ["clippy"] targets = ["armv7-unknown-linux-gnueabihf"] diff --git a/swap/Cargo.toml b/swap/Cargo.toml index f94791b5..7f6f028d 100644 --- a/swap/Cargo.toml +++ b/swap/Cargo.toml @@ -13,7 +13,7 @@ tauri = ["dep:tauri", "dep:dfx-swiss-sdk"] [dependencies] anyhow = { workspace = true } -arti-client = { version = "0.25.0", features = ["static-sqlite", "tokio", "rustls", "onion-service-service"], default-features = false } +arti-client = { workspace = true, features = ["static-sqlite", "tokio", "rustls", "onion-service-service"] } async-compression = { version = "0.3", features = ["bzip2", "tokio"] } async-trait = "0.1" asynchronous-codec = "0.7.0" @@ -42,7 +42,7 @@ fns = "0.0.7" futures = { workspace = true } hex = { workspace = true } libp2p = { workspace = true, features = ["tcp", "yamux", "dns", "noise", "request-response", "ping", "rendezvous", "identify", "macros", "cbor", "json", "tokio", "serde", "rsa"] } -libp2p-community-tor = { git = "https://github.com/umgefahren/libp2p-tor", rev = "e6b913e0f1ac1fc90b3ee4dd31b5511140c4a9af", features = ["listen-onion-service"] } +libp2p-community-tor = { path = "../libp2p-community-tor", features = ["listen-onion-service"] } moka = { version = "0.12", features = ["sync", "future"] } monero = { workspace = true } monero-rpc = { path = "../monero-rpc" } @@ -80,7 +80,7 @@ time = "0.3" tokio = { workspace = true, features = ["process", "fs", "net", "parking_lot", "rt"] } tokio-tungstenite = { version = "0.15", features = ["rustls-tls"] } tokio-util = { version = "0.7", features = ["io", "codec", "rt"] } -tor-rtcompat = { version = "0.25.0", features = ["tokio"] } +tor-rtcompat = { workspace = true, features = ["tokio"] } tower = { version = "0.4.13", features = ["full"] } tower-http = { version = "0.3.4", features = ["full"] } tracing = { workspace = true }