From bb1fda1793542f5dd90c7d7dc12fb90589e48422 Mon Sep 17 00:00:00 2001 From: Binarybaron Date: Tue, 19 Nov 2024 23:21:09 +0100 Subject: [PATCH] wip --- Cargo.lock | 2753 ++++++++++++++++++++++++++++--- swap/Cargo.toml | 7 +- swap/src/cli.rs | 1 + swap/src/cli/api.rs | 9 + swap/src/cli/api/request.rs | 9 +- swap/src/cli/list_sellers.rs | 2 +- swap/src/cli/tor.rs | 13 +- swap/src/cli/transport.rs | 15 +- swap/src/common/tracing_util.rs | 2 + swap/src/database/sqlite.rs | 76 +- swap/src/network/swarm.rs | 12 +- 11 files changed, 2607 insertions(+), 292 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0c125b673..0410ae7ad 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -36,6 +36,7 @@ dependencies = [ "cfg-if", "cipher", "cpufeatures", + "zeroize", ] [[package]] @@ -105,6 +106,50 @@ version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "45862d1c77f2228b9e10bc609d5bc203d86ebc9b87ad8d5d5167a6c9abf739d9" +[[package]] +name = "amplify" +version = "4.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "448cf0c3afc71439b5f837aac5399a1ef2b223f5f38324dbfb4343deec3b80cc" +dependencies = [ + "amplify_derive", + "amplify_num", + "ascii", + "wasm-bindgen", +] + +[[package]] +name = "amplify_derive" +version = "4.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a6309e6b8d89b36b9f959b7a8fa093583b94922a0f6438a24fb08936de4d428" +dependencies = [ + "amplify_syn", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "amplify_num" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99bcb75a2982047f733547042fc3968c0f460dfcf7d90b90dea3b2744580e9ad" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "amplify_syn" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7736fb8d473c0d83098b5bac44df6a561e20470375cd8bcae30516dc889fd62a" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "android-tzdata" version = "0.1.1" @@ -223,14 +268,80 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" +[[package]] +name = "arti-client" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57064cebe248bf9c0e1df2cce40926cfd9c8cad9c3103c53c594c6c5f7794d8b" +dependencies = [ + "async-trait", + "cfg-if", + "derive-deftly", + "derive_builder_fork_arti", + "derive_more 1.0.0", + "educe", + "fs-mistrust", + "futures", + "hostname-validator", + "humantime", + "humantime-serde", + "libc", + "postage", + "rand 0.8.5", + "safelog", + "serde", + "thiserror 1.0.69", + "tor-async-utils", + "tor-basic-utils", + "tor-chanmgr", + "tor-circmgr", + "tor-config", + "tor-dirmgr", + "tor-error", + "tor-guardmgr", + "tor-keymgr", + "tor-linkspec", + "tor-llcrypto", + "tor-memquota", + "tor-netdir", + "tor-netdoc", + "tor-persist", + "tor-proto", + "tor-rtcompat", + "tracing", + "void", +] + +[[package]] +name = "ascii" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d92bec98840b8f03a5ff5413de5293bfcd8bf96467cf5452609f939ec6f5de16" + +[[package]] +name = "asn1-rs" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f6fd5ddaf0351dff5b8da21b2fb4ff8e08ddd02857f0bf69c47639106c0fff0" +dependencies = [ + "asn1-rs-derive 0.4.0", + "asn1-rs-impl 0.1.0", + "displaydoc", + "nom", + "num-traits", + "rusticata-macros", + "thiserror 1.0.69", + "time 0.3.36", +] + [[package]] name = "asn1-rs" version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5493c3bedbacf7fd7382c6346bbd66687d12bbaad3a89a2d2c303ee6cf20b048" dependencies = [ - "asn1-rs-derive", - "asn1-rs-impl", + "asn1-rs-derive 0.5.1", + "asn1-rs-impl 0.2.0", "displaydoc", "nom", "num-traits", @@ -239,6 +350,18 @@ dependencies = [ "time 0.3.36", ] +[[package]] +name = "asn1-rs-derive" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "726535892e8eae7e70657b4c8ea93d26b8553afb1ce617caee529ef96d7dee6c" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", + "synstructure 0.12.6", +] + [[package]] name = "asn1-rs-derive" version = "0.5.1" @@ -248,7 +371,18 @@ dependencies = [ "proc-macro2", "quote", "syn 2.0.87", - "synstructure", + "synstructure 0.13.1", +] + +[[package]] +name = "asn1-rs-impl" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2777730b2039ac0f95f093556e61b6d26cebed5393ca6f152717777cec3a42ed" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", ] [[package]] @@ -317,6 +451,22 @@ dependencies = [ "tokio", ] +[[package]] +name = "async-compression" +version = "0.4.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cb8f1d480b0ea3783ab015936d2a55c87e219676f0c0b7dec61494043f21857" +dependencies = [ + "flate2", + "futures-core", + "futures-io", + "memchr", + "pin-project-lite", + "xz2", + "zstd", + "zstd-safe", +] + [[package]] name = "async-executor" version = "1.13.1" @@ -380,6 +530,18 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "async-native-tls" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9343dc5acf07e79ff82d0c37899f079db3534d99f189a1837c8e549c99405bec" +dependencies = [ + "futures-util", + "native-tls", + "thiserror 1.0.69", + "url", +] + [[package]] name = "async-process" version = "2.3.0" @@ -467,6 +629,21 @@ dependencies = [ "syn 2.0.87", ] +[[package]] +name = "async_executors" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a982d2f86de6137cc05c9db9a915a19886c97911f9790d04f174cede74be01a5" +dependencies = [ + "blanket", + "futures-core", + "futures-task", + "futures-util", + "pin-project", + "rustc_version", + "tokio", +] + [[package]] name = "asynchronous-codec" version = "0.6.2" @@ -518,13 +695,28 @@ dependencies = [ [[package]] name = "atoi" -version = "1.0.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7c57d12312ff59c811c0643f4d80830505833c9ffaebd193d819392b265be8e" +checksum = "f28d99ec8bfea296261ca1af174f24225171fea9664ba9003cbebee704810528" dependencies = [ "num-traits", ] +[[package]] +name = "atomic" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c59bdb34bc650a32731b31bd8f0829cc15d24a708ee31559e0bb34f2bc320cba" + +[[package]] +name = "atomic" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d818003e740b63afc82337e3160717f4f63078720a810b7b903e70a5d1d2994" +dependencies = [ + "bytemuck", +] + [[package]] name = "atomic-waker" version = "1.1.2" @@ -639,6 +831,12 @@ version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270" +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + [[package]] name = "base32" version = "0.4.0" @@ -879,6 +1077,17 @@ dependencies = [ "digest 0.10.7", ] +[[package]] +name = "blanket" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0b121a9fe0df916e362fb3271088d071159cdf11db0e4182d02152850756eff" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "block" version = "0.1.6" @@ -969,13 +1178,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf4918709cc4dd777ad2b6303ed03cb37f3ca0ccede8c1b0d28ac6db8f4710e0" dependencies = [ "once_cell", - "proc-macro-crate 2.0.2", + "proc-macro-crate 2.0.0", "proc-macro2", "quote", "syn 2.0.87", "syn_derive", ] +[[package]] +name = "bounded-vec-deque" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2225b558afc76c596898f5f1b3fc35cfce0eb1b13635cbd7d1b2a7177dc10ccd" + [[package]] name = "brotli" version = "3.5.0" @@ -1034,6 +1249,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a68f1f47cdf0ec8ee4b941b2eee2a80cb796db73118c0dd09ac63fbe405be22" dependencies = [ "memchr", + "regex-automata 0.4.9", "serde", ] @@ -1043,6 +1259,12 @@ version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" +[[package]] +name = "by_address" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64fa3c856b712db6612c019f14756e64e4bcea13337a6b33b696333a9eaa2d06" + [[package]] name = "bytecheck" version = "0.6.12" @@ -1147,6 +1369,12 @@ dependencies = [ "serde", ] +[[package]] +name = "caret" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1df55dc0c84d5a555c4b8b84ecf3cff724df77a7b1a8c4a70cd66a981524cff0" + [[package]] name = "cargo-platform" version = "0.1.8" @@ -1177,7 +1405,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a969e13a7589e9e3e4207e153bae624ade2b5622fb4684a4923b23ec3d57719" dependencies = [ "serde", - "toml 0.8.2", + "toml 0.8.19", ] [[package]] @@ -1346,6 +1574,17 @@ dependencies = [ "error-code", ] +[[package]] +name = "coarsetime" +version = "0.1.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13b3839cf01bb7960114be3ccf2340f541b6d0c81f8690b007b2b39f750f7e5d" +dependencies = [ + "libc", + "wasix", + "wasm-bindgen", +] + [[package]] name = "cocoa" version = "0.26.0" @@ -1357,7 +1596,7 @@ dependencies = [ "cocoa-foundation", "core-foundation 0.10.0", "core-graphics 0.24.0", - "foreign-types", + "foreign-types 0.5.0", "libc", "objc", ] @@ -1432,7 +1671,7 @@ dependencies = [ "nom", "pathdiff", "serde", - "toml 0.8.2", + "toml 0.8.19", ] [[package]] @@ -1475,6 +1714,15 @@ 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 = "cookie" version = "0.18.1" @@ -1485,6 +1733,15 @@ dependencies = [ "version_check", ] +[[package]] +name = "cookie-factory" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9885fa71e26b8ab7855e2ec7cae6e9b380edff76cd052e07c683a0319d51b3a2" +dependencies = [ + "futures", +] + [[package]] name = "core-foundation" version = "0.9.4" @@ -1520,7 +1777,7 @@ dependencies = [ "bitflags 1.3.2", "core-foundation 0.9.4", "core-graphics-types 0.1.3", - "foreign-types", + "foreign-types 0.5.0", "libc", ] @@ -1533,7 +1790,7 @@ dependencies = [ "bitflags 2.6.0", "core-foundation 0.10.0", "core-graphics-types 0.2.0", - "foreign-types", + "foreign-types 0.5.0", "libc", ] @@ -1672,6 +1929,18 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" +[[package]] +name = "crypto-bigint" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +dependencies = [ + "generic-array", + "rand_core 0.6.4", + "subtle", + "zeroize", +] + [[package]] name = "crypto-common" version = "0.1.6" @@ -1803,6 +2072,16 @@ dependencies = [ "darling_macro 0.13.4", ] +[[package]] +name = "darling" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" +dependencies = [ + "darling_core 0.14.4", + "darling_macro 0.14.4", +] + [[package]] name = "darling" version = "0.20.10" @@ -1827,6 +2106,20 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "darling_core" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim 0.10.0", + "syn 1.0.109", +] + [[package]] name = "darling_core" version = "0.20.10" @@ -1852,6 +2145,17 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "darling_macro" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" +dependencies = [ + "darling_core 0.14.4", + "quote", + "syn 1.0.109", +] + [[package]] name = "darling_macro" version = "0.20.10" @@ -1896,16 +2200,32 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" dependencies = [ "const-oid", + "pem-rfc7468", "zeroize", ] +[[package]] +name = "der-parser" +version = "8.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbd676fbbab537128ef0278adb5576cf363cff6aa22a7b24effe97347cfab61e" +dependencies = [ + "asn1-rs 0.5.2", + "displaydoc", + "nom", + "num-bigint", + "num-traits", + "rusticata-macros", +] + [[package]] name = "der-parser" version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5cd0a5c643689626bec213c4d8bd4d96acc8ffdb4ad4bb6bc16abf27d5f4b553" dependencies = [ - "asn1-rs", + "asn1-rs 0.6.2", + "cookie-factory", "displaydoc", "nom", "num-bigint", @@ -1934,6 +2254,34 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "derive-deftly" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72f9bc3564f74be6c35d49a7efee54380d7946ccc631323067f33fabb9246027" +dependencies = [ + "derive-deftly-macros", + "heck 0.5.0", +] + +[[package]] +name = "derive-deftly-macros" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1b84d32b18d9a256d81e4fec2e4cfd0ab6dde5e5ff49be1713ae0adbd0060c2" +dependencies = [ + "heck 0.5.0", + "indexmap 2.6.0", + "itertools 0.13.0", + "proc-macro-crate 2.0.0", + "proc-macro2", + "quote", + "sha3 0.10.8", + "strum", + "syn 2.0.87", + "void", +] + [[package]] name = "derive_arbitrary" version = "1.4.1" @@ -1946,26 +2294,79 @@ dependencies = [ ] [[package]] -name = "derive_more" -version = "0.99.18" +name = "derive_builder_core_fork_arti" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" +checksum = "24c1b715c79be6328caa9a5e1a387a196ea503740f0722ec3dd8f67a9e72314d" dependencies = [ - "convert_case", + "darling 0.14.4", "proc-macro2", "quote", - "rustc_version", - "syn 2.0.87", + "syn 1.0.109", ] [[package]] -name = "devtools-core" -version = "0.3.5" +name = "derive_builder_fork_arti" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e78cdd51f6f62ad4eb9b6581d7e238e1779db3144ddbd711388f552e6ed3194b" +checksum = "c3eae24d595f4d0ecc90a9a5a6d11c2bd8dafe2375ec4a1ec63250e5ade7d228" dependencies = [ - "async-stream", - "bytes", + "derive_builder_macro_fork_arti", +] + +[[package]] +name = "derive_builder_macro_fork_arti" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69887769a2489cd946bf782eb2b1bb2cb7bc88551440c94a765d4f040c08ebf3" +dependencies = [ + "derive_builder_core_fork_arti", + "syn 1.0.109", +] + +[[package]] +name = "derive_more" +version = "0.99.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" +dependencies = [ + "convert_case 0.4.0", + "proc-macro2", + "quote", + "rustc_version", + "syn 2.0.87", +] + +[[package]] +name = "derive_more" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a9b99b9cbbe49445b21764dc0625032a89b145a2642e67603e1c936f5458d05" +dependencies = [ + "derive_more-impl", +] + +[[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.87", + "unicode-xid", +] + +[[package]] +name = "devtools-core" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e78cdd51f6f62ad4eb9b6581d7e238e1779db3144ddbd711388f552e6ed3194b" +dependencies = [ + "async-stream", + "bytes", "devtools-wire-format", "futures", "http 0.2.12", @@ -2029,10 +2430,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer 0.10.4", + "const-oid", "crypto-common", "subtle", ] +[[package]] +name = "directories" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a49173b84e034382284f27f1af4dcbbd231ffa358c0fe316541a7337f376a35" +dependencies = [ + "dirs-sys", +] + [[package]] name = "directories-next" version = "2.0.0" @@ -2121,6 +2532,12 @@ version = "0.15.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" +[[package]] +name = "downcast-rs" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" + [[package]] name = "dpi" version = "0.1.1" @@ -2157,6 +2574,20 @@ version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" +[[package]] +name = "ecdsa" +version = "0.16.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" +dependencies = [ + "der", + "digest 0.10.7", + "elliptic-curve", + "rfc6979", + "signature 2.2.0", + "spki", +] + [[package]] name = "ecdsa_fun" version = "0.10.0" @@ -2210,6 +2641,7 @@ checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" dependencies = [ "curve25519-dalek 4.1.3", "ed25519 2.2.3", + "merlin", "rand_core 0.6.4", "serde", "sha2 0.10.8", @@ -2217,6 +2649,18 @@ dependencies = [ "zeroize", ] +[[package]] +name = "educe" +version = "0.4.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f0042ff8246a363dbe77d2ceedb073339e85a804b9a47636c6e016a9a32c05f" +dependencies = [ + "enum-ordinalize", + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "either" version = "1.13.0" @@ -2244,6 +2688,25 @@ dependencies = [ "winapi", ] +[[package]] +name = "elliptic-curve" +version = "0.13.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" +dependencies = [ + "base16ct", + "crypto-bigint", + "digest 0.10.7", + "ff", + "generic-array", + "group", + "pkcs8", + "rand_core 0.6.4", + "sec1", + "subtle", + "zeroize", +] + [[package]] name = "embed-resource" version = "2.5.1" @@ -2253,7 +2716,7 @@ dependencies = [ "cc", "memchr", "rustc_version", - "toml 0.8.2", + "toml 0.8.19", "vswhom", "winreg 0.52.0", ] @@ -2297,6 +2760,19 @@ dependencies = [ "syn 2.0.87", ] +[[package]] +name = "enum-ordinalize" +version = "3.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bf1fa3f06bbff1ea5b1a9c7b14aa992a39657db60a2759457328d7e058f49ee" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "enumflags2" version = "0.7.10" @@ -2350,6 +2826,17 @@ version = "3.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a5d9305ccc6942a704f4335694ecd3de2ea531b114ac2d51f5f843750787a92f" +[[package]] +name = "etcetera" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "136d1b5283a1ab77bd9257427ffd09d8667ced0570b6f938942bc7568ed5b943" +dependencies = [ + "cfg-if", + "home", + "windows-sys 0.48.0", +] + [[package]] name = "event-listener" version = "2.5.3" @@ -2377,6 +2864,18 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "fallible-iterator" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649" + +[[package]] +name = "fallible-streaming-iterator" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a" + [[package]] name = "fastrand" version = "2.2.0" @@ -2392,6 +2891,16 @@ dependencies = [ "simd-adler32", ] +[[package]] +name = "ff" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" +dependencies = [ + "rand_core 0.6.4", + "subtle", +] + [[package]] name = "fiat-crypto" version = "0.2.9" @@ -2408,6 +2917,19 @@ dependencies = [ "rustc_version", ] +[[package]] +name = "figment" +version = "0.10.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cb01cd46b0cf372153850f4c6c272d9cbea2da513e07538405148f95bd789f3" +dependencies = [ + "atomic 0.6.0", + "serde", + "toml 0.8.19", + "uncased", + "version_check", +] + [[package]] name = "filetime" version = "0.2.25" @@ -2442,15 +2964,20 @@ dependencies = [ "miniz_oxide", ] +[[package]] +name = "fluid-let" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "749cff877dc1af878a0b31a41dd221a753634401ea0ef2f87b62d3171522485a" + [[package]] name = "flume" -version = "0.10.14" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1657b4441c3403d9f7b3409e47575237dac27b1b5726df654a6ecbf92f0f7577" +checksum = "da0e4dd2a88388a1f4ccc7c9ce104604dab68d9f408dc34cd45823d5a9069095" dependencies = [ "futures-core", "futures-sink", - "pin-project", "spin 0.9.8", ] @@ -2466,6 +2993,15 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f81ec6369c545a7d40e4589b5597581fa1c441fe1cce96dd1de43159910a36a2" +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared 0.1.1", +] + [[package]] name = "foreign-types" version = "0.5.0" @@ -2473,7 +3009,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" dependencies = [ "foreign-types-macros", - "foreign-types-shared", + "foreign-types-shared 0.3.1", ] [[package]] @@ -2487,6 +3023,12 @@ dependencies = [ "syn 2.0.87", ] +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + [[package]] name = "foreign-types-shared" version = "0.3.1" @@ -2502,6 +3044,22 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "fs-mistrust" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a12a327e6e1ee5595f66105852c644a2d65dfbc62c30c90f53a2783d270002de" +dependencies = [ + "derive_builder_fork_arti", + "dirs", + "libc", + "once_cell", + "pwd-grp", + "serde", + "thiserror 1.0.69", + "walkdir", +] + [[package]] name = "fs2" version = "0.4.3" @@ -2512,6 +3070,16 @@ dependencies = [ "winapi", ] +[[package]] +name = "fslock" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04412b8935272e3a9bae6f48c7bfff74c2911f60525404edfdd28e49884c3bfb" +dependencies = [ + "libc", + "winapi", +] + [[package]] name = "funty" version = "2.0.0" @@ -2583,13 +3151,13 @@ dependencies = [ [[package]] name = "futures-intrusive" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a604f7a68fbf8103337523b1fadc8ade7361ee3f112f7c680ad179651616aed5" +checksum = "1d930c203dd0b6ff06e0201a4a2fe9149b43c684fd4420555b26d21b1a02956f" dependencies = [ "futures-core", "lock_api", - "parking_lot 0.11.2", + "parking_lot 0.12.3", ] [[package]] @@ -2622,6 +3190,16 @@ dependencies = [ "syn 2.0.87", ] +[[package]] +name = "futures-rustls" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35bd3cf68c183738046838e300353e4716c674dc5e56890de4826801a6622a28" +dependencies = [ + "futures-io", + "rustls 0.21.12", +] + [[package]] name = "futures-rustls" version = "0.26.0" @@ -2797,6 +3375,7 @@ dependencies = [ "serde", "typenum", "version_check", + "zeroize", ] [[package]] @@ -2930,7 +3509,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bb0228f477c0900c880fd78c8759b95c7636dbd7842707f49e132378aa2acdc" dependencies = [ "heck 0.4.1", - "proc-macro-crate 2.0.2", + "proc-macro-crate 2.0.0", "proc-macro-error", "proc-macro2", "quote", @@ -2953,6 +3532,12 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" +[[package]] +name = "glob-match" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9985c9503b412198aa4197559e9a318524ebc4519c229bfa05a535828c950b9d" + [[package]] name = "globset" version = "0.4.15" @@ -2977,6 +3562,17 @@ dependencies = [ "system-deps", ] +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff", + "rand_core 0.6.4", + "subtle", +] + [[package]] name = "gtk" version = "0.18.1" @@ -3105,9 +3701,9 @@ dependencies = [ [[package]] name = "hashlink" -version = "0.8.4" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" +checksum = "6ba4ff7128dee98c7dc9794b6a411377e1404dba1c97deb8d1a55297bd25d8af" dependencies = [ "hashbrown 0.14.5", ] @@ -3136,9 +3732,6 @@ name = "heck" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" -dependencies = [ - "unicode-segmentation", -] [[package]] name = "heck" @@ -3265,6 +3858,15 @@ dependencies = [ "digest 0.10.7", ] +[[package]] +name = "home" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +dependencies = [ + "windows-sys 0.52.0", +] + [[package]] name = "hostname" version = "0.3.1" @@ -3276,6 +3878,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "hostname-validator" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f558a64ac9af88b5ba400d99b579451af0d39c6d360980045b91aac966d705e2" + [[package]] name = "html5ever" version = "0.26.0" @@ -3364,6 +3972,22 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" +[[package]] +name = "humantime" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" + +[[package]] +name = "humantime-serde" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57a3db5ea5923d99402c94e9feb261dc5ee9b4efa158b0315f788cf549cc200c" +dependencies = [ + "humantime", + "serde", +] + [[package]] name = "hyper" version = "0.14.31" @@ -3738,6 +4362,26 @@ dependencies = [ "cfb", ] +[[package]] +name = "inotify" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdd168d97690d0b8c412d6b6c10360277f4d7ee495c5d0d5d5fe0854923255cc" +dependencies = [ + "bitflags 1.3.2", + "inotify-sys", + "libc", +] + +[[package]] +name = "inotify-sys" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e05c02b5e89bff3b946cedeca278abc628fe811e604f027c45a8aa3cf793d0eb" +dependencies = [ + "libc", +] + [[package]] name = "inout" version = "0.1.3" @@ -3756,6 +4400,12 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "inventory" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f958d3d68f4167080a18141e10381e7634563984a537f2a49a30fd8e53ac5767" + [[package]] name = "ipconfig" version = "0.3.2" @@ -4101,6 +4751,26 @@ dependencies = [ "unicode-segmentation", ] +[[package]] +name = "kqueue" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7447f1ca1b7b563588a205fe93dea8df60fd981423a768bc1c0ded35ed147d0c" +dependencies = [ + "kqueue-sys", + "libc", +] + +[[package]] +name = "kqueue-sys" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed9625ffda8729b85e45cf04090035ac368927b8cebc34898e7c120f52e4838b" +dependencies = [ + "bitflags 1.3.2", + "libc", +] + [[package]] name = "kuchikiki" version = "0.8.2" @@ -4119,6 +4789,9 @@ name = "lazy_static" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +dependencies = [ + "spin 0.9.8", +] [[package]] name = "libappindicator" @@ -4207,6 +4880,7 @@ dependencies = [ "libp2p-request-response", "libp2p-swarm", "libp2p-tcp", + "libp2p-tls 0.3.0", "libp2p-upnp", "libp2p-yamux", "multiaddr", @@ -4228,10 +4902,23 @@ dependencies = [ ] [[package]] -name = "libp2p-connection-limits" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7cd50a78ccfada14de94cbacd3ce4b0138157f376870f13d3a8422cd075b4fd" +name = "libp2p-community-tor" +version = "0.2.0" +source = "git+https://github.com/UnstoppableSwap/libp2p-tor.git?branch=upgrade/arti_client#0e22fac8c23c371fe747d0b2112a53d4a19bd93c" +dependencies = [ + "arti-client", + "futures", + "libp2p", + "tokio", + "tor-rtcompat", + "tracing", +] + +[[package]] +name = "libp2p-connection-limits" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7cd50a78ccfada14de94cbacd3ce4b0138157f376870f13d3a8422cd075b4fd" dependencies = [ "libp2p-core", "libp2p-identity", @@ -4484,7 +5171,7 @@ dependencies = [ "if-watch", "libp2p-core", "libp2p-identity", - "libp2p-tls", + "libp2p-tls 0.4.1", "parking_lot 0.12.3", "quinn", "rand 0.8.5", @@ -4596,6 +5283,25 @@ dependencies = [ "tracing", ] +[[package]] +name = "libp2p-tls" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93ce7e3c2e7569d685d08ec795157981722ff96e9e9f9eae75df3c29d02b07a5" +dependencies = [ + "futures", + "futures-rustls 0.24.0", + "libp2p-core", + "libp2p-identity", + "rcgen", + "ring 0.16.20", + "rustls 0.21.12", + "rustls-webpki 0.101.7", + "thiserror 1.0.69", + "x509-parser 0.15.1", + "yasna", +] + [[package]] name = "libp2p-tls" version = "0.4.1" @@ -4603,7 +5309,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b7b831e55ce2aa6c354e6861a85fdd4dd0a2b97d5e276fabac0e4810a71776" dependencies = [ "futures", - "futures-rustls", + "futures-rustls 0.26.0", "libp2p-core", "libp2p-identity", "rcgen", @@ -4611,7 +5317,7 @@ dependencies = [ "rustls 0.23.16", "rustls-webpki 0.101.7", "thiserror 1.0.69", - "x509-parser", + "x509-parser 0.16.0", "yasna", ] @@ -4659,9 +5365,9 @@ dependencies = [ [[package]] name = "libsqlite3-sys" -version = "0.24.2" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "898745e570c7d0453cc1fbc4a701eb6c662ed54e8fec8b7d14be137ebeeb9d14" +checksum = "2e99fb7a497b1e3339bc746195567ed8d3e24945ecd636e3619d20b9de9e9149" dependencies = [ "cc", "pkg-config", @@ -4744,6 +5450,17 @@ dependencies = [ "linked-hash-map", ] +[[package]] +name = "lzma-sys" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fda04ab3764e6cde78b9974eec4f779acaba7c4e84b36eca3cf77c581b85d27" +dependencies = [ + "cc", + "libc", + "pkg-config", +] + [[package]] name = "mac" version = "0.1.1" @@ -4800,12 +5517,31 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" +[[package]] +name = "md-5" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" +dependencies = [ + "cfg-if", + "digest 0.10.7", +] + [[package]] name = "memchr" version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" +[[package]] +name = "memmap2" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd3f7eed9d3848f8b98834af67102b720745c4ec028fcd0aa0239277e7de374f" +dependencies = [ + "libc", +] + [[package]] name = "memoffset" version = "0.9.1" @@ -4815,6 +5551,18 @@ dependencies = [ "autocfg", ] +[[package]] +name = "merlin" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58c38e2799fc0978b65dfff8023ec7843e2330bb462f19198840b34b6582397d" +dependencies = [ + "byteorder", + "keccak", + "rand_core 0.6.4", + "zeroize", +] + [[package]] name = "mime" version = "0.3.17" @@ -4871,6 +5619,7 @@ checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ "hermit-abi 0.3.9", "libc", + "log", "wasi 0.11.0+wasi-snapshot-preview1", "windows-sys 0.52.0", ] @@ -5049,6 +5798,23 @@ dependencies = [ "unsigned-varint 0.7.2", ] +[[package]] +name = "native-tls" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" +dependencies = [ + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + [[package]] name = "ndk" version = "0.9.0" @@ -5221,6 +5987,33 @@ dependencies = [ "minimal-lexical", ] +[[package]] +name = "notify" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c533b4c39709f9ba5005d8002048266593c1cfaf3c5f0739d5b8ab0c6c504009" +dependencies = [ + "bitflags 2.6.0", + "filetime", + "inotify", + "kqueue", + "libc", + "log", + "mio", + "notify-types", + "walkdir", + "windows-sys 0.52.0", +] + +[[package]] +name = "notify-types" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7393c226621f817964ffb3dc5704f9509e107a8b024b489cc2c1b217378785df" +dependencies = [ + "instant", +] + [[package]] name = "ntapi" version = "0.4.1" @@ -5250,6 +6043,23 @@ dependencies = [ "num-traits", ] +[[package]] +name = "num-bigint-dig" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc84195820f291c7697304f3cbdadd1cb7199c0efc917ff5eafd71225c136151" +dependencies = [ + "byteorder", + "lazy_static", + "libm", + "num-integer", + "num-iter", + "num-traits", + "rand 0.8.5", + "smallvec", + "zeroize", +] + [[package]] name = "num-conv" version = "0.1.0" @@ -5265,6 +6075,17 @@ dependencies = [ "num-traits", ] +[[package]] +name = "num-iter" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + [[package]] name = "num-traits" version = "0.2.19" @@ -5300,7 +6121,7 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ - "proc-macro-crate 2.0.2", + "proc-macro-crate 2.0.0", "proc-macro2", "quote", "syn 2.0.87", @@ -5551,13 +6372,22 @@ dependencies = [ "memchr", ] +[[package]] +name = "oid-registry" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bedf36ffb6ba96c2eb7144ef6270557b52e54b20c0a8e1eb2ff99a6c6959bff" +dependencies = [ + "asn1-rs 0.5.2", +] + [[package]] name = "oid-registry" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8d8034d9489cdaf79228eb9f6a3b8d7bb32ba00d6645ebd48eef4077ceb5bd9" dependencies = [ - "asn1-rs", + "asn1-rs 0.6.2", ] [[package]] @@ -5566,6 +6396,15 @@ version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" +[[package]] +name = "oneshot-fused-workaround" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f49cbc8293c5ba37516d29aba392a94a34638367d17d67617cea34e4f9acd05" +dependencies = [ + "futures", +] + [[package]] name = "opaque-debug" version = "0.3.1" @@ -5583,18 +6422,65 @@ dependencies = [ "pathdiff", ] +[[package]] +name = "openssl" +version = "0.10.68" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" +dependencies = [ + "bitflags 2.6.0", + "cfg-if", + "foreign-types 0.3.2", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "openssl-probe" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +[[package]] +name = "openssl-sys" +version = "0.9.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + [[package]] name = "option-ext" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" +[[package]] +name = "ordered-float" +version = "2.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68f19d67e5a2795c94e73e0bb1cc1a7edeb2e28efd39e2e1c9b7a40c1108b11c" +dependencies = [ + "num-traits", +] + [[package]] name = "ordered-stream" version = "0.2.0" @@ -5615,12 +6501,59 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "os_str_bytes" +version = "6.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" +dependencies = [ + "memchr", +] + [[package]] name = "overload" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" +[[package]] +name = "p256" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b" +dependencies = [ + "ecdsa", + "elliptic-curve", + "primeorder", + "sha2 0.10.8", +] + +[[package]] +name = "p384" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70786f51bcc69f6a4c0360e063a4cac5419ef7c5cd5b3c99ad70f3be5ba79209" +dependencies = [ + "ecdsa", + "elliptic-curve", + "primeorder", + "sha2 0.10.8", +] + +[[package]] +name = "p521" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fc9e2161f1f215afdfce23677034ae137bbd45016a880c2eb3ba8eb95f085b2" +dependencies = [ + "base16ct", + "ecdsa", + "elliptic-curve", + "primeorder", + "rand_core 0.6.4", + "sha2 0.10.8", +] + [[package]] name = "pango" version = "0.18.3" @@ -5722,6 +6655,15 @@ dependencies = [ "serde", ] +[[package]] +name = "pem-rfc7468" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" +dependencies = [ + "base64ct", +] + [[package]] name = "percent-encoding" version = "2.3.1" @@ -5950,6 +6892,17 @@ dependencies = [ "futures-io", ] +[[package]] +name = "pkcs1" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8ffb9f10fa047879315e6625af03c164b16962a5368d724ed16323b68ace47f" +dependencies = [ + "der", + "pkcs8", + "spki", +] + [[package]] name = "pkcs8" version = "0.10.2" @@ -6042,6 +6995,21 @@ version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2" +[[package]] +name = "postage" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af3fb618632874fb76937c2361a7f22afd393c982a2165595407edc75b06d3c1" +dependencies = [ + "atomic 0.5.3", + "crossbeam-queue", + "futures", + "parking_lot 0.12.3", + "pin-project", + "static_assertions", + "thiserror 1.0.69", +] + [[package]] name = "powerfmt" version = "0.2.0" @@ -6063,6 +7031,15 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" +[[package]] +name = "primeorder" +version = "0.13.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "353e1ca18966c16d9deb1c69278edbc5f194139612772bd9537af60ac231e1e6" +dependencies = [ + "elliptic-curve", +] + [[package]] name = "primitive-types" version = "0.9.1" @@ -6073,6 +7050,17 @@ dependencies = [ "uint", ] +[[package]] +name = "priority-queue" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "714c75db297bc88a63783ffc6ab9f830698a6705aa0201416931759ef4c8183d" +dependencies = [ + "autocfg", + "equivalent", + "indexmap 2.6.0", +] + [[package]] name = "proc-macro-crate" version = "1.3.1" @@ -6085,11 +7073,10 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "2.0.2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b00f26d3400549137f92511a46ac1cd8ce37cb5598a96d382381458b992a5d24" +checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8" dependencies = [ - "toml_datetime", "toml_edit 0.20.2", ] @@ -6227,6 +7214,18 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "pwd-grp" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b94fdf3867b7f2889a736f0022ea9386766280d2cca4bdbe41629ada9e4f3b8f" +dependencies = [ + "derive-deftly", + "libc", + "paste", + "thiserror 1.0.69", +] + [[package]] name = "qrcode" version = "0.14.1" @@ -6630,10 +7629,26 @@ dependencies = [ ] [[package]] -name = "ring" -version = "0.16.20" +name = "retry-error" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" +checksum = "77ef93545b13f6dd83a9f98c8a656ccbd7bc2b95a747844346c70f7e6f5a5932" + +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac 0.12.1", + "subtle", +] + +[[package]] +name = "ring" +version = "0.16.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" dependencies = [ "cc", "libc", @@ -6698,6 +7713,27 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "rsa" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d0e5124fcb30e76a7e79bfee683a2746db83784b86289f6251b54b7950a0dfc" +dependencies = [ + "const-oid", + "digest 0.10.7", + "num-bigint-dig", + "num-integer", + "num-traits", + "pkcs1", + "pkcs8", + "rand_core 0.6.4", + "sha2 0.10.8", + "signature 2.2.0", + "spki", + "subtle", + "zeroize", +] + [[package]] name = "rtnetlink" version = "0.10.1" @@ -6713,6 +7749,21 @@ dependencies = [ "tokio", ] +[[package]] +name = "rusqlite" +version = "0.32.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7753b721174eb8ff87a9a0e799e2d7bc3749323e773db92e0984debb00019d6e" +dependencies = [ + "bitflags 2.6.0", + "fallible-iterator", + "fallible-streaming-iterator", + "hashlink", + "libsqlite3-sys", + "smallvec", + "time 0.3.36", +] + [[package]] name = "rust_decimal" version = "1.36.0" @@ -6837,6 +7888,7 @@ version = "0.23.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eee87ff5d9b36712a58574e12e9f0ea80f915a5b0ac518d322b24a465617925e" dependencies = [ + "log", "once_cell", "ring 0.17.8", "rustls-pki-types", @@ -6952,6 +8004,19 @@ version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" +[[package]] +name = "safelog" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d00c331d3dad51d67db003b70b4e1ab8408c5b89f5830af4d282e612a75a84f3" +dependencies = [ + "derive_more 1.0.0", + "educe", + "either", + "fluid-let", + "thiserror 1.0.69", +] + [[package]] name = "same-file" version = "1.0.6" @@ -6961,6 +8026,16 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "sanitize-filename" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ed72fbaf78e6f2d41744923916966c4fbe3d7c74e3037a8ee482f1115572603" +dependencies = [ + "lazy_static", + "regex", +] + [[package]] name = "scc" version = "2.2.4" @@ -7044,6 +8119,20 @@ version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" +[[package]] +name = "sec1" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +dependencies = [ + "base16ct", + "der", + "generic-array", + "pkcs8", + "subtle", + "zeroize", +] + [[package]] name = "secp256k1" version = "0.24.3" @@ -7160,7 +8249,7 @@ checksum = "df320f1889ac4ba6bc0cdc9c9af7af4bd64bb927bccdf32d81140dc1f9be12fe" dependencies = [ "bitflags 1.3.2", "cssparser", - "derive_more", + "derive_more 0.99.18", "fxhash", "log", "matches", @@ -7225,6 +8314,16 @@ dependencies = [ "typeid", ] +[[package]] +name = "serde-value" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3a1a3341211875ef120e117ea7fd5228530ae7e7036a779fdc9117be6b3282c" +dependencies = [ + "ordered-float", + "serde", +] + [[package]] name = "serde_cbor" version = "0.11.2" @@ -7257,6 +8356,15 @@ dependencies = [ "syn 2.0.87", ] +[[package]] +name = "serde_ignored" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8e319a36d1b52126a0d608f24e93b2d81297091818cd70625fcf50a15d84ddf" +dependencies = [ + "serde", +] + [[package]] name = "serde_json" version = "1.0.132" @@ -7470,6 +8578,16 @@ dependencies = [ "opaque-debug", ] +[[package]] +name = "sha3" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" +dependencies = [ + "digest 0.10.7", + "keccak", +] + [[package]] name = "sharded-slab" version = "0.1.7" @@ -7495,6 +8613,17 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" +[[package]] +name = "shellexpand" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da03fa3b94cc19e3ebfc88c4229c49d8f08cdbd1228870a45f0ffdf84988e14b" +dependencies = [ + "bstr", + "dirs", + "os_str_bytes", +] + [[package]] name = "shlex" version = "1.3.0" @@ -7536,6 +8665,7 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ + "digest 0.10.7", "rand_core 0.6.4", ] @@ -7588,11 +8718,37 @@ dependencies = [ "parking_lot 0.11.2", ] +[[package]] +name = "slotmap" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbff4acf519f630b3a3ddcfaea6c06b42174d9a44bc70c620e9ed1649d58b82a" +dependencies = [ + "serde", + "version_check", +] + +[[package]] +name = "slotmap-careful" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0521c412b8940cf10d63e88faa7b63839ced20547e6d49d86417d90d0c1af8ad" +dependencies = [ + "paste", + "serde", + "slotmap", + "thiserror 1.0.69", + "void", +] + [[package]] name = "smallvec" version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +dependencies = [ + "serde", +] [[package]] name = "snow" @@ -7630,7 +8786,7 @@ dependencies = [ "bytemuck", "cfg_aliases 0.2.1", "core-graphics 0.24.0", - "foreign-types", + "foreign-types 0.5.0", "js-sys", "log", "objc2", @@ -7722,70 +8878,81 @@ dependencies = [ [[package]] name = "sqlx" -version = "0.6.3" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8de3b03a925878ed54a954f621e64bf55a3c1bd29652d0d1a17830405350188" +checksum = "93334716a037193fac19df402f8571269c84a00852f6a7066b5d2616dcd64d3e" dependencies = [ "sqlx-core", "sqlx-macros", + "sqlx-mysql", + "sqlx-postgres", + "sqlx-sqlite", ] [[package]] name = "sqlx-core" -version = "0.6.3" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa8241483a83a3f33aa5fff7e7d9def398ff9990b2752b6c6112b83c6d246029" +checksum = "d4d8060b456358185f7d50c55d9b5066ad956956fddec42ee2e8567134a8936e" dependencies = [ - "ahash 0.7.8", "atoi", - "bitflags 1.3.2", "byteorder", "bytes", "crc", "crossbeam-queue", - "dotenvy", "either", - "event-listener 2.5.3", - "flume", + "event-listener 5.3.1", "futures-channel", "futures-core", - "futures-executor", "futures-intrusive", + "futures-io", "futures-util", + "hashbrown 0.14.5", "hashlink", "hex", - "indexmap 1.9.3", - "itoa 1.0.11", - "libc", - "libsqlite3-sys", + "indexmap 2.6.0", "log", "memchr", "once_cell", "paste", "percent-encoding", - "rustls 0.20.9", - "rustls-pemfile 1.0.4", + "rustls 0.23.16", + "rustls-pemfile 2.2.0", "serde", + "serde_json", "sha2 0.10.8", "smallvec", "sqlformat", - "sqlx-rt", - "stringprep", "thiserror 1.0.69", + "tokio", "tokio-stream", + "tracing", "url", - "webpki-roots 0.22.6", + "webpki-roots 0.26.6", ] [[package]] name = "sqlx-macros" -version = "0.6.3" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cac0692bcc9de3b073e8d747391827297e075c7710ff6276d9f7a1f3d58c6657" +dependencies = [ + "proc-macro2", + "quote", + "sqlx-core", + "sqlx-macros-core", + "syn 2.0.87", +] + +[[package]] +name = "sqlx-macros-core" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9966e64ae989e7e575b19d7265cb79d7fc3cbbdf179835cb0d716f294c2049c9" +checksum = "1804e8a7c7865599c9c79be146dc8a9fd8cc86935fa641d3ea58e5f0688abaa5" dependencies = [ "dotenvy", "either", - "heck 0.4.1", + "heck 0.5.0", "hex", "once_cell", "proc-macro2", @@ -7794,65 +8961,202 @@ dependencies = [ "serde_json", "sha2 0.10.8", "sqlx-core", - "sqlx-rt", - "syn 1.0.109", + "sqlx-mysql", + "sqlx-postgres", + "sqlx-sqlite", + "syn 2.0.87", + "tempfile", + "tokio", "url", ] [[package]] -name = "sqlx-rt" -version = "0.6.3" +name = "sqlx-mysql" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "804d3f245f894e61b1e6263c84b23ca675d96753b5abfd5cc8597d86806e8024" +checksum = "64bb4714269afa44aef2755150a0fc19d756fb580a67db8885608cf02f47d06a" dependencies = [ + "atoi", + "base64 0.22.1", + "bitflags 2.6.0", + "byteorder", + "bytes", + "crc", + "digest 0.10.7", + "dotenvy", + "either", + "futures-channel", + "futures-core", + "futures-io", + "futures-util", + "generic-array", + "hex", + "hkdf", + "hmac 0.12.1", + "itoa 1.0.11", + "log", + "md-5", + "memchr", "once_cell", - "tokio", - "tokio-rustls 0.23.4", + "percent-encoding", + "rand 0.8.5", + "rsa", + "serde", + "sha1", + "sha2 0.10.8", + "smallvec", + "sqlx-core", + "stringprep", + "thiserror 1.0.69", + "tracing", + "whoami", ] [[package]] -name = "stable_deref_trait" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" - -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - -[[package]] -name = "string_cache" -version = "0.8.7" +name = "sqlx-postgres" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" +checksum = "6fa91a732d854c5d7726349bb4bb879bb9478993ceb764247660aee25f67c2f8" dependencies = [ - "new_debug_unreachable", + "atoi", + "base64 0.22.1", + "bitflags 2.6.0", + "byteorder", + "crc", + "dotenvy", + "etcetera", + "futures-channel", + "futures-core", + "futures-io", + "futures-util", + "hex", + "hkdf", + "hmac 0.12.1", + "home", + "itoa 1.0.11", + "log", + "md-5", + "memchr", "once_cell", - "parking_lot 0.12.3", - "phf_shared 0.10.0", - "precomputed-hash", + "rand 0.8.5", "serde", + "serde_json", + "sha2 0.10.8", + "smallvec", + "sqlx-core", + "stringprep", + "thiserror 1.0.69", + "tracing", + "whoami", ] [[package]] -name = "string_cache_codegen" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bb30289b722be4ff74a408c3cc27edeaad656e06cb1fe8fa9231fa59c728988" -dependencies = [ - "phf_generator 0.10.0", - "phf_shared 0.10.0", - "proc-macro2", - "quote", -] - -[[package]] -name = "stringprep" -version = "0.1.5" +name = "sqlx-sqlite" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b4df3d392d81bd458a8a621b8bffbd2302a12ffe288a9d931670948749463b1" +checksum = "d5b2cf34a45953bfd3daaf3db0f7a7878ab9b7a6b91b422d24a7a9e4c857b680" +dependencies = [ + "atoi", + "flume", + "futures-channel", + "futures-core", + "futures-executor", + "futures-intrusive", + "futures-util", + "libsqlite3-sys", + "log", + "percent-encoding", + "serde", + "serde_urlencoded", + "sqlx-core", + "tracing", + "url", +] + +[[package]] +name = "ssh-cipher" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "caac132742f0d33c3af65bfcde7f6aa8f62f0e991d80db99149eb9d44708784f" +dependencies = [ + "cipher", + "ssh-encoding", +] + +[[package]] +name = "ssh-encoding" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb9242b9ef4108a78e8cd1a2c98e193ef372437f8c22be363075233321dd4a15" +dependencies = [ + "base64ct", + "pem-rfc7468", + "sha2 0.10.8", +] + +[[package]] +name = "ssh-key" +version = "0.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b86f5297f0f04d08cabaa0f6bff7cb6aec4d9c3b49d87990d63da9d9156a8c3" +dependencies = [ + "p256", + "p384", + "p521", + "rand_core 0.6.4", + "rsa", + "sec1", + "sha2 0.10.8", + "signature 2.2.0", + "ssh-cipher", + "ssh-encoding", + "subtle", + "zeroize", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "string_cache" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" +dependencies = [ + "new_debug_unreachable", + "once_cell", + "parking_lot 0.12.3", + "phf_shared 0.10.0", + "precomputed-hash", + "serde", +] + +[[package]] +name = "string_cache_codegen" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bb30289b722be4ff74a408c3cc27edeaad656e06cb1fe8fa9231fa59c728988" +dependencies = [ + "phf_generator 0.10.0", + "phf_shared 0.10.0", + "proc-macro2", + "quote", +] + +[[package]] +name = "stringprep" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b4df3d392d81bd458a8a621b8bffbd2302a12ffe288a9d931670948749463b1" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -7940,7 +9244,8 @@ name = "swap" version = "1.0.0-rc.4" dependencies = [ "anyhow", - "async-compression", + "arti-client", + "async-compression 0.3.15", "async-trait", "asynchronous-codec 0.7.0", "atty", @@ -7971,6 +9276,7 @@ dependencies = [ "jsonrpsee", "jsonrpsee-core", "libp2p", + "libp2p-community-tor", "mockito", "monero", "monero-harness", @@ -8007,7 +9313,8 @@ dependencies = [ "tokio-tar", "tokio-tungstenite", "tokio-util", - "toml 0.8.2", + "toml 0.8.19", + "tor-rtcompat", "torut", "tower", "tower-http 0.3.5", @@ -8084,6 +9391,18 @@ dependencies = [ "futures-core", ] +[[package]] +name = "synstructure" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", + "unicode-xid", +] + [[package]] name = "synstructure" version = "0.13.1" @@ -8139,7 +9458,7 @@ dependencies = [ "cfg-expr", "heck 0.5.0", "pkg-config", - "toml 0.8.2", + "toml 0.8.19", "version-compare", ] @@ -8285,7 +9604,7 @@ dependencies = [ "serde_json", "tauri-utils", "tauri-winres", - "toml 0.8.2", + "toml 0.8.19", "walkdir", ] @@ -8343,7 +9662,7 @@ dependencies = [ "serde", "serde_json", "tauri-utils", - "toml 0.8.2", + "toml 0.8.19", "walkdir", ] @@ -8573,7 +9892,7 @@ dependencies = [ "serde_with 3.11.0", "swift-rs", "thiserror 2.0.3", - "toml 0.8.2", + "toml 0.8.19", "url", "urlpattern", "uuid", @@ -8835,17 +10154,6 @@ dependencies = [ "webpki 0.21.4", ] -[[package]] -name = "tokio-rustls" -version = "0.23.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" -dependencies = [ - "rustls 0.20.9", - "tokio", - "webpki 0.22.4", -] - [[package]] name = "tokio-rustls" version = "0.24.1" @@ -8937,122 +10245,972 @@ dependencies = [ ] [[package]] -name = "toml" -version = "0.7.8" +name = "toml" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit 0.19.15", +] + +[[package]] +name = "toml" +version = "0.8.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit 0.22.22", +] + +[[package]] +name = "toml_datetime" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.19.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +dependencies = [ + "indexmap 2.6.0", + "serde", + "serde_spanned", + "toml_datetime", + "winnow 0.5.40", +] + +[[package]] +name = "toml_edit" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" +dependencies = [ + "indexmap 2.6.0", + "toml_datetime", + "winnow 0.5.40", +] + +[[package]] +name = "toml_edit" +version = "0.22.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" +dependencies = [ + "indexmap 2.6.0", + "serde", + "serde_spanned", + "toml_datetime", + "winnow 0.6.20", +] + +[[package]] +name = "tonic" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d560933a0de61cf715926b9cac824d4c883c2c43142f787595e48280c40a1d0e" +dependencies = [ + "async-stream", + "async-trait", + "axum", + "base64 0.21.7", + "bytes", + "h2 0.3.26", + "http 0.2.12", + "http-body 0.4.6", + "hyper 0.14.31", + "hyper-timeout", + "percent-encoding", + "pin-project", + "prost", + "tokio", + "tokio-stream", + "tower", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tonic-health" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f80db390246dfb46553481f6024f0082ba00178ea495dbb99e70ba9a4fafb5e1" +dependencies = [ + "async-stream", + "prost", + "tokio", + "tokio-stream", + "tonic", +] + +[[package]] +name = "tonic-web" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fddb2a37b247e6adcb9f239f4e5cefdcc5ed526141a416b943929f13aea2cce" +dependencies = [ + "base64 0.21.7", + "bytes", + "http 0.2.12", + "http-body 0.4.6", + "hyper 0.14.31", + "pin-project", + "tokio-stream", + "tonic", + "tower-http 0.4.4", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tor-async-utils" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3157a36bca68d25da943d9e77804fb1dadca108cd124871668a18763eae735b6" +dependencies = [ + "derive-deftly", + "educe", + "futures", + "oneshot-fused-workaround", + "pin-project", + "postage", + "thiserror 1.0.69", + "void", +] + +[[package]] +name = "tor-basic-utils" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3915f18c6574f797c5d59089074f79f81e6d93495d726179eebc9084126d617e" +dependencies = [ + "derive_more 1.0.0", + "hex", + "itertools 0.13.0", + "libc", + "paste", + "rand 0.8.5", + "rand_chacha 0.3.1", + "serde", + "slab", + "smallvec", + "thiserror 1.0.69", +] + +[[package]] +name = "tor-bytes" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6cef6d87b08baf1475bc24da39343705ab9b4f7f916d0ee19fa657634733d0d" +dependencies = [ + "bytes", + "derive-deftly", + "digest 0.10.7", + "educe", + "getrandom 0.2.15", + "safelog", + "thiserror 1.0.69", + "tor-error", + "tor-llcrypto", + "zeroize", +] + +[[package]] +name = "tor-cell" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35443109312b7ea355d767afc696d00389604a6afa6144a44ba074f7290bbb6b" +dependencies = [ + "amplify", + "bitflags 2.6.0", + "bytes", + "caret", + "derive-deftly", + "derive_more 1.0.0", + "educe", + "paste", + "rand 0.8.5", + "smallvec", + "thiserror 1.0.69", + "tor-basic-utils", + "tor-bytes", + "tor-cert", + "tor-error", + "tor-linkspec", + "tor-llcrypto", + "tor-memquota", + "tor-units", + "void", +] + +[[package]] +name = "tor-cert" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16b8eaa55aa20a3cab77943e176ed48f34c90d9ba0dc98c64adef6c15aef0bc8" +dependencies = [ + "caret", + "derive_more 1.0.0", + "digest 0.10.7", + "thiserror 1.0.69", + "tor-bytes", + "tor-checkable", + "tor-llcrypto", +] + +[[package]] +name = "tor-chanmgr" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0eabe776706c7062468bb7fdab05136c7a9db6325e9688e02d47a7b6d6dee9d" +dependencies = [ + "async-trait", + "derive_builder_fork_arti", + "derive_more 1.0.0", + "educe", + "futures", + "oneshot-fused-workaround", + "postage", + "rand 0.8.5", + "safelog", + "serde", + "thiserror 1.0.69", + "tor-async-utils", + "tor-basic-utils", + "tor-cell", + "tor-config", + "tor-error", + "tor-linkspec", + "tor-llcrypto", + "tor-memquota", + "tor-netdir", + "tor-proto", + "tor-rtcompat", + "tor-socksproto", + "tor-units", + "tracing", + "void", +] + +[[package]] +name = "tor-checkable" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48c1d164cf835d4f5e4150293e8322e152e8d8a39839cfea219742556df8fbe2" +dependencies = [ + "humantime", + "signature 2.2.0", + "thiserror 1.0.69", + "tor-llcrypto", +] + +[[package]] +name = "tor-circmgr" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d24638de4d36226023345c0e5f40e0e2244d2f6aec118b9c7cdb464c8f5f6277" +dependencies = [ + "amplify", + "async-trait", + "bounded-vec-deque", + "cfg-if", + "derive_builder_fork_arti", + "derive_more 1.0.0", + "downcast-rs", + "dyn-clone", + "educe", + "futures", + "humantime-serde", + "itertools 0.13.0", + "once_cell", + "oneshot-fused-workaround", + "pin-project", + "rand 0.8.5", + "retry-error", + "safelog", + "serde", + "static_assertions", + "thiserror 1.0.69", + "tor-async-utils", + "tor-basic-utils", + "tor-chanmgr", + "tor-config", + "tor-error", + "tor-guardmgr", + "tor-linkspec", + "tor-memquota", + "tor-netdir", + "tor-netdoc", + "tor-persist", + "tor-proto", + "tor-protover", + "tor-relay-selection", + "tor-rtcompat", + "tracing", + "void", + "weak-table", +] + +[[package]] +name = "tor-config" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16a89f7cc30d911d5baf61a181b15ea16219d5a63b54ff87bd3e05d3814ad212" +dependencies = [ + "amplify", + "cfg-if", + "derive-deftly", + "derive_builder_fork_arti", + "directories", + "educe", + "either", + "figment", + "fs-mistrust", + "futures", + "itertools 0.13.0", + "notify", + "once_cell", + "paste", + "postage", + "regex", + "serde", + "serde-value", + "serde_ignored", + "shellexpand", + "strum", + "thiserror 1.0.69", + "toml 0.8.19", + "tor-basic-utils", + "tor-config-path", + "tor-error", + "tor-rtcompat", + "tracing", + "void", +] + +[[package]] +name = "tor-config-path" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eebee676fe2b0c76c262e107a11a996cb381ff484d136c218becea6a4c15be5a" +dependencies = [ + "directories", + "once_cell", + "serde", + "shellexpand", + "thiserror 1.0.69", + "tor-error", +] + +[[package]] +name = "tor-consdiff" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01fd67886ae74b82d4cf7a15bc34c7381d10287178b3f9e8d92311cb74b761b1" +dependencies = [ + "digest 0.10.7", + "hex", + "thiserror 1.0.69", + "tor-llcrypto", +] + +[[package]] +name = "tor-dirclient" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a65ac0b04c4ff8c303a291ab22aa453c73929895b16a8314d888a7d0269c8343" +dependencies = [ + "async-compression 0.4.17", + "base64ct", + "derive_more 1.0.0", + "futures", + "hex", + "http 1.1.0", + "httparse", + "httpdate", + "itertools 0.13.0", + "memchr", + "thiserror 1.0.69", + "tor-circmgr", + "tor-error", + "tor-linkspec", + "tor-llcrypto", + "tor-netdoc", + "tor-proto", + "tor-rtcompat", + "tracing", +] + +[[package]] +name = "tor-dirmgr" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3a3e12af4860040f28cb14b03f9fae18a9aa0f1e66dab77ef0d9f93026ba95b" +dependencies = [ + "async-trait", + "base64ct", + "derive_builder_fork_arti", + "derive_more 1.0.0", + "digest 0.10.7", + "educe", + "event-listener 5.3.1", + "fs-mistrust", + "fslock", + "futures", + "hex", + "humantime", + "humantime-serde", + "itertools 0.13.0", + "memmap2", + "once_cell", + "oneshot-fused-workaround", + "paste", + "postage", + "rand 0.8.5", + "rusqlite", + "safelog", + "scopeguard", + "serde", + "signature 2.2.0", + "strum", + "thiserror 1.0.69", + "time 0.3.36", + "tor-async-utils", + "tor-basic-utils", + "tor-checkable", + "tor-circmgr", + "tor-config", + "tor-consdiff", + "tor-dirclient", + "tor-error", + "tor-guardmgr", + "tor-llcrypto", + "tor-netdir", + "tor-netdoc", + "tor-persist", + "tor-proto", + "tor-rtcompat", + "tracing", +] + +[[package]] +name = "tor-error" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82249e99eeab846b0264aabb761bceba891b9a5e5875fd2644683feeb96ea417" +dependencies = [ + "derive_more 1.0.0", + "futures", + "once_cell", + "paste", + "retry-error", + "static_assertions", + "strum", + "thiserror 1.0.69", + "tracing", + "void", +] + +[[package]] +name = "tor-general-addr" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3279be11b11750ea2bb85cc6ac81f22223696650400834d8e64c9449136b593e" +dependencies = [ + "derive_more 1.0.0", + "thiserror 1.0.69", + "void", +] + +[[package]] +name = "tor-guardmgr" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a732a0331e57b852512dcba2e2cecac1b7e9aee91e231b1d7373f8d6ca4aa1a" +dependencies = [ + "amplify", + "base64ct", + "derive-deftly", + "derive_builder_fork_arti", + "derive_more 1.0.0", + "dyn-clone", + "educe", + "futures", + "humantime", + "humantime-serde", + "itertools 0.13.0", + "num_enum", + "oneshot-fused-workaround", + "pin-project", + "postage", + "rand 0.8.5", + "safelog", + "serde", + "strum", + "thiserror 1.0.69", + "tor-async-utils", + "tor-basic-utils", + "tor-config", + "tor-error", + "tor-linkspec", + "tor-llcrypto", + "tor-netdir", + "tor-netdoc", + "tor-persist", + "tor-proto", + "tor-relay-selection", + "tor-rtcompat", + "tor-units", + "tracing", +] + +[[package]] +name = "tor-hscrypto" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f00099189e52d3376082b58139759249f16a53119d3d4f5f023168881c87d0a0" +dependencies = [ + "data-encoding", + "derive_more 1.0.0", + "digest 0.10.7", + "itertools 0.13.0", + "paste", + "rand 0.8.5", + "safelog", + "signature 2.2.0", + "subtle", + "thiserror 1.0.69", + "tor-basic-utils", + "tor-bytes", + "tor-error", + "tor-llcrypto", + "tor-units", + "void", +] + +[[package]] +name = "tor-key-forge" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "814a3ceb5b1c0a790f3604f2745775ca4a2cac3499a00c8641fc03030e068e08" +dependencies = [ + "derive-deftly", + "derive_more 1.0.0", + "downcast-rs", + "paste", + "rand 0.8.5", + "signature 2.2.0", + "ssh-key", + "thiserror 1.0.69", + "tor-error", + "tor-hscrypto", + "tor-llcrypto", +] + +[[package]] +name = "tor-keymgr" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "335a589e149aa728b09c1614a76f9857993c133c2b0fa03319c41218f4bde975" +dependencies = [ + "amplify", + "arrayvec", + "cfg-if", + "derive-deftly", + "derive_builder_fork_arti", + "derive_more 1.0.0", + "downcast-rs", + "dyn-clone", + "fs-mistrust", + "glob-match", + "humantime", + "inventory", + "itertools 0.13.0", + "rand 0.8.5", + "serde", + "signature 2.2.0", + "ssh-key", + "thiserror 1.0.69", + "tor-basic-utils", + "tor-config", + "tor-error", + "tor-hscrypto", + "tor-key-forge", + "tor-llcrypto", + "tor-persist", + "tracing", + "walkdir", + "zeroize", +] + +[[package]] +name = "tor-linkspec" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc92002b84c1cdea158aac4a3a400d61dd02fae5d9d0e8a36a8e08cd64fda6e9" +dependencies = [ + "base64ct", + "by_address", + "caret", + "derive-deftly", + "derive_builder_fork_arti", + "derive_more 1.0.0", + "hex", + "itertools 0.13.0", + "safelog", + "serde", + "serde_with 3.11.0", + "strum", + "thiserror 1.0.69", + "tor-basic-utils", + "tor-bytes", + "tor-config", + "tor-llcrypto", + "tor-memquota", + "tor-protover", +] + +[[package]] +name = "tor-llcrypto" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877d2fae2ef8f29ad91bd434e195bdef98662839be9ed4befdf071956b093123" +dependencies = [ + "aes", + "base64ct", + "ctr", + "curve25519-dalek 4.1.3", + "der-parser 9.0.0", + "derive-deftly", + "derive_more 1.0.0", + "digest 0.10.7", + "ed25519-dalek 2.1.1", + "educe", + "getrandom 0.2.15", + "hex", + "rand_core 0.6.4", + "rsa", + "safelog", + "serde", + "sha1", + "sha2 0.10.8", + "sha3 0.10.8", + "signature 2.2.0", + "subtle", + "thiserror 1.0.69", + "tor-memquota", + "visibility", + "x25519-dalek", + "zeroize", +] + +[[package]] +name = "tor-log-ratelim" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b090937d1bde6910769b2be6b514fc1c07e83f646a14a471f8f2647367afd10" +dependencies = [ + "futures", + "humantime", + "once_cell", + "thiserror 1.0.69", + "tor-error", + "tor-rtcompat", + "tracing", + "weak-table", +] + +[[package]] +name = "tor-memquota" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4560cc9485af7c499f611e2ed565dfcf1445e804faad0dd47ad097f4e9bf7d2" +dependencies = [ + "derive-deftly", + "derive_more 1.0.0", + "dyn-clone", + "educe", + "futures", + "itertools 0.13.0", + "paste", + "pin-project", + "serde", + "slotmap-careful", + "static_assertions", + "thiserror 1.0.69", + "tor-async-utils", + "tor-basic-utils", + "tor-config", + "tor-error", + "tor-log-ratelim", + "tor-rtcompat", + "tracing", + "void", +] + +[[package]] +name = "tor-netdir" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68a99ad35659954aa280e678c3af2ab68934caaf55b94b947e2fb6f850598b5a" +dependencies = [ + "bitflags 2.6.0", + "derive_more 1.0.0", + "futures", + "humantime", + "itertools 0.13.0", + "num_enum", + "rand 0.8.5", + "serde", + "static_assertions", + "strum", + "thiserror 1.0.69", + "tor-basic-utils", + "tor-error", + "tor-linkspec", + "tor-llcrypto", + "tor-netdoc", + "tor-protover", + "tor-units", + "tracing", + "typed-index-collections", +] + +[[package]] +name = "tor-netdoc" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f74630f9b13b192e84e09a0b39460eec8d1d23f6fa4b45f03d06782322d583fb" +dependencies = [ + "amplify", + "base64ct", + "bitflags 2.6.0", + "cipher", + "derive_builder_fork_arti", + "derive_more 1.0.0", + "digest 0.10.7", + "educe", + "hex", + "humantime", + "itertools 0.13.0", + "once_cell", + "phf 0.11.2", + "serde", + "serde_with 3.11.0", + "signature 2.2.0", + "smallvec", + "subtle", + "thiserror 1.0.69", + "time 0.3.36", + "tinystr", + "tor-basic-utils", + "tor-bytes", + "tor-cell", + "tor-cert", + "tor-checkable", + "tor-error", + "tor-llcrypto", + "tor-protover", + "void", + "weak-table", + "zeroize", +] + +[[package]] +name = "tor-persist" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" +checksum = "69b035192b529f6316c77d969f1e3be9f85d61ca1e1f946c91a96f987fdaba5e" dependencies = [ + "derive-deftly", + "derive_more 1.0.0", + "filetime", + "fs-mistrust", + "fslock", + "futures", + "itertools 0.13.0", + "oneshot-fused-workaround", + "paste", + "sanitize-filename", "serde", - "serde_spanned", - "toml_datetime", - "toml_edit 0.19.15", + "serde_json", + "thiserror 1.0.69", + "tor-async-utils", + "tor-basic-utils", + "tor-error", + "tracing", + "void", ] [[package]] -name = "toml" -version = "0.8.2" +name = "tor-proto" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d" +checksum = "3c911edb20425cff696606795d80241d4c412293254bd88b8a7a84ed92c3a098" dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit 0.20.2", + "asynchronous-codec 0.7.0", + "bitvec", + "bytes", + "cipher", + "coarsetime", + "derive-deftly", + "derive_builder_fork_arti", + "derive_more 1.0.0", + "digest 0.10.7", + "educe", + "futures", + "hkdf", + "hmac 0.12.1", + "oneshot-fused-workaround", + "pin-project", + "rand 0.8.5", + "rand_core 0.6.4", + "safelog", + "subtle", + "thiserror 1.0.69", + "tokio", + "tokio-util", + "tor-async-utils", + "tor-basic-utils", + "tor-bytes", + "tor-cell", + "tor-cert", + "tor-checkable", + "tor-config", + "tor-error", + "tor-linkspec", + "tor-llcrypto", + "tor-log-ratelim", + "tor-memquota", + "tor-rtcompat", + "tor-rtmock", + "tor-units", + "tracing", + "typenum", + "void", + "zeroize", ] [[package]] -name = "toml_datetime" -version = "0.6.3" +name = "tor-protover" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +checksum = "6bc5e3793a53b21b0c98304ea42e1f0fcab3bb37eca96027f9cb4df90685ba31" dependencies = [ - "serde", + "caret", + "thiserror 1.0.69", ] [[package]] -name = "toml_edit" -version = "0.19.15" +name = "tor-relay-selection" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +checksum = "5ba71ca940e15bb86586c3e0cb98b94b9f63a816ef7e1df6aa59cde1114bf86f" dependencies = [ - "indexmap 2.6.0", + "rand 0.8.5", "serde", - "serde_spanned", - "toml_datetime", - "winnow", + "tor-basic-utils", + "tor-linkspec", + "tor-netdir", + "tor-netdoc", ] [[package]] -name = "toml_edit" -version = "0.20.2" +name = "tor-rtcompat" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" +checksum = "2d91a0e023078fad1f6c65367efac78dada4c5c9ede7498ce7772f66f3bed15b" dependencies = [ - "indexmap 2.6.0", - "serde", - "serde_spanned", - "toml_datetime", - "winnow", + "async-native-tls", + "async-trait", + "async_executors", + "coarsetime", + "derive_more 1.0.0", + "dyn-clone", + "educe", + "futures", + "futures-rustls 0.26.0", + "native-tls", + "paste", + "pin-project", + "rustls-pki-types", + "thiserror 1.0.69", + "tokio", + "tokio-util", + "tor-error", + "tor-general-addr", + "tracing", + "void", + "x509-signature", ] [[package]] -name = "tonic" -version = "0.10.2" +name = "tor-rtmock" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d560933a0de61cf715926b9cac824d4c883c2c43142f787595e48280c40a1d0e" +checksum = "aacc825722bcad1dca140540a166e582409b4408ce6fbefd8e08d45264ea99f2" dependencies = [ - "async-stream", + "amplify", "async-trait", - "axum", - "base64 0.21.7", - "bytes", - "h2 0.3.26", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.31", - "hyper-timeout", - "percent-encoding", + "derive-deftly", + "derive_more 1.0.0", + "educe", + "futures", + "humantime", + "itertools 0.13.0", + "oneshot-fused-workaround", "pin-project", - "prost", - "tokio", - "tokio-stream", - "tower", - "tower-layer", - "tower-service", + "priority-queue", + "slotmap-careful", + "strum", + "thiserror 1.0.69", + "tor-error", + "tor-general-addr", + "tor-rtcompat", "tracing", + "tracing-test", + "void", ] [[package]] -name = "tonic-health" -version = "0.10.2" +name = "tor-socksproto" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f80db390246dfb46553481f6024f0082ba00178ea495dbb99e70ba9a4fafb5e1" +checksum = "1eb7a8c792dd59b63fc25add39982d0509c3a58fe6e40eb2294324bf0d30f364" dependencies = [ - "async-stream", - "prost", - "tokio", - "tokio-stream", - "tonic", + "amplify", + "caret", + "derive-deftly", + "educe", + "safelog", + "subtle", + "thiserror 1.0.69", + "tor-bytes", + "tor-error", ] [[package]] -name = "tonic-web" -version = "0.10.2" +name = "tor-units" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fddb2a37b247e6adcb9f239f4e5cefdcc5ed526141a416b943929f13aea2cce" +checksum = "01b1660c5ba8d5851d5411be3f9c0ae629e2b4e6e8db655b74f354611e5c18a7" dependencies = [ - "base64 0.21.7", - "bytes", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.31", - "pin-project", - "tokio-stream", - "tonic", - "tower-http 0.4.4", - "tower-layer", - "tower-service", - "tracing", + "derive-deftly", + "derive_more 1.0.0", + "thiserror 1.0.69", + "tor-memquota", ] [[package]] @@ -9063,13 +11221,13 @@ checksum = "99febc413f26cf855b3a309c5872edff5c31e0ffe9c2fce5681868761df36f69" dependencies = [ "base32", "base64 0.13.1", - "derive_more", + "derive_more 0.99.18", "ed25519-dalek 1.0.1", "hex", "hmac 0.11.0", "rand 0.7.3", "sha2 0.9.9", - "sha3", + "sha3 0.9.1", "tokio", ] @@ -9100,7 +11258,7 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f873044bf02dd1e8239e9c1293ea39dad76dc594ec16185d0a1bf31d8dc8d858" dependencies = [ - "async-compression", + "async-compression 0.3.15", "base64 0.13.1", "bitflags 1.3.2", "bytes", @@ -9255,6 +11413,27 @@ dependencies = [ "tracing-serde", ] +[[package]] +name = "tracing-test" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "557b891436fe0d5e0e363427fc7f217abf9ccd510d5136549847bdcbcd011d68" +dependencies = [ + "tracing-core", + "tracing-subscriber", + "tracing-test-macro", +] + +[[package]] +name = "tracing-test-macro" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04659ddb06c87d233c566112c1c9c5b9e98256d9af50ec3bc9c8327f873a7568" +dependencies = [ + "quote", + "syn 2.0.87", +] + [[package]] name = "tray-icon" version = "0.19.1" @@ -9304,6 +11483,12 @@ dependencies = [ "webpki 0.21.4", ] +[[package]] +name = "typed-index-collections" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "183496e014253d15abbe6235677b1392dba2d40524c88938991226baa38ac7c4" + [[package]] name = "typeid" version = "1.0.2" @@ -9373,6 +11558,15 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" +[[package]] +name = "uncased" +version = "0.9.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1b88fcfe09e89d3866a5c11019378088af2d24c3fbd4f0543f96b479ec90697" +dependencies = [ + "version_check", +] + [[package]] name = "unic-char-property" version = "0.9.0" @@ -9465,6 +11659,12 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + [[package]] name = "unicode_categories" version = "0.1.1" @@ -9504,7 +11704,7 @@ dependencies = [ [[package]] name = "unstoppableswap-gui-rs" -version = "1.0.0-rc.4" +version = "0.7.0" dependencies = [ "anyhow", "once_cell", @@ -9644,6 +11844,17 @@ version = "0.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9dcc60c0624df774c82a0ef104151231d37da4962957d691c011c852b2473314" +[[package]] +name = "visibility" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d674d135b4a8c1d7e813e2f8d1c9a58308aee4a680323066025e53132218bd91" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "void" version = "1.0.2" @@ -9716,6 +11927,21 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +[[package]] +name = "wasite" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" + +[[package]] +name = "wasix" +version = "0.12.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1fbb4ef9bbca0c1170e0b00dd28abc9e3b68669821600cad1caaed606583c6d" +dependencies = [ + "wasi 0.11.0+wasi-snapshot-preview1", +] + [[package]] name = "wasm-bindgen" version = "0.2.95" @@ -9796,6 +12022,12 @@ dependencies = [ "web-sys", ] +[[package]] +name = "weak-table" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "323f4da9523e9a669e1eaf9c6e763892769b1d38c623913647bfdc1532fe4549" + [[package]] name = "web-sys" version = "0.3.72" @@ -9955,6 +12187,16 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082" +[[package]] +name = "whoami" +version = "1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "372d5b87f58ec45c384ba03563b03544dc5fadc3983e434b286913f5b4a9bb6d" +dependencies = [ + "redox_syscall 0.5.7", + "wasite", +] + [[package]] name = "widestring" version = "1.1.0" @@ -10394,6 +12636,15 @@ dependencies = [ "memchr", ] +[[package]] +name = "winnow" +version = "0.6.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" +dependencies = [ + "memchr", +] + [[package]] name = "winreg" version = "0.50.0" @@ -10529,23 +12780,50 @@ dependencies = [ "zeroize", ] +[[package]] +name = "x509-parser" +version = "0.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7069fba5b66b9193bd2c5d3d4ff12b839118f6bcbef5328efafafb5395cf63da" +dependencies = [ + "asn1-rs 0.5.2", + "data-encoding", + "der-parser 8.2.0", + "lazy_static", + "nom", + "oid-registry 0.6.1", + "rusticata-macros", + "thiserror 1.0.69", + "time 0.3.36", +] + [[package]] name = "x509-parser" version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcbc162f30700d6f3f82a24bf7cc62ffe7caea42c0b2cba8bf7f3ae50cf51f69" dependencies = [ - "asn1-rs", + "asn1-rs 0.6.2", "data-encoding", - "der-parser", + "der-parser 9.0.0", "lazy_static", "nom", - "oid-registry", + "oid-registry 0.7.1", "rusticata-macros", "thiserror 1.0.69", "time 0.3.36", ] +[[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.3.1" @@ -10582,6 +12860,15 @@ dependencies = [ "xml-rs", ] +[[package]] +name = "xz2" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "388c44dc09d76f1536602ead6d325eb532f5c122f17782bd57fb47baeeb767e2" +dependencies = [ + "lzma-sys", +] + [[package]] name = "yamux" version = "0.12.1" @@ -10643,7 +12930,7 @@ dependencies = [ "proc-macro2", "quote", "syn 2.0.87", - "synstructure", + "synstructure 0.13.1", ] [[package]] @@ -10749,7 +13036,7 @@ dependencies = [ "proc-macro2", "quote", "syn 2.0.87", - "synstructure", + "synstructure 0.13.1", ] [[package]] @@ -10823,6 +13110,34 @@ dependencies = [ "thiserror 1.0.69", ] +[[package]] +name = "zstd" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcf2b778a664581e31e389454a7072dab1647606d44f7feea22cd5abb9c9f3f9" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "7.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54a3ab4db68cea366acc5c897c7b4d4d1b8994a9cd6e6f841f8964566a419059" +dependencies = [ + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "2.0.13+zstd.1.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38ff0f21cfee8f97d94cef41359e0c89aa6113028ab0291aa8ca0038995a95aa" +dependencies = [ + "cc", + "pkg-config", +] + [[package]] name = "zvariant" version = "4.0.0" diff --git a/swap/Cargo.toml b/swap/Cargo.toml index 82393bc50..68ff54030 100644 --- a/swap/Cargo.toml +++ b/swap/Cargo.toml @@ -13,7 +13,7 @@ tauri = [ "dep:tauri" ] [dependencies] anyhow = "1" -arti-client = "0.24.0" +arti-client = { version = "0.24.0", features = ["static-sqlite"] } async-compression = { version = "0.3", features = [ "bzip2", "tokio" ] } async-trait = "0.1" asynchronous-codec = "0.7.0" @@ -46,6 +46,7 @@ itertools = "0.13" jsonrpsee = { version = "0.16.2", features = [ "server" ] } jsonrpsee-core = "0.16.2" libp2p = { version = "0.53.2", features = [ "tcp", "yamux", "dns", "noise", "request-response", "ping", "rendezvous", "identify", "macros", "cbor", "json", "tokio", "serde", "rsa" ] } +libp2p-community-tor = { git = "https://github.com/UnstoppableSwap/libp2p-tor.git", branch = "upgrade/arti_client", version = "0.2.0" } monero = { version = "0.12", features = [ "serde_support" ] } monero-rpc = { path = "../monero-rpc" } once_cell = "1.19" @@ -74,10 +75,9 @@ sigma_fun = { version = "0.7", default-features = false, features = [ "secp256k1", "alloc", ] } -sqlx = { version = "0.6.3", features = [ +sqlx = { version = "0.8", features = [ "sqlite", "runtime-tokio-rustls", - "offline", ] } structopt = "0.3" strum = { version = "0.26", features = [ "derive" ] } @@ -100,6 +100,7 @@ tokio-socks = "0.5" tokio-tungstenite = { version = "0.15", features = [ "rustls-tls" ] } tokio-util = { version = "0.7", features = [ "io", "codec" ] } toml = "0.8" +tor-rtcompat = "0.24.0" torut = { version = "0.2", default-features = false, features = [ "v3", "control", diff --git a/swap/src/cli.rs b/swap/src/cli.rs index 3ea3a9471..6eb554e86 100644 --- a/swap/src/cli.rs +++ b/swap/src/cli.rs @@ -4,6 +4,7 @@ pub mod cancel_and_refund; pub mod command; mod event_loop; mod list_sellers; +mod tor; pub mod transport; pub mod watcher; diff --git a/swap/src/cli/api.rs b/swap/src/cli/api.rs index 4ac4a573a..1e99e1ede 100644 --- a/swap/src/cli/api.rs +++ b/swap/src/cli/api.rs @@ -12,6 +12,7 @@ use crate::seed::Seed; use crate::{bitcoin, common, monero}; use anyhow::anyhow; use anyhow::{bail, Context as AnyContext, Error, Result}; +use arti_client::TorClient; use futures::future::try_join_all; use std::fmt; use std::future::Future; @@ -22,11 +23,13 @@ use tauri_bindings::{ }; use tokio::sync::{broadcast, broadcast::Sender, Mutex as TokioMutex, RwLock}; use tokio::task::JoinHandle; +use tor_rtcompat::tokio::TokioRustlsRuntime; use tracing::level_filters::LevelFilter; use tracing::Level; use url::Url; use uuid::Uuid; +use super::tor::init_tor_client; use super::watcher::Watcher; static START: Once = Once::new(); @@ -188,6 +191,7 @@ pub struct Context { bitcoin_wallet: Option>, monero_wallet: Option>, monero_rpc_process: Option>>, + tor_client: Option>>, } /// A conveniant builder struct for [`Context`]. @@ -343,6 +347,7 @@ impl ContextBuilder { self.tauri_handle.clone(), ) .await?; + (Some(Arc::new(wlt)), Some(Arc::new(SyncMutex::new(prc)))) } else { (None, None) @@ -372,6 +377,8 @@ impl ContextBuilder { } } + let tor = init_tor_client(&data_dir).await?; + let context = Context { db, bitcoin_wallet, @@ -390,6 +397,7 @@ impl ContextBuilder { swap_lock, tasks: Arc::new(PendingTaskList::default()), tauri_handle: self.tauri_handle, + tor_client: Some(tor), }; Ok(context) @@ -423,6 +431,7 @@ impl Context { swap_lock: Arc::new(SwapLock::new()), tasks: Arc::new(PendingTaskList::default()), tauri_handle: None, + tor_client: None, } } diff --git a/swap/src/cli/api/request.rs b/swap/src/cli/api/request.rs index 7a8942bad..de6274fce 100644 --- a/swap/src/cli/api/request.rs +++ b/swap/src/cli/api/request.rs @@ -623,12 +623,7 @@ pub async fn buy_xmr( (seed.derive_libp2p_identity(), context.config.namespace), ); - let mut swarm = swarm::cli( - seed.derive_libp2p_identity(), - context.config.tor_socks5_port, - behaviour, - ) - .await?; + let mut swarm = swarm::cli(seed.derive_libp2p_identity(), None, behaviour).await?; swarm.add_peer_address(seller_peer_id, seller); @@ -813,7 +808,7 @@ pub async fn resume_swap( ), (seed.clone(), context.config.namespace), ); - let mut swarm = swarm::cli(seed.clone(), context.config.tor_socks5_port, behaviour).await?; + let mut swarm = swarm::cli(seed.clone(), None, behaviour).await?; let our_peer_id = swarm.local_peer_id(); tracing::debug!(peer_id = %our_peer_id, "Network layer initialized"); diff --git a/swap/src/cli/list_sellers.rs b/swap/src/cli/list_sellers.rs index 5464f233c..12cb16672 100644 --- a/swap/src/cli/list_sellers.rs +++ b/swap/src/cli/list_sellers.rs @@ -33,7 +33,7 @@ pub async fn list_sellers( quote: quote::cli(), ping: ping::Behaviour::new(ping::Config::new().with_timeout(Duration::from_secs(60))), }; - let mut swarm = swarm::cli(identity, tor_socks5_port, behaviour).await?; + let mut swarm = swarm::cli(identity, None, behaviour).await?; swarm.add_peer_address(rendezvous_node_peer_id, rendezvous_node_addr.clone()); diff --git a/swap/src/cli/tor.rs b/swap/src/cli/tor.rs index 3c69c022e..d47d979ec 100644 --- a/swap/src/cli/tor.rs +++ b/swap/src/cli/tor.rs @@ -1,23 +1,26 @@ use std::path::PathBuf; use std::sync::Arc; -use arti::socks::run_socks_proxy; -use arti_client::{config::TorClientConfigBuilder, TorClient, TorClientBuilder}; +use arti_client::{config::TorClientConfigBuilder, Error, TorClient}; +use tor_rtcompat::tokio::TokioRustlsRuntime; -pub async fn init_tor_client(tor_socks5_port: u16, data_dir: PathBuf) -> Result> { +pub async fn init_tor_client( + data_dir: &PathBuf, +) -> Result>, Error> { let data_dir = data_dir.join("tor"); let state_dir = data_dir.join("state"); let cache_dir = data_dir.join("cache"); // The client configuration describes how to connect to the Tor network, // and what directories to use for storing persistent state. - let config = TorClientConfigBuilder::from_directories(state_dir, cache_dir).build()?; + let config = TorClientConfigBuilder::from_directories(state_dir, cache_dir) + .build() + .unwrap(); // Start the Arti client, and let it bootstrap a connection to the Tor network. // (This takes a while to gather the necessary directory information. // It uses cached information when possible.) let tor_client = TorClient::create_bootstrapped(config).await?; - run_socks_proxy(tor_client, tor_socks5_port).await?; Ok(Arc::new(tor_client)) } diff --git a/swap/src/cli/transport.rs b/swap/src/cli/transport.rs index b70fb299a..51371a62e 100644 --- a/swap/src/cli/transport.rs +++ b/swap/src/cli/transport.rs @@ -1,11 +1,15 @@ -use crate::network::tor_transport::TorDialOnlyTransport; +use std::sync::Arc; + use crate::network::transport::authenticate_and_multiplex; use anyhow::Result; +use arti_client::TorClient; use libp2p::core::muxing::StreamMuxerBox; use libp2p::core::transport::{Boxed, OptionalTransport}; use libp2p::dns; use libp2p::tcp; use libp2p::{identity, PeerId, Transport}; +use libp2p_community_tor::{AddressConversion, TorTransport}; +use tor_rtcompat::tokio::TokioRustlsRuntime; /// Creates the libp2p transport for the swap CLI. /// @@ -17,13 +21,16 @@ use libp2p::{identity, PeerId, Transport}; /// TCP transport. pub fn new( identity: &identity::Keypair, - maybe_tor_socks5_port: Option, + maybe_tor_client: Option>>, ) -> Result> { let tcp = tcp::tokio::Transport::new(tcp::Config::new().nodelay(true)); let tcp_with_dns = dns::tokio::Transport::system(tcp)?; - let maybe_tor_transport = match maybe_tor_socks5_port { - Some(port) => OptionalTransport::some(TorDialOnlyTransport::new(port)), + let maybe_tor_transport: OptionalTransport = match maybe_tor_client { + Some(client) => OptionalTransport::some(libp2p_community_tor::TorTransport { + client, + conversion_mode: AddressConversion::IpAndDns, + }), None => OptionalTransport::none(), }; diff --git a/swap/src/common/tracing_util.rs b/swap/src/common/tracing_util.rs index bad75a4ce..28971a116 100644 --- a/swap/src/common/tracing_util.rs +++ b/swap/src/common/tracing_util.rs @@ -101,6 +101,8 @@ fn env_filter(level_filter: LevelFilter) -> Result { Ok(EnvFilter::from_default_env() .add_directive(Directive::from_str(&format!("asb={}", &level_filter))?) .add_directive(Directive::from_str(&format!("swap={}", &level_filter))?) + .add_directive(Directive::from_str(&format!("arti={}", &level_filter))?) + .add_directive(Directive::from_str(&format!("libp2p={}", &level_filter))?) .add_directive(Directive::from_str(&format!( "unstoppableswap-gui-rs={}", &level_filter diff --git a/swap/src/database/sqlite.rs b/swap/src/database/sqlite.rs index 36f5b99ed..93403aba3 100644 --- a/swap/src/database/sqlite.rs +++ b/swap/src/database/sqlite.rs @@ -29,7 +29,7 @@ impl SqliteDatabase { let path_str = format!("sqlite:{}", path.as_ref().display()); - let mut options = SqliteConnectOptions::from_str(&path_str)?.read_only(read_only); + let options = SqliteConnectOptions::from_str(&path_str)?.read_only(read_only); let options = options.disable_statement_logging(); let pool = SqlitePool::connect_with(options.to_owned()).await?; @@ -59,8 +59,6 @@ impl SqliteDatabase { #[async_trait] impl Database for SqliteDatabase { async fn insert_peer_id(&self, swap_id: Uuid, peer_id: PeerId) -> Result<()> { - let mut conn = self.pool.acquire().await?; - let swap_id = swap_id.to_string(); let peer_id = peer_id.to_string(); @@ -74,15 +72,13 @@ impl Database for SqliteDatabase { swap_id, peer_id ) - .execute(&mut conn) + .execute(&self.pool) .await?; Ok(()) } async fn get_peer_id(&self, swap_id: Uuid) -> Result { - let mut conn = self.pool.acquire().await?; - let swap_id = swap_id.to_string(); let row = sqlx::query!( @@ -93,7 +89,7 @@ impl Database for SqliteDatabase { "#, swap_id ) - .fetch_one(&mut conn) + .fetch_one(&self.pool) .await?; let peer_id = PeerId::from_str(&row.peer_id)?; @@ -101,8 +97,6 @@ impl Database for SqliteDatabase { } async fn insert_monero_address(&self, swap_id: Uuid, address: Address) -> Result<()> { - let mut conn = self.pool.acquire().await?; - let swap_id = swap_id.to_string(); let address = address.to_string(); @@ -116,15 +110,13 @@ impl Database for SqliteDatabase { swap_id, address ) - .execute(&mut conn) + .execute(&self.pool) .await?; Ok(()) } async fn get_monero_address(&self, swap_id: Uuid) -> Result
{ - let mut conn = self.pool.acquire().await?; - let swap_id = swap_id.to_string(); let row = sqlx::query!( @@ -135,7 +127,7 @@ impl Database for SqliteDatabase { "#, swap_id ) - .fetch_one(&mut conn) + .fetch_one(&self.pool) .await?; let address = row.address.parse()?; @@ -144,10 +136,8 @@ impl Database for SqliteDatabase { } async fn get_monero_addresses(&self) -> Result> { - let mut conn = self.pool.acquire().await?; - let rows = sqlx::query!("SELECT DISTINCT address FROM monero_addresses") - .fetch_all(&mut conn) + .fetch_all(&self.pool) .await?; let addresses = rows @@ -159,8 +149,6 @@ impl Database for SqliteDatabase { } async fn insert_address(&self, peer_id: PeerId, address: Multiaddr) -> Result<()> { - let mut conn = self.pool.acquire().await?; - let peer_id = peer_id.to_string(); let address = address.to_string(); @@ -174,15 +162,13 @@ impl Database for SqliteDatabase { peer_id, address ) - .execute(&mut conn) + .execute(&self.pool) .await?; Ok(()) } async fn get_addresses(&self, peer_id: PeerId) -> Result> { - let mut conn = self.pool.acquire().await?; - let peer_id = peer_id.to_string(); let rows = sqlx::query!( @@ -193,7 +179,7 @@ impl Database for SqliteDatabase { "#, peer_id, ) - .fetch_all(&mut conn) + .fetch_all(&self.pool) .await?; let addresses = rows @@ -208,7 +194,6 @@ impl Database for SqliteDatabase { } async fn get_swap_start_date(&self, swap_id: Uuid) -> Result { - let mut conn = self.pool.acquire().await?; let swap_id = swap_id.to_string(); let row = sqlx::query!( @@ -219,7 +204,7 @@ impl Database for SqliteDatabase { "#, swap_id ) - .fetch_one(&mut conn) + .fetch_one(&self.pool) .await?; row.start_date @@ -227,7 +212,6 @@ impl Database for SqliteDatabase { } async fn insert_latest_state(&self, swap_id: Uuid, state: State) -> Result<()> { - let mut conn = self.pool.acquire().await?; let entered_at = OffsetDateTime::now_utc(); let swap = serde_json::to_string(&Swap::from(state))?; @@ -246,7 +230,7 @@ impl Database for SqliteDatabase { entered_at, swap ) - .execute(&mut conn) + .execute(&self.pool) .await?; // Emit event to Tauri, the frontend will then send another request to get the latest state @@ -257,7 +241,6 @@ impl Database for SqliteDatabase { } async fn get_state(&self, swap_id: Uuid) -> Result { - let mut conn = self.pool.acquire().await?; let swap_id = swap_id.to_string(); let row = sqlx::query!( r#" @@ -270,7 +253,7 @@ impl Database for SqliteDatabase { "#, swap_id ) - .fetch_all(&mut conn) + .fetch_all(&self.pool) .await?; let row = row @@ -282,34 +265,38 @@ impl Database for SqliteDatabase { } async fn all(&self) -> Result> { - let mut conn = self.pool.acquire().await?; let rows = sqlx::query!( r#" - SELECT swap_id, state - FROM ( - SELECT max(id), swap_id, state - FROM swap_states - GROUP BY swap_id - ) + SELECT swap_id, state + FROM ( + SELECT max(id), swap_id, state + FROM swap_states + GROUP BY swap_id + ) "# ) - .fetch_all(&mut conn) + .fetch_all(&self.pool) .await?; let result = rows .iter() .filter_map(|row| { - let swap_id = match Uuid::from_str(&row.swap_id) { + let (Some(swap_id), Some(state)) = (&row.swap_id, &row.state) else { + tracing::error!("Row didn't contain state or swap_id when it should have"); + return None; + }; + + let swap_id = match Uuid::from_str(swap_id) { Ok(id) => id, Err(e) => { - tracing::error!(swap_id = %row.swap_id, error = ?e, "Failed to parse UUID"); + tracing::error!(%swap_id, error = ?e, "Failed to parse UUID"); return None; } }; - let state = match serde_json::from_str::(&row.state) { + let state = match serde_json::from_str::(state) { Ok(a) => State::from(a), Err(e) => { - tracing::error!(swap_id = %swap_id, error = ?e, "Failed to deserialize state"); + tracing::error!(%swap_id, error = ?e, "Failed to deserialize state"); return None; } }; @@ -322,7 +309,6 @@ impl Database for SqliteDatabase { } async fn get_states(&self, swap_id: Uuid) -> Result> { - let mut conn = self.pool.acquire().await?; let swap_id = swap_id.to_string(); // TODO: We should use query! instead of query here to allow for at-compile-time validation @@ -335,7 +321,7 @@ impl Database for SqliteDatabase { "#, swap_id ) - .fetch_all(&mut conn) + .fetch_all(&self.pool) .await?; let result = rows @@ -359,7 +345,6 @@ impl Database for SqliteDatabase { swap_id: Uuid, proof: TransferProof, ) -> Result<()> { - let mut conn = self.pool.acquire().await?; let swap_id = swap_id.to_string(); let proof = serde_json::to_string(&proof)?; @@ -373,14 +358,13 @@ impl Database for SqliteDatabase { swap_id, proof ) - .execute(&mut conn) + .execute(&self.pool) .await?; Ok(()) } async fn get_buffered_transfer_proof(&self, swap_id: Uuid) -> Result> { - let mut conn = self.pool.acquire().await?; let swap_id = swap_id.to_string(); let row = sqlx::query!( @@ -391,7 +375,7 @@ impl Database for SqliteDatabase { "#, swap_id ) - .fetch_all(&mut conn) + .fetch_all(&self.pool) .await?; if row.is_empty() { diff --git a/swap/src/network/swarm.rs b/swap/src/network/swarm.rs index c3213539a..cb3d3ef09 100644 --- a/swap/src/network/swarm.rs +++ b/swap/src/network/swarm.rs @@ -4,11 +4,14 @@ use crate::network::rendezvous::XmrBtcNamespace; use crate::seed::Seed; use crate::{asb, bitcoin, cli, env, tor}; use anyhow::Result; +use arti_client::TorClient; use libp2p::swarm::NetworkBehaviour; use libp2p::SwarmBuilder; use libp2p::{identity, Multiaddr, Swarm}; use std::fmt::Debug; +use std::sync::Arc; use std::time::Duration; +use tor_rtcompat::tokio::TokioRustlsRuntime; #[allow(clippy::too_many_arguments)] pub fn asb( @@ -61,18 +64,13 @@ where pub async fn cli( identity: identity::Keypair, - tor_socks5_port: u16, + maybe_tor_client: Option>>, behaviour: T, ) -> Result> where T: NetworkBehaviour, { - let maybe_tor_socks5_port = match tor::Client::new(tor_socks5_port).assert_tor_running().await { - Ok(()) => Some(tor_socks5_port), - Err(_) => None, - }; - - let transport = cli::transport::new(&identity, maybe_tor_socks5_port)?; + let transport = cli::transport::new(&identity, maybe_tor_client)?; let swarm = SwarmBuilder::with_existing_identity(identity) .with_tokio()