diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b4cf49c70..d7ee4077e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,7 +39,13 @@ jobs: run: cargo check --all --all-features - name: Run cargo clippy run: cargo clippy --all --all-features -- -D warnings - - name: Run cargo test + - name: Run cargo test on non-macos + if: ${{ matrix.os }} != 'macos-13' + run: cargo test --all --all-features + env: + CLASH_RS_CI: 'true' + - name: Run cargo test on macos + if: ${{ matrix.os }} == 'macos-13' run: cargo test --all --all-features - name: Build artifacts run: sh ./scripts/build.sh "${{ matrix.platforms.target }}" "${{ matrix.static }}" diff --git a/Cargo.lock b/Cargo.lock index 7bed9064f..2c11faaba 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -55,9 +55,9 @@ dependencies = [ [[package]] name = "ahash" -version = "0.8.7" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77c3a9648d43b9cd48db467b3f87fdd6e146bcc88ab0180006cef2179fe11d01" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", "once_cell", @@ -67,9 +67,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" dependencies = [ "memchr", ] @@ -97,9 +97,9 @@ checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" [[package]] name = "amplify" -version = "4.5.0" +version = "4.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8629db306c0bbeb0a402e2918bdcf0026b5ddb24c46460f3bf5410b350d98710" +checksum = "9e711289a6cb28171b4f0e6c8019c69ff9476050508dc082167575d458ff74d0" dependencies = [ "amplify_derive", "amplify_num", @@ -121,9 +121,9 @@ dependencies = [ [[package]] name = "amplify_num" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9681187211554ab98f138ba159e90861b136c20afc680dcff2ba82d020721e27" +checksum = "04c009c5c4de814911b177e2ea59e4930bb918978ed3cce4900d846a6ceb0838" dependencies = [ "wasm-bindgen", ] @@ -171,9 +171,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.11" +version = "0.6.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e2e1ebcb11de5c03c67de28a7df593d32191b44939c482e97702baaaa6ab6a5" +checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb" dependencies = [ "anstyle", "anstyle-parse", @@ -185,9 +185,9 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.4" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" +checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" [[package]] name = "anstyle-parse" @@ -225,9 +225,9 @@ checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247" [[package]] name = "arc-swap" -version = "1.6.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" +checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457" [[package]] name = "arrayref" @@ -243,9 +243,9 @@ checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" [[package]] name = "arti-client" -version = "0.14.0" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffd8cfa3b2bdbeefd4a8d8656a3763b53275fdd61e5aaf77821e3fec05f11b4" +checksum = "e1e5ce0af09766442f95df8b66e26498a9270ba613f2a31cb30dc79d301bdae6" dependencies = [ "cfg-if", "derive_builder_fork_arti", @@ -316,7 +316,7 @@ checksum = "30c5ef0ede93efbf733c1a727f3b6b5a1060bbedd5600183e66f6e4be4af0ec5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] @@ -338,7 +338,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] @@ -349,7 +349,7 @@ checksum = "a507401cad91ec6a857ed5513a2073c82a9b9048762b885bb98655b306964681" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] @@ -399,9 +399,9 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" [[package]] name = "axum" @@ -414,7 +414,7 @@ dependencies = [ "bitflags 1.3.2", "bytes", "futures-util", - "http 0.2.11", + "http 0.2.12", "http-body 0.4.6", "hyper 0.14.28", "itoa", @@ -445,7 +445,7 @@ dependencies = [ "http 1.1.0", "http-body 1.0.0", "http-body-util", - "hyper 1.1.0", + "hyper 1.2.0", "hyper-util", "itoa", "matchit", @@ -477,7 +477,7 @@ dependencies = [ "async-trait", "bytes", "futures-util", - "http 0.2.11", + "http 0.2.12", "http-body 0.4.6", "mime", "rustversion", @@ -515,14 +515,14 @@ dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] name = "backtrace" -version = "0.3.69" +version = "0.3.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" dependencies = [ "addr2line", "cc", @@ -592,7 +592,7 @@ version = "0.68.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "726e4313eb6ec35d2730258ad4e15b547ee75d6afaa1361a922e78e59b7d8078" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "cexpr", "clang-sys", "lazy_static", @@ -603,29 +603,29 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] name = "bindgen" -version = "0.69.2" +version = "0.69.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4c69fae65a523209d34240b60abe0c42d33d1045d445c0839d8a4894a736e2d" +checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "cexpr", "clang-sys", + "itertools 0.12.1", "lazy_static", "lazycell", "log", - "peeking_take_while", "prettyplease", "proc-macro2", "quote", "regex", "rustc-hash", "shlex", - "syn 2.0.48", + "syn 2.0.55", "which", ] @@ -637,9 +637,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.2" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" [[package]] name = "bitvec" @@ -664,9 +664,9 @@ dependencies = [ [[package]] name = "blake3" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0231f06152bf547e9c2b5194f247cd97aacf6dcd8b15d8e5ec0663f64580da87" +checksum = "30cca6d3674597c30ddf2c587bf8d9d65c9a84d2326d941cc79c9842dfe0ef52" dependencies = [ "arrayref", "arrayvec", @@ -683,7 +683,7 @@ checksum = "e0b121a9fe0df916e362fb3271088d071159cdf11db0e4182d02152850756eff" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] @@ -695,13 +695,57 @@ dependencies = [ "generic-array", ] +[[package]] +name = "bollard" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0aed08d3adb6ebe0eff737115056652670ae290f177759aac19c30456135f94c" +dependencies = [ + "base64 0.22.0", + "bollard-stubs", + "bytes", + "futures-core", + "futures-util", + "hex", + "http 1.1.0", + "http-body-util", + "hyper 1.2.0", + "hyper-named-pipe", + "hyper-util", + "hyperlocal-next", + "log", + "pin-project-lite", + "serde", + "serde_derive", + "serde_json", + "serde_repr", + "serde_urlencoded", + "thiserror", + "tokio", + "tokio-util", + "tower-service", + "url", + "winapi", +] + +[[package]] +name = "bollard-stubs" +version = "1.44.0-rc.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "709d9aa1c37abb89d40f19f5d0ad6f0d88cb1581264e571c9350fc5bb89cf1c5" +dependencies = [ + "serde", + "serde_repr", + "serde_with", +] + [[package]] name = "boring" version = "4.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8259fc1ea91894a550190683fbcda307d1ef85f2875d93a2b1ab3cab58b62fea" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "boring-sys", "foreign-types", "libc", @@ -737,7 +781,7 @@ dependencies = [ "nix", "parking_lot 0.12.1", "rand_core", - "ring 0.17.7", + "ring 0.17.8", "tracing", "untrusted 0.9.0", "x25519-dalek", @@ -772,9 +816,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.14.0" +version = "3.15.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" +checksum = "7ff69b9dd49fd426c69a0db9fc04dd934cdb6645ff000864d98f7e2af8830eaa" [[package]] name = "by_address" @@ -834,9 +878,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.0.83" +version = "1.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5" dependencies = [ "jobserver", "libc", @@ -902,14 +946,14 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-targets 0.52.0", + "windows-targets 0.52.4", ] [[package]] name = "ciborium" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "effd91f6c78e5a4ace8a5d3c0b6bfaec9e2baaef55f3efc00e45fb2e477ee926" +checksum = "42e69ffd6f0917f5c029256a24d0161db17cea3997d185db0d35926308770f0e" dependencies = [ "ciborium-io", "ciborium-ll", @@ -918,15 +962,15 @@ dependencies = [ [[package]] name = "ciborium-io" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdf919175532b369853f5d5e20b26b43112613fd6fe7aee757e35f7a44642656" +checksum = "05afea1e0a06c9be33d539b876f1ce3692f4afea2cb41f740e7743225ed1c757" [[package]] name = "ciborium-ll" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "defaa24ecc093c77630e6c15e17c51f5e187bf35ee514f4e2d67baaa96dae22b" +checksum = "57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9" dependencies = [ "ciborium-io", "half", @@ -1000,7 +1044,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] @@ -1037,6 +1081,7 @@ dependencies = [ "axum 0.7.5", "axum-macros", "base64 0.22.0", + "bollard", "boring", "boring-sys", "boringtun", @@ -1093,6 +1138,7 @@ dependencies = [ "serde", "serde_json", "serde_yaml", + "serial_test", "sha2", "shadowsocks", "smoltcp", @@ -1112,6 +1158,7 @@ dependencies = [ "tracing-opentelemetry", "tracing-oslog", "tracing-subscriber", + "tracing-test", "tracing-timing", "tuic", "tuic-quinn", @@ -1132,13 +1179,12 @@ dependencies = [ [[package]] name = "coarsetime" -version = "0.1.33" +version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71367d3385c716342014ad17e3d19f7788ae514885a1f4c24f500260fb365e1a" +checksum = "13b3839cf01bb7960114be3ccf2340f541b6d0c81f8690b007b2b39f750f7e5d" dependencies = [ "libc", - "once_cell", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasix", "wasm-bindgen", ] @@ -1159,16 +1205,15 @@ dependencies = [ [[package]] name = "config" -version = "0.13.4" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23738e11972c7643e4ec947840fc463b6a571afcd3e735bdfce7d03c7a784aca" +checksum = "7328b20597b53c2454f0b1919720c25c7339051c02b72b7e05409e00b14132be" dependencies = [ - "async-trait", "lazy_static", "nom", "pathdiff", "serde", - "toml 0.5.11", + "toml", ] [[package]] @@ -1313,9 +1358,9 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.11" +version = "0.5.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "176dc175b78f56c0f321911d9c8eb2b77a78a4860b9c19db83835fea1a46649b" +checksum = "ab3db02a9c5b5121e1e42fbdb1aeb65f5e02624cc58c43f2884c6ccac0b82f95" dependencies = [ "crossbeam-utils", ] @@ -1354,6 +1399,12 @@ version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + [[package]] name = "crypto-bigint" version = "0.5.5" @@ -1384,7 +1435,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad291aa74992b9b7a7e88c38acbbf6ad7e107f1d90ee8775b7bc1fc3394f485c" dependencies = [ "quote", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] @@ -1398,9 +1449,9 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "4.1.1" +version = "4.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89b8c6a2e4b1f45971ad09761aafb85514a84744b67a95e32c3cc1352d1f65c" +checksum = "0a677b8922c94e01bdbb12126b0bc852f00447528dee1782229af9c720c3f348" dependencies = [ "cfg-if", "cpufeatures", @@ -1421,7 +1472,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] @@ -1436,12 +1487,12 @@ dependencies = [ [[package]] name = "darling" -version = "0.20.3" +version = "0.20.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" +checksum = "54e36fcd13ed84ffdfda6f5be89b31287cbb80c439841fe69e04841435464391" dependencies = [ - "darling_core 0.20.3", - "darling_macro 0.20.3", + "darling_core 0.20.8", + "darling_macro 0.20.8", ] [[package]] @@ -1460,16 +1511,16 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.3" +version = "0.20.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "177e3443818124b357d8e76f53be906d60937f0d3a90773a664fa63fa253e621" +checksum = "9c2cf1c23a687a1feeb728783b993c4e1ad83d99f351801977dd809b48d0a70f" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", "strsim 0.10.0", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] @@ -1485,13 +1536,26 @@ dependencies = [ [[package]] name = "darling_macro" -version = "0.20.3" +version = "0.20.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" +checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" dependencies = [ - "darling_core 0.20.3", + "darling_core 0.20.8", "quote", - "syn 2.0.48", + "syn 2.0.55", +] + +[[package]] +name = "dashmap" +version = "5.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" +dependencies = [ + "cfg-if", + "hashbrown 0.14.3", + "lock_api", + "once_cell", + "parking_lot_core 0.9.9", ] [[package]] @@ -1502,9 +1566,9 @@ checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" [[package]] name = "defmt" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8a2d011b2fee29fb7d659b83c43fce9a2cb4df453e16d441a51448e448f3f98" +checksum = "3939552907426de152b3c2c6f51ed53f98f448babd26f28694c95f5906194595" dependencies = [ "bitflags 1.3.2", "defmt-macros", @@ -1512,22 +1576,22 @@ dependencies = [ [[package]] name = "defmt-macros" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54f0216f6c5acb5ae1a47050a6645024e6edafc2ee32d421955eccfef12ef92e" +checksum = "18bdc7a7b92ac413e19e95240e75d3a73a8d8e78aa24a594c22cbb4d44b4bbda" dependencies = [ "defmt-parser", "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] name = "defmt-parser" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "269924c02afd7f94bc4cecbfa5c379f6ffcf9766b3408fe63d22c728654eccd0" +checksum = "ff4a5fefe330e8d7f31b16a318f9ce81000d8e35e69b93eae154d16d2278f70f" dependencies = [ "thiserror", ] @@ -1565,11 +1629,11 @@ dependencies = [ [[package]] name = "derive-adhoc" -version = "0.8.1" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acd539187faa4741d0b5cee4bfe866b655cbe3cf497ecbe60db60883108e19fb" +checksum = "9fc3f185a1a0d933e54447b3492fe9880db2c3ad37c04b3a3bf9b24a73b7bd02" dependencies = [ - "derive-adhoc-macros 0.8.1", + "derive-adhoc-macros 0.8.3", "heck 0.4.1", ] @@ -1592,18 +1656,18 @@ dependencies = [ [[package]] name = "derive-adhoc-macros" -version = "0.8.1" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0f27b6d3c8bc4e69b0e1091cfc38e3bb9e7b6d3dfc3703a1dd5c75d0a281e2a" +checksum = "69f1a082460419acefc6a66ff74c6e15c460d9b95530697f5d10892ee624aa60" dependencies = [ "heck 0.4.1", - "itertools 0.12.0", + "itertools 0.12.1", "proc-macro-crate 2.0.0", "proc-macro2", "quote", "sha3", "strum 0.25.0", - "syn 2.0.48", + "syn 2.0.55", "void", ] @@ -1722,7 +1786,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] @@ -1745,9 +1809,9 @@ checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" [[package]] name = "dyn-clone" -version = "1.0.16" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "545b22097d44f8a9581187cdf93de7a71e4722bf51200cfaba810865b49a495d" +checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" [[package]] name = "ecdsa" @@ -1759,7 +1823,7 @@ dependencies = [ "digest", "elliptic-curve", "rfc6979", - "signature 2.2.0", + "signature", "spki", ] @@ -1770,14 +1834,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" dependencies = [ "pkcs8", - "signature 2.2.0", + "signature", ] [[package]] name = "ed25519-dalek" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f628eaec48bfd21b865dc2950cfa014450c01d2fa2b69a86c2fd5844ec523c0" +checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" dependencies = [ "curve25519-dalek", "ed25519", @@ -1803,9 +1867,9 @@ dependencies = [ [[package]] name = "either" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" [[package]] name = "elliptic-curve" @@ -1853,7 +1917,7 @@ dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] @@ -1866,7 +1930,7 @@ dependencies = [ "num-traits", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] @@ -1909,9 +1973,9 @@ dependencies = [ [[package]] name = "event-listener" -version = "4.0.3" +version = "5.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67b215c49b2b248c855fb73579eb1f4f26c38ffdc12973e20e07b91d78d5646e" +checksum = "2b5fb89194fa3cad959b833185b3063ba881dbfc7030680b314250779fb4cc91" dependencies = [ "concurrent-queue", "parking", @@ -1932,9 +1996,9 @@ checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a" [[package]] name = "fastrand" -version = "2.0.1" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" +checksum = "658bd65b1cf4c852a3cc96f18a8ce7b5640f6b703f905c7d74532294c2a63984" [[package]] name = "ff" @@ -1948,9 +2012,9 @@ dependencies = [ [[package]] name = "fiat-crypto" -version = "0.2.5" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27573eac26f4dd11e2b1916c3fe1baa56407c83c71a773a8ba17ec0bca03b6b7" +checksum = "c007b1ae3abe1cb6f85a16305acd418b7ca6343b953633fee2b76d8f108b830f" [[package]] name = "filetime" @@ -2004,7 +2068,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] @@ -2030,9 +2094,9 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "fs-mistrust" -version = "0.7.7" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "476c90fd2e83786920602f28c4c00ef739106329cc0b5efdf0a87837524bcf13" +checksum = "0af38a7e00ec1cc0cae8002d3cc9738ebb97d623bc519ca8a9b471e9bc8cdb75" dependencies = [ "derive_builder_fork_arti", "dirs", @@ -2132,7 +2196,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] @@ -2142,7 +2206,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8d8a2499f0fecc0492eb3e47eab4e92da7875e1028ad2528f214ac3346ca04e" dependencies = [ "futures-io", - "rustls 0.22.2", + "rustls 0.22.3", "rustls-pki-types", ] @@ -2211,9 +2275,9 @@ dependencies = [ [[package]] name = "ghash" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d930750de5717d2dd0b8c0d42c076c0e884c81a73e6cab859bbd2339c71e3e40" +checksum = "f0d8a4362ccb29cb0b265253fb0a2728f592895ee6854fd9bc13f2ffda266ff1" dependencies = [ "opaque-debug", "polyval", @@ -2250,17 +2314,17 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.24" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" +checksum = "4fbd2820c5e49886948654ab546d0688ff24530286bdcf8fca3cefb16d4618eb" dependencies = [ "bytes", "fnv", "futures-core", "futures-sink", "futures-util", - "http 0.2.11", - "indexmap 2.2.1", + "http 0.2.12", + "indexmap 2.2.6", "slab", "tokio", "tokio-util", @@ -2279,7 +2343,7 @@ dependencies = [ "futures-sink", "futures-util", "http 1.1.0", - "indexmap 2.2.1", + "indexmap 2.2.6", "slab", "tokio", "tokio-util", @@ -2288,9 +2352,13 @@ dependencies = [ [[package]] name = "half" -version = "1.8.2" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" +checksum = "b5eceaaeec696539ddaf7b333340f1af35a5aa87ae3e4f3ead0532f72affab2e" +dependencies = [ + "cfg-if", + "crunchy", +] [[package]] name = "hash32" @@ -2319,9 +2387,9 @@ dependencies = [ [[package]] name = "hashlink" -version = "0.8.4" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" +checksum = "692eaaf7f7607518dd3cef090f1474b61edc5301d8012f09579920df68b725ee" dependencies = [ "hashbrown 0.14.3", ] @@ -2349,7 +2417,7 @@ dependencies = [ "base64 0.21.7", "bytes", "headers-core", - "http 0.2.11", + "http 0.2.12", "httpdate", "mime", "sha1", @@ -2361,7 +2429,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7f66481bfee273957b1f20485a4ff3362987f85b2c236580d81b4eb7a326429" dependencies = [ - "http 0.2.11", + "http 0.2.12", ] [[package]] @@ -2397,9 +2465,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.3.4" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d3d0e0f38255e7fa3cf31335b3a56f05febd18025f4db5ef7a0cfb4f8da651f" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" [[package]] name = "hex" @@ -2440,8 +2508,8 @@ dependencies = [ "futures-channel", "futures-io", "futures-util", - "h2 0.3.24", - "http 0.2.11", + "h2 0.3.25", + "http 0.2.12", "idna 0.4.0", "ipnet", "once_cell", @@ -2493,10 +2561,10 @@ dependencies = [ "cfg-if", "enum-as-inner 0.6.0", "futures-util", - "h2 0.3.24", + "h2 0.3.25", "hickory-proto", "hickory-resolver", - "http 0.2.11", + "http 0.2.12", "rustls 0.21.10", "serde", "thiserror", @@ -2553,9 +2621,9 @@ checksum = "f558a64ac9af88b5ba400d99b579451af0d39c6d360980045b91aac966d705e2" [[package]] name = "http" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" dependencies = [ "bytes", "fnv", @@ -2580,7 +2648,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", - "http 0.2.11", + "http 0.2.12", "pin-project-lite", ] @@ -2596,12 +2664,12 @@ dependencies = [ [[package]] name = "http-body-util" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41cb79eb393015dadd30fc252023adb0b2400a0caee0fa2a077e6e21a551e840" +checksum = "0475f8b2ac86659c21b64320d5d653f9efe42acd2a4e560073ec61a155a34f1d" dependencies = [ "bytes", - "futures-util", + "futures-core", "http 1.1.0", "http-body 1.0.0", "pin-project-lite", @@ -2651,8 +2719,8 @@ dependencies = [ "futures-channel", "futures-core", "futures-util", - "h2 0.3.24", - "http 0.2.11", + "h2 0.3.25", + "http 0.2.12", "http-body 0.4.6", "httparse", "httpdate", @@ -2667,9 +2735,9 @@ dependencies = [ [[package]] name = "hyper" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5aa53871fc917b1a9ed87b683a5d86db645e23acb32c2e0785a353e522fb75" +checksum = "186548d73ac615b32a73aafe38fb4f56c0d340e110e5a200bcadbaf2e199263a" dependencies = [ "bytes", "futures-channel", @@ -2680,7 +2748,24 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", + "smallvec", "tokio", + "want", +] + +[[package]] +name = "hyper-named-pipe" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73b7d8abf35697b81a825e386fc151e0d503e8cb5fcb93cc8669c376dfd6f278" +dependencies = [ + "hex", + "hyper 1.2.0", + "hyper-util", + "pin-project-lite", + "tokio", + "tower-service", + "winapi", ] [[package]] @@ -2690,7 +2775,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", - "http 0.2.11", + "http 0.2.12", "hyper 0.14.28", "log", "rustls 0.21.10", @@ -2718,20 +2803,39 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca38ef113da30126bbff9cd1705f9273e15d45498615d138b0c20279ac7a76aa" dependencies = [ "bytes", + "futures-channel", "futures-util", "http 1.1.0", "http-body 1.0.0", - "hyper 1.1.0", + "hyper 1.2.0", "pin-project-lite", "socket2", "tokio", + "tower", + "tower-service", + "tracing", +] + +[[package]] +name = "hyperlocal-next" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acf569d43fa9848e510358c07b80f4adf34084ddc28c6a4a651ee8474c070dcc" +dependencies = [ + "hex", + "http-body-util", + "hyper 1.2.0", + "hyper-util", + "pin-project-lite", + "tokio", + "tower-service", ] [[package]] name = "iana-time-zone" -version = "0.1.59" +version = "0.1.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6a67363e2aa4443928ce15e57ebae94fd8949958fd1223c4cfc0cd473ad7539" +checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -2800,9 +2904,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.1" +version = "2.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "433de089bd45971eecf4668ee0ee8f4cec17db4f8bd8f7bc3197a6ce37aa7d9b" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ "equivalent", "hashbrown 0.14.3", @@ -2855,9 +2959,9 @@ checksum = "8bb03732005da905c88227371639bf1ad885cc712789c011c31c5fb3ab3ccf02" [[package]] name = "inventory" -version = "0.3.14" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8573b2b1fb643a372c73b23f4da5f888677feef3305146d68a539250a9bccc7" +checksum = "f958d3d68f4167080a18141e10381e7634563984a537f2a49a30fd8e53ac5767" [[package]] name = "ioctl-sys" @@ -2916,12 +3020,12 @@ dependencies = [ [[package]] name = "is-terminal" -version = "0.4.10" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bad00257d07be169d870ab665980b06cdb366d792ad690bf2e76876dc503455" +checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" dependencies = [ - "hermit-abi 0.3.4", - "rustix", + "hermit-abi 0.3.9", + "libc", "windows-sys 0.52.0", ] @@ -2945,33 +3049,33 @@ dependencies = [ [[package]] name = "itertools" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25db6b064527c5d482d0423354fcd07a89a2dfe07b67892e62411946db7f07b0" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" dependencies = [ "either", ] [[package]] name = "itoa" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "jobserver" -version = "0.1.27" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" +checksum = "ab46a6e9526ddef3ae7f787c06f0f2600639ba80ea3eade3d8e670a2230f51d6" dependencies = [ "libc", ] [[package]] name = "js-sys" -version = "0.3.67" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a1d36f1235bc969acba30b7f5990b864423a6068a10f7c90ae8f0112e3a59d1" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" dependencies = [ "wasm-bindgen", ] @@ -3028,12 +3132,12 @@ checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "libloading" -version = "0.8.1" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c571b676ddfc9a8c12f1f3d3085a7b163966a8fd8098a90640953ce5f6170161" +checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" dependencies = [ "cfg-if", - "windows-sys 0.48.0", + "windows-targets 0.52.4", ] [[package]] @@ -3048,16 +3152,16 @@ version = "0.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "libc", "redox_syscall 0.4.1", ] [[package]] name = "libsqlite3-sys" -version = "0.27.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4e226dcd58b4be396f7bd3c20da8fdee2911400705297ba7d2d7cc2c30f716" +checksum = "0c10584274047cb335c23d3e61bcef8e323adae7c5c8c760540f73610177fc3f" dependencies = [ "cc", "pkg-config", @@ -3088,9 +3192,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.20" +version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" [[package]] name = "lru-cache" @@ -3190,9 +3294,9 @@ checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" [[package]] name = "memmap2" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45fd3a57831bf88bc63f8cebc0cf956116276e97fef3966103e96416209f7c92" +checksum = "fe751422e4a8caa417e13c3ea66452215d7d63e19e604f4980461212f3ae1322" dependencies = [ "libc", ] @@ -3233,9 +3337,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" dependencies = [ "adler", ] @@ -3276,7 +3380,7 @@ dependencies = [ "cfg-if", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] @@ -3291,7 +3395,7 @@ version = "0.3.4" source = "git+https://github.com/Watfaq/netstack-lwip.git?rev=2817bf82740e04bbee6b7bf1165f55657a6ed163#2817bf82740e04bbee6b7bf1165f55657a6ed163" dependencies = [ "anyhow", - "bindgen 0.69.2", + "bindgen 0.69.4", "bytes", "cc", "futures", @@ -3349,7 +3453,7 @@ version = "6.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6205bd8bb1e454ad2e27422015fb5e4f2bcc7e08fa8f27058670d208324a4d2d" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "crossbeam-channel", "filetime", "fsevent-sys", @@ -3400,21 +3504,26 @@ dependencies = [ "zeroize", ] +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + [[package]] name = "num-integer" -version = "0.1.45" +version = "0.1.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" dependencies = [ - "autocfg", "num-traits", ] [[package]] name = "num-iter" -version = "0.1.43" +version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252" +checksum = "d869c01cc0c455284163fd0092f1f93835385ccab5a98a0dcc497b2f8bf055a9" dependencies = [ "autocfg", "num-integer", @@ -3423,9 +3532,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.17" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" +checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" dependencies = [ "autocfg", "libm", @@ -3437,7 +3546,7 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.3.4", + "hermit-abi 0.3.9", "libc", ] @@ -3459,7 +3568,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] @@ -3485,9 +3594,9 @@ checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" [[package]] name = "opaque-debug" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "openssl-probe" @@ -3518,7 +3627,7 @@ checksum = "7cbfa5308166ca861434f0b0913569579b8e587430a3d6bcd7fd671921ec145a" dependencies = [ "async-trait", "bytes", - "http 0.2.11", + "http 0.2.12", "hyper 0.14.28", "opentelemetry", "tokio", @@ -3534,7 +3643,7 @@ dependencies = [ "futures-core", "futures-util", "headers", - "http 0.2.11", + "http 0.2.12", "hyper 0.14.28", "opentelemetry", "opentelemetry-http", @@ -3561,7 +3670,7 @@ checksum = "1a016b8d9495c639af2145ac22387dcb88e44118e45320d9238fbf4e7889abcb" dependencies = [ "async-trait", "futures-core", - "http 0.2.11", + "http 0.2.12", "opentelemetry", "opentelemetry-http", "opentelemetry-proto", @@ -3798,7 +3907,7 @@ dependencies = [ "phf_shared", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] @@ -3812,22 +3921,22 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.1.3" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" +checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.3" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" +checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] @@ -3865,9 +3974,9 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2900ede94e305130c13ddd391e0ab7cbaeb783945ae07a279c268cb05109c6cb" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "platforms" @@ -3916,9 +4025,9 @@ dependencies = [ [[package]] name = "polyval" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52cff9d1d4dee5fe6d03729099f4a310a41179e0a10dbf542039873f2e826fb" +checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25" dependencies = [ "cfg-if", "cpufeatures", @@ -3981,12 +4090,12 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a41cf62165e97c7f814d2221421dbb9afcbcdb0a88068e5ea206e19951c2cbb5" +checksum = "8d3928fb5db768cb86f891ff014f0144589297e3c6a1aba6ed7cecfdace270c7" dependencies = [ "proc-macro2", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] @@ -4000,9 +4109,9 @@ dependencies = [ [[package]] name = "priority-queue" -version = "1.3.2" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fff39edfcaec0d64e8d0da38564fad195d2d51b680940295fcc307366e101e61" +checksum = "a0bda9164fe05bc9225752d54aae413343c36f684380005398a6a8fde95fe785" dependencies = [ "autocfg", "indexmap 1.9.3", @@ -4033,7 +4142,7 @@ version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" dependencies = [ - "toml_edit 0.21.0", + "toml_edit 0.21.1", ] [[package]] @@ -4062,9 +4171,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.76" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95fc56cda0b5c3325f5fbbd7ff9fda9e02bb00bb3dac51252d2f1bfa1cb8cc8c" +checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" dependencies = [ "unicode-ident", ] @@ -4089,7 +4198,7 @@ dependencies = [ "itertools 0.11.0", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] @@ -4255,9 +4364,9 @@ dependencies = [ [[package]] name = "rayon" -version = "1.8.1" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa7237101a77a10773db45d62004a272517633fbcc3df19d96455ede1122e051" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" dependencies = [ "either", "rayon-core", @@ -4310,7 +4419,7 @@ checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.4", + "regex-automata 0.4.6", "regex-syntax 0.8.2", ] @@ -4325,9 +4434,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.4" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b7fa1134405e2ec9353fd416b17f8dacd46c473d7d3fd1cf202706a14eb792a" +checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" dependencies = [ "aho-corasick", "memchr", @@ -4395,16 +4504,17 @@ dependencies = [ [[package]] name = "ring" -version = "0.17.7" +version = "0.17.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", + "cfg-if", "getrandom", "libc", "spin 0.9.8", "untrusted 0.9.0", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -4422,8 +4532,8 @@ dependencies = [ "p384", "pkcs8", "rand_core", - "ring 0.17.7", - "signature 2.2.0", + "ring 0.17.8", + "signature", ] [[package]] @@ -4441,7 +4551,7 @@ dependencies = [ "pkcs8", "rand_core", "sha2", - "signature 2.2.0", + "signature", "spki", "subtle", "zeroize", @@ -4449,11 +4559,11 @@ dependencies = [ [[package]] name = "rusqlite" -version = "0.30.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a78046161564f5e7cd9008aff3b2990b3850dc8e0349119b98e8f251e099f24d" +checksum = "b838eba278d213a8beaf485bd313fd580ca4505a00d5871caeb1457c55322cae" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "fallible-iterator", "fallible-streaming-iterator", "hashlink", @@ -4485,11 +4595,11 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.31" +version = "0.38.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" +checksum = "65e04861e65f21776e67888bfbea442b3642beaa0138fdb1dd7a84a52dffdb89" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "errno", "libc", "linux-raw-sys", @@ -4503,18 +4613,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" dependencies = [ "log", - "ring 0.17.7", + "ring 0.17.8", "rustls-webpki 0.101.7", "sct", ] [[package]] name = "rustls" -version = "0.22.2" +version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e87c9956bd9807afa1f77e0f7594af32566e830e088a5576d27c5b6f30f49d41" +checksum = "99008d7ad0bbbea527ec27bddbc0e432c5b87d8175178cee68d2eec9c4a1813c" dependencies = [ - "ring 0.17.7", + "ring 0.17.8", "rustls-pki-types", "rustls-webpki 0.102.2", "subtle", @@ -4544,9 +4654,9 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.2.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a716eb65e3158e90e17cd93d855216e27bde02745ab842f2cab4a39dba1bacf" +checksum = "868e20fada228fefaf6b652e00cc73623d54f8171e7352c18bb281571f2d92da" [[package]] name = "rustls-webpki" @@ -4554,7 +4664,7 @@ version = "0.101.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" dependencies = [ - "ring 0.17.7", + "ring 0.17.8", "untrusted 0.9.0", ] @@ -4564,7 +4674,7 @@ version = "0.102.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "faaa0a62740bedb9b2ef5afa303da42764c012f743917351dc9a237ea1663610" dependencies = [ - "ring 0.17.7", + "ring 0.17.8", "rustls-pki-types", "untrusted 0.9.0", ] @@ -4577,15 +4687,15 @@ checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "ryu" -version = "1.0.16" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" +checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" [[package]] name = "safelog" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbde572e12860540299239347c110992c8082cafb526a024c4efe79b2891b6df" +checksum = "b4dd088c4f8f20154e72ef45c78b31b1225b19b448dd3b0f37d605de1b8b8ef5" dependencies = [ "derive_more", "educe", @@ -4634,7 +4744,7 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ - "ring 0.17.7", + "ring 0.17.8", "untrusted 0.9.0", ] @@ -4677,9 +4787,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.21" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" +checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" [[package]] name = "sendfd" @@ -4718,7 +4828,7 @@ checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] @@ -4732,9 +4842,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.114" +version = "1.0.115" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0" +checksum = "12dc5c46daa8e9fdf4f5e71b6cf9a53f2487da0e86e55808e2d35539666497dd" dependencies = [ "itoa", "ryu", @@ -4743,14 +4853,25 @@ dependencies = [ [[package]] name = "serde_path_to_error" -version = "0.1.15" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebd154a240de39fdebcf5775d2675c204d7c13cf39a4c697be6493c8e734337c" +checksum = "af99884400da37c88f5e9146b7f1fd0fbcae8f6eec4e9da38b67d05486f814a6" dependencies = [ "itoa", "serde", ] +[[package]] +name = "serde_repr" +version = "0.1.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b2e6b945e9d3df726b65d6ee24060aff8e3533d431f677a9695db04eff9dfdb" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.55", +] + [[package]] name = "serde_spanned" version = "0.6.5" @@ -4774,16 +4895,17 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.4.0" +version = "3.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64cd236ccc1b7a29e7e2739f27c0b2dd199804abc4290e32f59f3b68d6405c23" +checksum = "ee80b0e361bbf88fd2f6e242ccd19cfda072cb0faa6ae694ecee08199938569a" dependencies = [ "base64 0.21.7", "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.2.1", + "indexmap 2.2.6", "serde", + "serde_derive", "serde_json", "serde_with_macros", "time", @@ -4791,14 +4913,14 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.4.0" +version = "3.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93634eb5f75a2323b16de4748022ac4297f9e76b6dced2be287a099f41b5e788" +checksum = "6561dc161a9224638a31d876ccdfefbc1df91d3f3a8342eddb35f055d48c7655" dependencies = [ - "darling 0.20.3", + "darling 0.20.8", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] @@ -4807,13 +4929,38 @@ version = "0.9.34+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" dependencies = [ - "indexmap 2.2.1", + "indexmap 2.2.6", "itoa", "ryu", "serde", "unsafe-libyaml", ] +[[package]] +name = "serial_test" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "953ad9342b3aaca7cb43c45c097dd008d4907070394bd0751a0aa8817e5a018d" +dependencies = [ + "dashmap", + "futures", + "lazy_static", + "log", + "parking_lot 0.12.1", + "serial_test_derive", +] + +[[package]] +name = "serial_test_derive" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b93fb4adc70021ac1b47f7d45e8cc4169baaa7ea58483bc5b721d19a26202212" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.55", +] + [[package]] name = "sha1" version = "0.10.6" @@ -4936,12 +5083,6 @@ dependencies = [ "libc", ] -[[package]] -name = "signature" -version = "1.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" - [[package]] name = "signature" version = "2.2.0" @@ -4990,9 +5131,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.13.1" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "smoltcp" @@ -5067,9 +5208,9 @@ dependencies = [ [[package]] name = "ssh-key" -version = "0.6.4" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01f8f4ea73476c0aa5d5e6a75ce1e8634e2c3f82005ef3bbed21547ac57f2bf7" +checksum = "3b71299a724c8d84956caaf8fc3b3ea57c3587fe2d0b800cd0dc1f3599905d7e" dependencies = [ "p256", "p384", @@ -5078,7 +5219,7 @@ dependencies = [ "rsa", "sec1", "sha2", - "signature 2.2.0", + "signature", "ssh-cipher", "ssh-encoding", "subtle", @@ -5126,11 +5267,11 @@ dependencies = [ [[package]] name = "strum" -version = "0.26.1" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "723b93e8addf9aa965ebe2d11da6d7540fa2283fcea14b3371ff055f7ba13f5f" +checksum = "5d8cec3501a5194c432b2b7976db6b7d10ec95c253208b45f83f7136aa985e29" dependencies = [ - "strum_macros 0.26.1", + "strum_macros 0.26.2", ] [[package]] @@ -5143,20 +5284,20 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] name = "strum_macros" -version = "0.26.1" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a3417fc93d76740d974a01654a09777cb500428cc874ca9f45edfe0c4d4cd18" +checksum = "c6cf59daf282c0a494ba14fd21610a0325f9f90ec9d1231dea26bcb1d696c946" dependencies = [ "heck 0.4.1", "proc-macro2", "quote", "rustversion", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] @@ -5178,9 +5319,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.48" +version = "2.0.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "002a1b3dbf967edfafc32655d0f377ab0bb7b994aa1d32c8cc7e9b8bf3ebb8f0" dependencies = [ "proc-macro2", "quote", @@ -5258,14 +5399,14 @@ checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] name = "thread_local" -version = "1.1.7" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" dependencies = [ "cfg-if", "once_cell", @@ -5295,12 +5436,13 @@ dependencies = [ [[package]] name = "time" -version = "0.3.31" +version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f657ba42c3f86e7680e53c8cd3af8abbe56b5491790b46e22e19c0d57463583e" +checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749" dependencies = [ "deranged", "itoa", + "num-conv", "powerfmt", "serde", "time-core", @@ -5315,10 +5457,11 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26197e33420244aeb70c3e8c78376ca46571bc4e701e4791c2cd9f57dcb3a43f" +checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774" dependencies = [ + "num-conv", "time-core", ] @@ -5394,7 +5537,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] @@ -5409,9 +5552,9 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.14" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" +checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" dependencies = [ "futures-core", "pin-project-lite", @@ -5477,23 +5620,14 @@ dependencies = [ [[package]] name = "toml" -version = "0.5.11" +version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" -dependencies = [ - "serde", -] - -[[package]] -name = "toml" -version = "0.8.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1a195ec8c9da26928f773888e0742ca3ca1040c6cd859c919c9f59c1954ab35" +checksum = "e9dd1545e8208b4a5af1aa9bbd0b4cf7e9ea08fabc5d0a5c67fcaafa17433aa3" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.21.0", + "toml_edit 0.22.9", ] [[package]] @@ -5511,9 +5645,9 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.2.1", + "indexmap 2.2.6", "toml_datetime", - "winnow", + "winnow 0.5.40", ] [[package]] @@ -5522,22 +5656,33 @@ version = "0.20.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81" dependencies = [ - "indexmap 2.2.1", + "indexmap 2.2.6", "toml_datetime", - "winnow", + "winnow 0.5.40", ] [[package]] name = "toml_edit" -version = "0.21.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03" +checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" dependencies = [ - "indexmap 2.2.1", + "indexmap 2.2.6", + "toml_datetime", + "winnow 0.5.40", +] + +[[package]] +name = "toml_edit" +version = "0.22.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e40bb779c5187258fd7aad0eb68cb8706a0a81fa712fbea808ab43c4b8374c4" +dependencies = [ + "indexmap 2.2.6", "serde", "serde_spanned", "toml_datetime", - "winnow", + "winnow 0.6.5", ] [[package]] @@ -5551,8 +5696,8 @@ dependencies = [ "axum 0.6.20", "base64 0.21.7", "bytes", - "h2 0.3.24", - "http 0.2.11", + "h2 0.3.25", + "http 0.2.12", "http-body 0.4.6", "hyper 0.14.28", "hyper-timeout", @@ -5578,8 +5723,8 @@ dependencies = [ "axum 0.6.20", "base64 0.21.7", "bytes", - "h2 0.3.24", - "http 0.2.11", + "h2 0.3.25", + "http 0.2.12", "http-body 0.4.6", "hyper 0.14.28", "hyper-timeout", @@ -5632,7 +5777,7 @@ dependencies = [ "digest", "educe", "getrandom", - "signature 2.2.0", + "signature", "thiserror", "tor-error", "tor-llcrypto", @@ -5641,11 +5786,11 @@ dependencies = [ [[package]] name = "tor-cell" -version = "0.16.0" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73626b412faf75c304486db20498e8085a40b9561f09e1bf919b5a176c858daa" +checksum = "f45c5af2f3ce5597a1ad90a8978fab6d43dcfe098b3f246c5ed573fe97f6beb9" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "bytes", "caret", "derive_more", @@ -5665,9 +5810,9 @@ dependencies = [ [[package]] name = "tor-cert" -version = "0.10.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ff2f1019c15bfadb8ad0f0b30f870b072b2cbecd8bf89be4bedca45543a6922" +checksum = "b059aa8271220dc38c39e0aab52366f83b86adac71d687a91a56fc99ff7b0640" dependencies = [ "caret", "derive_more", @@ -5680,9 +5825,9 @@ dependencies = [ [[package]] name = "tor-chanmgr" -version = "0.14.0" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "365c79109b1fe28c6491aa15117111501a8661892b16d8eced2d981db47e3b14" +checksum = "d99f76f14b3134b44b37a35ff9073f81fe8955f747d3d1effc3ab1bd1e0aaf5b" dependencies = [ "async-trait", "derive_builder_fork_arti", @@ -5712,21 +5857,21 @@ dependencies = [ [[package]] name = "tor-checkable" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6d1a0fb1e4b9a863c114164ed1250f4ac48ec02bbdf0bae2c2c598d04c762f4" +checksum = "96ac8ef9db89e16af3e674c8bb915b6e780d72e1c7f408388d610441f8a5578b" dependencies = [ "humantime", - "signature 1.6.4", + "signature", "thiserror", "tor-llcrypto", ] [[package]] name = "tor-circmgr" -version = "0.15.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6e95044caa70e9fdbe8713498d223dd13e7f18b51de6bba18360ec8516f2b07" +checksum = "b19089ab29f56b5b40cecb01ceb297593472885c0d2b0f9a0cb0a5a5635600b5" dependencies = [ "amplify", "async-trait", @@ -5738,7 +5883,7 @@ dependencies = [ "educe", "futures", "humantime-serde", - "itertools 0.12.0", + "itertools 0.12.1", "once_cell", "pin-project", "rand", @@ -5768,18 +5913,18 @@ dependencies = [ [[package]] name = "tor-config" -version = "0.10.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc84217b53ee8f13986e9d5c634e12ba9bdf996b4da87d974ef43f5ac5c3eeef" +checksum = "0c579e92f3b9e419e68cd317d33f567491365b81f943b063d30f32e4a2f072c5" dependencies = [ "config", - "derive-adhoc 0.8.1", + "derive-adhoc 0.8.3", "derive_builder_fork_arti", "directories", "educe", "either", "fs-mistrust", - "itertools 0.12.0", + "itertools 0.12.1", "once_cell", "paste", "regex", @@ -5787,9 +5932,9 @@ dependencies = [ "serde-value", "serde_ignored", "shellexpand", - "strum 0.25.0", + "strum 0.26.2", "thiserror", - "toml 0.8.8", + "toml", "tor-basic-utils", "tor-error", "tracing", @@ -5810,9 +5955,9 @@ dependencies = [ [[package]] name = "tor-dirclient" -version = "0.13.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3f34a5b4450d0069ff71a741d0c27b6797d167b928a3b092acd46fb5540d4ef" +checksum = "31fff143aba287f7a209a65a69a7e573f45aeb826737e3f43944054b8d743968" dependencies = [ "async-compression", "base64ct", @@ -5822,7 +5967,7 @@ dependencies = [ "http 1.1.0", "httparse", "httpdate", - "itertools 0.12.0", + "itertools 0.12.1", "memchr", "thiserror", "tor-circmgr", @@ -5838,9 +5983,9 @@ dependencies = [ [[package]] name = "tor-dirmgr" -version = "0.15.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b721cae86dacab3594da27020bb50a937f7f635a224412e04f831f7999c24b8" +checksum = "44bdc21d916be66bbe7afeff45303a751196daa1211df645abfe03f2cf3186ed" dependencies = [ "async-trait", "base64ct", @@ -5855,7 +6000,7 @@ dependencies = [ "hex", "humantime", "humantime-serde", - "itertools 0.12.0", + "itertools 0.12.1", "memmap2", "once_cell", "paste", @@ -5866,8 +6011,8 @@ dependencies = [ "safelog", "scopeguard", "serde", - "signature 1.6.4", - "strum 0.26.1", + "signature", + "strum 0.26.2", "thiserror", "time", "tor-async-utils", @@ -5890,9 +6035,9 @@ dependencies = [ [[package]] name = "tor-error" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a606e92ce352155bb8c4865a018a75a95cc31ca6a5a04da4b25cec8edad40350" +checksum = "a2195a255af92eddc6422f83e176094394ec856501536e3d3246d1c6c3879dd3" dependencies = [ "backtrace", "derive_more", @@ -5901,16 +6046,16 @@ dependencies = [ "paste", "retry-error", "static_assertions", - "strum 0.25.0", + "strum 0.26.2", "thiserror", "tracing", ] [[package]] name = "tor-guardmgr" -version = "0.14.0" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "264599ff5335136b66f3c95bf44223b27f96bf966cbf0e1946d925e3582ffe40" +checksum = "08065540dc88a8fd7117627d6e94a3f0d63c45d135ac7fdac7bd3b9f702dc1ee" dependencies = [ "base64ct", "derive_builder_fork_arti", @@ -5920,14 +6065,14 @@ dependencies = [ "futures", "humantime", "humantime-serde", - "itertools 0.12.0", + "itertools 0.12.1", "num_enum", "pin-project", "postage", "rand", "safelog", "serde", - "strum 0.26.1", + "strum 0.26.2", "thiserror", "tor-async-utils", "tor-basic-utils", @@ -5946,24 +6091,24 @@ dependencies = [ [[package]] name = "tor-hsclient" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59272ecf50203618930066de733c46119b126ea9cab0b24101ef21f051285f96" +checksum = "b4613dfe9d946db3b5769b860a16598a9c4a0f85df21653d0765b1238106d297" dependencies = [ "async-trait", - "derive-adhoc 0.8.1", + "derive-adhoc 0.8.3", "derive_more", "educe", "either", "futures", - "itertools 0.12.0", + "itertools 0.12.1", "postage", "rand", "rand_core", "retry-error", "safelog", "slotmap", - "strum 0.26.1", + "strum 0.26.2", "thiserror", "tor-async-utils", "tor-basic-utils", @@ -5988,20 +6133,20 @@ dependencies = [ [[package]] name = "tor-hscrypto" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50a59e868d7e5a610c7b380c82498933b6756d39ab95c9a0a4a262a5535d9a54" +checksum = "fb26c4926710d9c18f32707a709cfe4e7930e2f9a7da4e3e101aa9623e2f40d0" dependencies = [ "data-encoding", "derive_more", "digest", - "itertools 0.12.0", + "itertools 0.12.1", "paste", "rand", "rand_core", "safelog", "serde", - "signature 2.2.0", + "signature", "subtle", "thiserror", "tor-basic-utils", @@ -6013,12 +6158,13 @@ dependencies = [ [[package]] name = "tor-keymgr" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fc4091cbfafa3720b726d76b57c89397769c8ecaa197c516c466f02d30414f2" +checksum = "365c02c66f2f0159078714dd44947fb06c76956a3621fc102783119e5093be96" dependencies = [ + "amplify", "arrayvec", - "derive-adhoc 0.8.1", + "derive-adhoc 0.8.3", "derive_builder_fork_arti", "derive_more", "downcast-rs", @@ -6027,7 +6173,7 @@ dependencies = [ "glob-match", "humantime", "inventory", - "itertools 0.12.0", + "itertools 0.12.1", "paste", "rand", "serde", @@ -6044,9 +6190,9 @@ dependencies = [ [[package]] name = "tor-linkspec" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e022ab4840306f51a20c850c8db864ccca4148b8796422d63d9d3fd78594b33b" +checksum = "87539d8be3b8f86e240ae1cece77fb5ee669eb0c1434f7e3f5d369b6c2aa1b91" dependencies = [ "base64ct", "by_address", @@ -6056,11 +6202,11 @@ dependencies = [ "derive_more", "educe", "hex", - "itertools 0.12.0", + "itertools 0.12.1", "safelog", "serde", "serde_with", - "strum 0.26.1", + "strum 0.26.2", "thiserror", "tor-basic-utils", "tor-bytes", @@ -6092,7 +6238,7 @@ dependencies = [ "sha1", "sha2", "sha3", - "signature 2.2.0", + "signature", "simple_asn1", "subtle", "thiserror", @@ -6118,24 +6264,23 @@ dependencies = [ [[package]] name = "tor-netdir" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcaf8d3f55cf5cbc612208f865cb4496d18d81ddc88831f818e0c4696bdc90ff" +checksum = "88d507e621e12c5e958d81d3feee176a0b810874921d68b013a33fff6fc44f9f" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "derive_builder_fork_arti", "derive_more", "digest", "futures", "hex", "humantime", - "itertools 0.12.0", + "itertools 0.12.1", "num_enum", "rand", "serde", - "signature 1.6.4", "static_assertions", - "strum 0.26.1", + "strum 0.26.2", "thiserror", "time", "tor-basic-utils", @@ -6154,13 +6299,13 @@ dependencies = [ [[package]] name = "tor-netdoc" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "475d08276779da7ef03ccc46aebdf1e97055005abc3e466e478b67dcf608150b" +checksum = "5146c812701abc039ff41349e7cf25c63949f9a2528fe0a0f6b3976ccf5cb5ab" dependencies = [ "amplify", "base64ct", - "bitflags 2.4.2", + "bitflags 2.5.0", "cipher", "derive_builder_fork_arti", "derive_more", @@ -6168,13 +6313,13 @@ dependencies = [ "educe", "hex", "humantime", - "itertools 0.12.0", + "itertools 0.12.1", "once_cell", "phf", "rand", "serde", "serde_with", - "signature 1.6.4", + "signature", "smallvec", "subtle", "thiserror", @@ -6197,14 +6342,16 @@ dependencies = [ [[package]] name = "tor-persist" -version = "0.10.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc9f09541bd38f71fd7cdec6476ef079aa216910c2170b5b6fe55dbc0aec6720" +checksum = "e4bbf6c0a786daab669a75ec7380ae57f9aba91f2c4ea05a12e596d9bc6b49a0" dependencies = [ - "derive-adhoc 0.8.1", + "derive-adhoc 0.8.3", "derive_more", + "filetime", "fs-mistrust", "fslock", + "itertools 0.12.1", "paste", "sanitize-filename", "serde", @@ -6216,9 +6363,9 @@ dependencies = [ [[package]] name = "tor-proto" -version = "0.16.0" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa251ae0dcfb233a14a140c71837579afeb9228825bb098d69415d3c3d081bd5" +checksum = "dbe3037f1f08ac19a59f2ebe5acdcb0c79fd6f2286773051cb730146596359e6" dependencies = [ "asynchronous-codec", "bitvec", @@ -6301,16 +6448,16 @@ dependencies = [ "amplify", "async-trait", "backtrace", - "derive-adhoc 0.8.1", + "derive-adhoc 0.8.3", "derive_more", "educe", "futures", "humantime", - "itertools 0.12.0", + "itertools 0.12.1", "pin-project", "priority-queue", "slotmap", - "strum 0.26.1", + "strum 0.26.2", "thiserror", "tor-async-utils", "tor-error", @@ -6335,9 +6482,9 @@ dependencies = [ [[package]] name = "tor-units" -version = "0.6.4" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a924669b39fa305ccb42190abcc4ea623b596b48948429bc4d62f03c5ecf0dbe" +checksum = "0d59226676dc7633b813f92c781f7b637c5258234de27be4196740de2b4c946a" dependencies = [ "derive_more", "thiserror", @@ -6369,7 +6516,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e9cd434a998747dd2c4276bc96ee2e0c7a2eadf3cae88e52be55a05fa9053f5" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "bytes", "futures-util", "http 1.1.0", @@ -6432,7 +6579,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] @@ -6675,9 +6822,9 @@ checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" dependencies = [ "tinyvec", ] @@ -6766,7 +6913,7 @@ checksum = "9881bea7cbe687e36c9ab3b778c36cd0487402e270304e8b1296d5085303c1a2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] @@ -6801,7 +6948,7 @@ checksum = "b3fd98999db9227cf28e59d83e1f120f42bc233d4b152e8fab9bc87d5bb1e0f8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] @@ -6812,9 +6959,9 @@ checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" [[package]] name = "walkdir" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" dependencies = [ "same-file", "winapi-util", @@ -6841,11 +6988,20 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +[[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.90" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1223296a201415c7fad14792dbefaace9bd52b62d33453ade1c5b5f07555406" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -6853,24 +7009,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.90" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcdc935b63408d58a32f8cc9738a0bffd8f05cc7c002086c6ef20b7312ad9dcd" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.55", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.90" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e4c238561b2d428924c49815533a8b9121c664599558a5d9ec51f8a1740a999" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -6878,22 +7034,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.90" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bae1abb6806dc1ad9e560ed242107c0f6c84335f1749dd4e8ddb012ebd5e25a7" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.55", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.90" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d91413b1c31d7539ba5ef2451af3f0b833a005eb27a631cec32bc0635a8602b" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" [[package]] name = "weak-table" @@ -6903,9 +7059,9 @@ checksum = "323f4da9523e9a669e1eaf9c6e763892769b1d38c623913647bfdc1532fe4549" [[package]] name = "web-sys" -version = "0.3.67" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58cd2333b6e0be7a39605f0e255892fd7418a682d8da8fe042fe25128794d2ed" +checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" dependencies = [ "js-sys", "wasm-bindgen", @@ -6923,9 +7079,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.25.3" +version = "0.25.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10" +checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" [[package]] name = "which" @@ -7001,7 +7157,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.0", + "windows-targets 0.52.4", ] [[package]] @@ -7019,7 +7175,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.0", + "windows-targets 0.52.4", ] [[package]] @@ -7039,17 +7195,17 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b" dependencies = [ - "windows_aarch64_gnullvm 0.52.0", - "windows_aarch64_msvc 0.52.0", - "windows_i686_gnu 0.52.0", - "windows_i686_msvc 0.52.0", - "windows_x86_64_gnu 0.52.0", - "windows_x86_64_gnullvm 0.52.0", - "windows_x86_64_msvc 0.52.0", + "windows_aarch64_gnullvm 0.52.4", + "windows_aarch64_msvc 0.52.4", + "windows_i686_gnu 0.52.4", + "windows_i686_msvc 0.52.4", + "windows_x86_64_gnu 0.52.4", + "windows_x86_64_gnullvm 0.52.4", + "windows_x86_64_msvc 0.52.4", ] [[package]] @@ -7060,9 +7216,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" +checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9" [[package]] name = "windows_aarch64_msvc" @@ -7072,9 +7228,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" +checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675" [[package]] name = "windows_i686_gnu" @@ -7084,9 +7240,9 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" +checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3" [[package]] name = "windows_i686_msvc" @@ -7096,9 +7252,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" +checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02" [[package]] name = "windows_x86_64_gnu" @@ -7108,9 +7264,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" +checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03" [[package]] name = "windows_x86_64_gnullvm" @@ -7120,9 +7276,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" +checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177" [[package]] name = "windows_x86_64_msvc" @@ -7132,15 +7288,24 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" +checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8" [[package]] name = "winnow" -version = "0.5.34" +version = "0.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7cf47b659b318dccbd69cc4797a39ae128f533dce7902a1096044d1967b9c16" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", +] + +[[package]] +name = "winnow" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dffa400e67ed5a4dd237983829e66475f0a4a26938c4b04c21baede6262215b8" dependencies = [ "memchr", ] @@ -7179,9 +7344,9 @@ dependencies = [ [[package]] name = "x25519-dalek" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb66477291e7e8d2b0ff1bcb900bf29489a9692816d79874bea351e7a8b6de96" +checksum = "c7e468321c81fb07fa7f4c636c3972b9100f0346e5b6a9f2bd0603a52f7ed277" dependencies = [ "curve25519-dalek", "rand_core", @@ -7225,7 +7390,7 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] @@ -7245,7 +7410,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.55", ] [[package]] diff --git a/clash/tests/data/config/example.org-key.pem b/clash/tests/data/config/example.org-key.pem new file mode 100644 index 000000000..dbe9a3db3 --- /dev/null +++ b/clash/tests/data/config/example.org-key.pem @@ -0,0 +1,28 @@ +-----BEGIN PRIVATE KEY----- +MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDQ+c++LkDTdaw5 +5spCu9MWMcvVdrYBZZ5qZy7DskphSUSQp25cIu34GJXVPNxtbWx1CQCmdLlwqXvo +PfUt5/pz9qsfhdAbzFduZQgGd7GTQOTJBDrAhm2+iVsQyGHHhF68muN+SgT+AtRE +sJyZoHNYtjjWEIHQ++FHEDqwUVnj6Ut99LHlyfCjOZ5+WyBiKCjyMNots/gDep7R +i4X2kMTqNMIIqPUcAaP5EQk41bJbFhKe915qN9b1dRISKFKmiWeOsxgTB/O/EaL5 +LsBYwZ/BiIMDk30aZvzRJeloasIR3z4hrKQqBfB0lfeIdiPpJIs5rXJQEiWH89ge +gplsLbfrAgMBAAECggEBAKpMGaZzDPMF/v8Ee6lcZM2+cMyZPALxa+JsCakCvyh+ +y7hSKVY+RM0cQ+YM/djTBkJtvrDniEMuasI803PAitI7nwJGSuyMXmehP6P9oKFO +jeLeZn6ETiSqzKJlmYE89vMeCevdqCnT5mW/wy5Smg0eGj0gIJpM2S3PJPSQpv9Z +ots0JXkwooJcpGWzlwPkjSouY2gDbE4Coi+jmYLNjA1k5RbggcutnUCZZkJ6yMNv +H52VjnkffpAFHRouK/YgF+5nbMyyw5YTLOyTWBq7qfBMsXynkWLU73GC/xDZa3yG +o/Ph2knXCjgLmCRessTOObdOXedjnGWIjiqF8fVboDECgYEA6x5CteYiwthDBULZ +CG5nE9VKkRHJYdArm+VjmGbzK51tKli112avmU4r3ol907+mEa4tWLkPqdZrrL49 +aHltuHizZJixJcw0rcI302ot/Ov0gkF9V55gnAQS/Kemvx9FHWm5NHdYvbObzj33 +bYRLJBtJWzYg9M8Bw9ZrUnegc/MCgYEA44kq5OSYCbyu3eaX8XHTtFhuQHNFjwl7 +Xk/Oel6PVZzmt+oOlDHnOfGSB/KpR3YXxFRngiiPZzbrOwFyPGe7HIfg03HAXiJh +ivEfrPHbQqQUI/4b44GpDy6bhNtz777ivFGYEt21vpwd89rFiye+RkqF8eL/evxO +pUayDZYvwikCgYEA07wFoZ/lkAiHmpZPsxsRcrfzFd+pto9splEWtumHdbCo3ajT +4W5VFr9iHF8/VFDT8jokFjFaXL1/bCpKTOqFl8oC68XiSkKy8gPkmFyXm5y2LhNi +GGTFZdr5alRkgttbN5i9M/WCkhvMZRhC2Xp43MRB9IUzeqNtWHqhXbvjYGcCgYEA +vTMOztviLJ6PjYa0K5lp31l0+/SeD21j/y0/VPOSHi9kjeN7EfFZAw6DTkaSShDB +fIhutYVCkSHSgfMW6XGb3gKCiW/Z9KyEDYOowicuGgDTmoYu7IOhbzVjLhtJET7Z +zJvQZ0eiW4f3RBFTF/4JMuu+6z7FD6ADSV06qx+KQNkCgYBw26iQxmT5e/4kVv8X +DzBJ1HuliKBnnzZA1YRjB4H8F6Yrq+9qur1Lurez4YlbkGV8yPFt+Iu82ViUWL28 +9T7Jgp3TOpf8qOqsWFv8HldpEZbE0Tcib4x6s+zOg/aw0ac/xOPY1sCVFB81VODP +XCar+uxMBXI1zbXqd9QdEwy4Ig== +-----END PRIVATE KEY----- diff --git a/clash/tests/data/config/example.org.pem b/clash/tests/data/config/example.org.pem new file mode 100644 index 000000000..9b99259a3 --- /dev/null +++ b/clash/tests/data/config/example.org.pem @@ -0,0 +1,25 @@ +-----BEGIN CERTIFICATE----- +MIIESzCCArOgAwIBAgIQIi5xRZvFZaSweWU9Y5mExjANBgkqhkiG9w0BAQsFADCB +hzEeMBwGA1UEChMVbWtjZXJ0IGRldmVsb3BtZW50IENBMS4wLAYDVQQLDCVkcmVh +bWFjcm9ARHJlYW1hY3JvLmxvY2FsIChEcmVhbWFjcm8pMTUwMwYDVQQDDCxta2Nl +cnQgZHJlYW1hY3JvQERyZWFtYWNyby5sb2NhbCAoRHJlYW1hY3JvKTAeFw0yMTAz +MTcxNDQwMzZaFw0yMzA2MTcxNDQwMzZaMFkxJzAlBgNVBAoTHm1rY2VydCBkZXZl +bG9wbWVudCBjZXJ0aWZpY2F0ZTEuMCwGA1UECwwlZHJlYW1hY3JvQERyZWFtYWNy +by5sb2NhbCAoRHJlYW1hY3JvKTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC +ggEBAND5z74uQNN1rDnmykK70xYxy9V2tgFlnmpnLsOySmFJRJCnblwi7fgYldU8 +3G1tbHUJAKZ0uXCpe+g99S3n+nP2qx+F0BvMV25lCAZ3sZNA5MkEOsCGbb6JWxDI +YceEXrya435KBP4C1ESwnJmgc1i2ONYQgdD74UcQOrBRWePpS330seXJ8KM5nn5b +IGIoKPIw2i2z+AN6ntGLhfaQxOo0wgio9RwBo/kRCTjVslsWEp73Xmo31vV1EhIo +UqaJZ46zGBMH878RovkuwFjBn8GIgwOTfRpm/NEl6WhqwhHfPiGspCoF8HSV94h2 +I+kkizmtclASJYfz2B6CmWwtt+sCAwEAAaNgMF4wDgYDVR0PAQH/BAQDAgWgMBMG +A1UdJQQMMAoGCCsGAQUFBwMBMB8GA1UdIwQYMBaAFO800LQ6Pa85RH4EbMmFH6ln +F150MBYGA1UdEQQPMA2CC2V4YW1wbGUub3JnMA0GCSqGSIb3DQEBCwUAA4IBgQAP +TsF53h7bvJcUXT3Y9yZ2vnW6xr9r92tNnM1Gfo3D2Yyn9oLf2YrfJng6WZ04Fhqa +Wh0HOvE0n6yPNpm/Q7mh64DrgolZ8Ce5H4RTJDAabHU9XhEzfGSVtzRSFsz+szu1 +Y30IV+08DxxqMmNPspYdpAET2Lwyk2WhnARGiGw11CRkQCEkVEe6d702vS9UGBUz +Du6lmCYCm0SbFrZ0CGgmHSHoTcCtf3EjVam7dPg3yWiPbWjvhXxgip6hz9sCqkhG +WA5f+fPgSZ1I9U4i+uYnqjfrzwgC08RwUYordm15F6gPvXw+KVwDO8yUYQoEH0b6 +AFJtbzoAXDysvBC6kWYFFOr62EaisaEkELTS/NrPD9ux1eKbxcxHCwEtVjgC0CL6 +gAxEAQ+9maJMbrAFhsOBbGGFC+mMCGg4eEyx6+iMB0oQe0W7QFeRUAFi7Ptc/ocS +tZ9lbrfX1/wrcTTWIYWE+xH6oeb4fhs29kxjHcf2l+tQzmpl0aP3Z/bMW4BSB+w= +-----END CERTIFICATE----- diff --git a/clash/tests/data/config/ss.yaml b/clash/tests/data/config/ss.yaml index b93a31855..557096067 100644 --- a/clash/tests/data/config/ss.yaml +++ b/clash/tests/data/config/ss.yaml @@ -60,5 +60,5 @@ proxies: udp: true rules: - - MATCH, ss + - MATCH, ss-01 ... diff --git a/clash/tests/data/config/trojan-grpc.json b/clash/tests/data/config/trojan-grpc.json new file mode 100644 index 000000000..eb0dcc990 --- /dev/null +++ b/clash/tests/data/config/trojan-grpc.json @@ -0,0 +1,40 @@ +{ + "inbounds": [ + { + "port": 10002, + "listen": "0.0.0.0", + "protocol": "trojan", + "settings": { + "clients": [ + { + "password": "example", + "email": "grpc@example.com" + } + ] + }, + "streamSettings": { + "network": "grpc", + "security": "tls", + "tlsSettings": { + "certificates": [ + { + "certificateFile": "/etc/ssl/v2ray/fullchain.pem", + "keyFile": "/etc/ssl/v2ray/privkey.pem" + } + ] + }, + "grpcSettings": { + "serviceName": "example" + } + } + } + ], + "outbounds": [ + { + "protocol": "freedom" + } + ], + "log": { + "loglevel": "debug" + } +} \ No newline at end of file diff --git a/clash/tests/data/config/trojan-ws.json b/clash/tests/data/config/trojan-ws.json new file mode 100644 index 000000000..efc0acbd0 --- /dev/null +++ b/clash/tests/data/config/trojan-ws.json @@ -0,0 +1,20 @@ +{ + "run_type": "server", + "local_addr": "0.0.0.0", + "local_port": 10002, + "disable_http_check": true, + "password": [ + "example" + ], + "websocket": { + "enabled": true, + "path": "/", + "host": "example.org" + }, + "ssl": { + "verify": true, + "cert": "/fullchain.pem", + "key": "/privkey.pem", + "sni": "example.org" + } +} \ No newline at end of file diff --git a/clash/tests/data/config/vmess-grpc.json b/clash/tests/data/config/vmess-grpc.json new file mode 100644 index 000000000..178e0685f --- /dev/null +++ b/clash/tests/data/config/vmess-grpc.json @@ -0,0 +1,39 @@ +{ + "inbounds": [ + { + "port": 10002, + "listen": "0.0.0.0", + "protocol": "vmess", + "settings": { + "clients": [ + { + "id": "b831381d-6324-4d53-ad4f-8cda48b30811" + } + ] + }, + "streamSettings": { + "network": "grpc", + "security": "tls", + "tlsSettings": { + "certificates": [ + { + "certificateFile": "/etc/ssl/v2ray/fullchain.pem", + "keyFile": "/etc/ssl/v2ray/privkey.pem" + } + ] + }, + "grpcSettings": { + "serviceName": "example!" + } + } + } + ], + "outbounds": [ + { + "protocol": "freedom" + } + ], + "log": { + "loglevel": "debug" + } +} \ No newline at end of file diff --git a/clash/tests/data/config/vmess-http2.json b/clash/tests/data/config/vmess-http2.json new file mode 100644 index 000000000..c6916a1b5 --- /dev/null +++ b/clash/tests/data/config/vmess-http2.json @@ -0,0 +1,42 @@ +{ + "inbounds": [ + { + "port": 10002, + "listen": "0.0.0.0", + "protocol": "vmess", + "settings": { + "clients": [ + { + "id": "b831381d-6324-4d53-ad4f-8cda48b30811" + } + ] + }, + "streamSettings": { + "network": "http", + "security": "tls", + "tlsSettings": { + "certificates": [ + { + "certificateFile": "/etc/ssl/v2ray/fullchain.pem", + "keyFile": "/etc/ssl/v2ray/privkey.pem" + } + ] + }, + "httpSettings": { + "host": [ + "example.org" + ], + "path": "/test" + } + } + } + ], + "outbounds": [ + { + "protocol": "freedom" + } + ], + "log": { + "loglevel": "debug" + } +} \ No newline at end of file diff --git a/clash/tests/data/config/vmess-ws.json b/clash/tests/data/config/vmess-ws.json new file mode 100644 index 000000000..2bcb604dd --- /dev/null +++ b/clash/tests/data/config/vmess-ws.json @@ -0,0 +1,25 @@ +{ + "inbounds": [ + { + "port": 10002, + "listen": "0.0.0.0", + "protocol": "vmess", + "settings": { + "clients": [ + { + "id": "b831381d-6324-4d53-ad4f-8cda48b30811" + } + ] + }, + "streamSettings": { + "network": "ws", + "security": "none" + } + } + ], + "outbounds": [ + { + "protocol": "freedom" + } + ] +} \ No newline at end of file diff --git a/clash_lib/Cargo.toml b/clash_lib/Cargo.toml index 97f2f0e3c..d3e46c803 100644 --- a/clash_lib/Cargo.toml +++ b/clash_lib/Cargo.toml @@ -124,7 +124,9 @@ ctor = "0.2" mockall = "0.12.1" tokio-test = "0.4.4" axum-macros = "0.4.0" - +bollard = "0.16" +serial_test = "3.0.0" +tracing-test = "0.2.4" [target.'cfg(macos)'.dependencies] security-framework = "2.8.0" diff --git a/clash_lib/build.rs b/clash_lib/build.rs new file mode 100644 index 000000000..aa8dfbf64 --- /dev/null +++ b/clash_lib/build.rs @@ -0,0 +1,5 @@ +fn main() { + if std::env::var("CLASH_RS_CI").is_ok() { + println!("cargo:rustc-cfg=ci"); + } +} diff --git a/clash_lib/src/proxy/shadowsocks/mod.rs b/clash_lib/src/proxy/shadowsocks/mod.rs index f3e42e743..ade423be0 100644 --- a/clash_lib/src/proxy/shadowsocks/mod.rs +++ b/clash_lib/src/proxy/shadowsocks/mod.rs @@ -287,3 +287,42 @@ impl OutboundHandler for Handler { Ok(Box::new(d)) } } + +#[cfg(all(test, not(ci)))] +mod tests { + + use crate::proxy::utils::test_utils::docker_runner::DockerTestRunnerBuilder; + + use super::super::utils::test_utils::{consts::*, docker_runner::DockerTestRunner, run}; + + use super::*; + + const PASSWORD: &str = "FzcLbKs2dY9mhL"; + const CIPHER: &str = "aes-256-gcm"; + + async fn get_runner() -> anyhow::Result { + DockerTestRunnerBuilder::new() + .image(IMAGE_SS_RUST) + .entrypoint(&["ssserver"]) + .cmd(&["-s", "0.0.0.0:10002", "-m", CIPHER, "-k", PASSWORD, "-U"]) + .build() + .await + } + + #[tokio::test] + #[serial_test::serial] + async fn test_ss() -> anyhow::Result<()> { + let opts = HandlerOptions { + name: "test-ss".to_owned(), + common_opts: Default::default(), + server: LOCAL_ADDR.to_owned(), + port: 10002, + password: PASSWORD.to_owned(), + cipher: CIPHER.to_owned(), + plugin_opts: Default::default(), + udp: false, + }; + let handler = Handler::new(opts); + run(handler, get_runner()).await + } +} diff --git a/clash_lib/src/proxy/trojan/mod.rs b/clash_lib/src/proxy/trojan/mod.rs index b11915dab..233b8b92e 100644 --- a/clash_lib/src/proxy/trojan/mod.rs +++ b/clash_lib/src/proxy/trojan/mod.rs @@ -219,3 +219,104 @@ impl OutboundHandler for Handler { Ok(Box::new(chained)) } } + +#[cfg(all(test, not(ci)))] +mod tests { + + use std::collections::HashMap; + + use tracing_test::traced_test; + + use crate::proxy::utils::test_utils::{ + config_helper::test_config_base_dir, + consts::*, + docker_runner::{DockerTestRunner, DockerTestRunnerBuilder}, + run, + }; + + use super::*; + + async fn get_ws_runner() -> anyhow::Result { + let test_config_dir = test_config_base_dir(); + let trojan_conf = test_config_dir.join("trojan-ws.json"); + let trojan_cert = test_config_dir.join("example.org.pem"); + let trojan_key = test_config_dir.join("example.org-key.pem"); + + DockerTestRunnerBuilder::new() + .image(IMAGE_TROJAN_GO) + .mounts(&[ + (trojan_conf.to_str().unwrap(), "/etc/trojan-go/config.json"), + (trojan_cert.to_str().unwrap(), "/fullchain.pem"), + (trojan_key.to_str().unwrap(), "/privkey.pem"), + ]) + .build() + .await + } + + #[tokio::test] + #[traced_test] + #[serial_test::serial] + async fn test_trojan_ws() -> anyhow::Result<()> { + let opts = Opts { + name: "test-trojan-ws".to_owned(), + common_opts: Default::default(), + server: "127.0.0.1".to_owned(), + port: 10002, + password: "example".to_owned(), + udp: true, + sni: "example.org".to_owned(), + alpn: None, + skip_cert_verify: true, + transport: Some(Transport::Ws(WsOption { + path: "".to_owned(), + headers: [("Host".to_owned(), "example.org".to_owned())] + .into_iter() + .collect::>(), + // ignore the rest by setting max_early_data to 0 + max_early_data: 0, + early_data_header_name: "".to_owned(), + })), + }; + let handler = Handler::new(opts); + run(handler, get_ws_runner()).await + } + + async fn get_grpc_runner() -> anyhow::Result { + let test_config_dir = test_config_base_dir(); + let conf = test_config_dir.join("trojan-grpc.json"); + let cert = test_config_dir.join("example.org.pem"); + let key = test_config_dir.join("example.org-key.pem"); + + DockerTestRunnerBuilder::new() + .image(IMAGE_XRAY) + .mounts(&[ + (conf.to_str().unwrap(), "/etc/xray/config.json"), + (cert.to_str().unwrap(), "/etc/ssl/v2ray/fullchain.pem"), + (key.to_str().unwrap(), "/etc/ssl/v2ray/privkey.pem"), + ]) + .build() + .await + } + + #[tokio::test] + #[serial_test::serial] + async fn test_trojan_grpc() -> anyhow::Result<()> { + let opts = Opts { + name: "test-trojan-grpc".to_owned(), + common_opts: Default::default(), + server: "127.0.0.1".to_owned(), + port: 10002, + password: "example".to_owned(), + udp: true, + sni: "example.org".to_owned(), + alpn: None, + skip_cert_verify: true, + transport: Some(Transport::Grpc(GrpcOption { + host: "example.org".to_owned(), + service_name: "example".to_owned(), + })), + }; + let handler = Handler::new(opts); + run(handler, get_grpc_runner()).await + } +} diff --git a/clash_lib/src/proxy/utils/mod.rs b/clash_lib/src/proxy/utils/mod.rs index 01b86bbd4..0c8d00027 100644 --- a/clash_lib/src/proxy/utils/mod.rs +++ b/clash_lib/src/proxy/utils/mod.rs @@ -3,6 +3,9 @@ use std::{ net::{IpAddr, SocketAddr}, }; +#[cfg(all(test, not(ci)))] +pub mod test_utils; + pub mod provider_helper; mod socket_helpers; diff --git a/clash_lib/src/proxy/utils/test_utils/config_helper.rs b/clash_lib/src/proxy/utils/test_utils/config_helper.rs new file mode 100644 index 000000000..e6c342713 --- /dev/null +++ b/clash_lib/src/proxy/utils/test_utils/config_helper.rs @@ -0,0 +1,59 @@ +use crate::Error; +use std::path::PathBuf; +use std::sync::Arc; +use tracing::debug; + +use crate::{ + app::{ + dns::{self, ClashResolver, SystemResolver}, + profile, + }, + common::{http::new_http_client, mmdb}, + Config, +}; + +pub fn root_dir() -> PathBuf { + let mut root = PathBuf::from(env!("CARGO_MANIFEST_DIR").to_owned()); + // remove the clash_lib + root.pop(); + root +} + +pub fn test_config_base_dir() -> PathBuf { + root_dir().join("clash/tests/data/config") +} + +// load the config from test dir +// and return the dns resolver for the proxy +pub async fn load_config() -> anyhow::Result<( + crate::config::internal::config::Config, + Arc, +)> { + let root = root_dir(); + let test_base_dir = test_config_base_dir(); + let config_path = test_base_dir.join("ss.yaml").to_str().unwrap().to_owned(); + let config = Config::File(config_path).try_parse()?; + let mmdb_path = test_base_dir.join("Country.mmdb"); + let system_resolver = + Arc::new(SystemResolver::new().map_err(|x| Error::DNSError(x.to_string()))?); + let client = new_http_client(system_resolver).map_err(|x| Error::DNSError(x.to_string()))?; + + let mmdb = Arc::new( + mmdb::Mmdb::new(mmdb_path, config.general.mmdb_download_url.clone(), client).await?, + ); + + debug!("initializing cache store"); + let cache_store = profile::ThreadSafeCacheFile::new( + PathBuf::from(root) + .join("cache.db") + .as_path() + .to_str() + .unwrap(), + config.profile.store_selected, + ); + + let dns_resolver: Arc = + dns::Resolver::new_resolver(&config.dns, cache_store.clone(), mmdb.clone()).await; + + Ok((config, dns_resolver)) +} diff --git a/clash_lib/src/proxy/utils/test_utils/consts.rs b/clash_lib/src/proxy/utils/test_utils/consts.rs new file mode 100644 index 000000000..600c9221d --- /dev/null +++ b/clash_lib/src/proxy/utils/test_utils/consts.rs @@ -0,0 +1,8 @@ +pub const LOCAL_ADDR: &str = "127.0.0.1"; +pub const EXAMPLE_REQ: &[u8] = b"GET / HTTP/1.1\r\nHost: example.com\r\nAccept: */*\r\n\r\n"; +pub const EXAMLE_RESP_200: &[u8] = b"HTTP/1.1 200"; + +pub const IMAGE_SS_RUST: &str = "ghcr.io/shadowsocks/ssserver-rust:latest"; +pub const IMAGE_TROJAN_GO: &str = "p4gefau1t/trojan-go:latest"; +pub const IMAGE_VMESS: &str = "v2fly/v2fly-core:v4.45.2"; +pub const IMAGE_XRAY: &str = "teddysun/xray:latest"; diff --git a/clash_lib/src/proxy/utils/test_utils/docker_runner.rs b/clash_lib/src/proxy/utils/test_utils/docker_runner.rs new file mode 100644 index 000000000..ac12ffc62 --- /dev/null +++ b/clash_lib/src/proxy/utils/test_utils/docker_runner.rs @@ -0,0 +1,217 @@ +use std::collections::HashMap; + +use bollard::container::{Config, RemoveContainerOptions}; +use bollard::secret::{HostConfig, Mount, PortBinding}; +use bollard::Docker; + +use bollard::image::CreateImageOptions; + +use anyhow::Result; +use futures::{Future, TryStreamExt}; + +const TIMEOUT_DURATION: u64 = 30; + +pub struct DockerTestRunner { + instance: Docker, + id: String, +} + +impl DockerTestRunner { + pub async fn new<'a>( + image_conf: Option>, + container_conf: Config, + ) -> Result { + let docker: Docker = Docker::connect_with_socket_defaults()?; + + docker + .create_image(image_conf, None, None) + .try_collect::>() + .await?; + + let id = docker + .create_container::<&str, String>(None, container_conf) + .await? + .id; + docker.start_container::(&id, None).await?; + Ok(Self { + instance: docker, + id, + }) + } + + // will make sure the container is cleaned up after the future is finished + pub async fn run_and_cleanup( + self, + f: impl Future>, + ) -> anyhow::Result<()> { + let fut = Box::pin(f); + // let res = fut.await; + // make sure the container is cleaned up + let res = tokio::select! { + res = fut => { + res + }, + _ = tokio::time::sleep(std::time::Duration::from_secs(TIMEOUT_DURATION))=> { + tracing::warn!("timeout"); + Err(anyhow::anyhow!("timeout")) + } + }; + + self.cleanup().await?; + + res + } + + // you can run the cleanup manually + pub async fn cleanup(self) -> anyhow::Result<()> { + let s = self + .instance + .remove_container( + &self.id, + Some(RemoveContainerOptions { + force: true, + ..Default::default() + }), + ) + .await?; + Ok(s) + } +} + +const PORT: u16 = 10002; +const EXPOSED_TCP: &str = "10002/tcp"; +const EXPOSED_UDP: &str = "10002/udp"; +const EXPOSED_PORTS: &[&str] = &[EXPOSED_TCP, EXPOSED_UDP]; + +#[derive(Debug)] +pub struct DockerTestRunnerBuilder { + image: String, + host_config: HostConfig, + exposed_ports: Vec, + cmd: Option>, + entrypoint: Option>, + _server_port: u16, +} + +impl Default for DockerTestRunnerBuilder { + fn default() -> Self { + Self { + image: "hello-world".to_string(), + host_config: get_host_config(PORT), + exposed_ports: EXPOSED_PORTS + .iter() + .map(|x| x.to_string()) + .collect::>(), + cmd: None, + entrypoint: None, + _server_port: PORT, + } + } +} + +impl DockerTestRunnerBuilder { + pub fn new() -> Self { + Default::default() + } + + pub fn image(mut self, image: &str) -> Self { + self.image = image.to_string(); + self + } + + #[allow(unused)] + pub fn port(mut self, port: u16) -> Self { + self._server_port = port; + self.exposed_ports = vec![format!("{}/tcp", port), format!("{}/udp", port)]; + let mounts = self.host_config.mounts.take(); + self.host_config = get_host_config(port); + self.host_config.mounts = mounts; + + self + } + + pub fn cmd(mut self, cmd: &[&str]) -> Self { + self.cmd = Some(cmd.iter().map(|x| x.to_string()).collect()); + self + } + + pub fn entrypoint(mut self, entrypoint: &[&str]) -> Self { + self.entrypoint = Some(entrypoint.iter().map(|x| x.to_string()).collect()); + self + } + + pub fn mounts(mut self, pairs: &[(&str, &str)]) -> Self { + self.host_config.mounts = Some( + pairs + .into_iter() + .map(|(src, dst)| Mount { + target: Some(dst.to_string()), + source: Some(src.to_string()), + typ: Some(bollard::secret::MountTypeEnum::BIND), + read_only: Some(true), + ..Default::default() + }) + .collect::>(), + ); + + self + } + + pub async fn build(self) -> anyhow::Result { + tracing::trace!("building docker test runner: {:?}", &self); + let exposed = self + .exposed_ports + .into_iter() + .map(|x| (x, Default::default())) + .collect::>(); + + DockerTestRunner::new( + Some(CreateImageOptions { + from_image: self.image.clone(), + ..Default::default() + }), + Config { + image: Some(self.image), + tty: Some(true), + entrypoint: self.entrypoint, + cmd: self.cmd, + exposed_ports: Some(exposed), + host_config: Some(self.host_config), + ..Default::default() + }, + ) + .await + .map_err(Into::into) + } +} + +pub fn get_host_config(port: u16) -> HostConfig { + let mut host_config = HostConfig::default(); + // we need to use the host mode to enable the benchmark function + #[cfg(not(target_os = "macos"))] + { + host_config.network_mode = Some("host".to_owned()); + } + host_config.port_bindings = Some( + [ + ( + (format!("{}/tcp", port)), + Some(vec![PortBinding { + host_ip: Some("0.0.0.0".to_owned()), + host_port: Some(format!("{}", port)), + }]), + ), + ( + (format!("{}/udp", port)), + Some(vec![PortBinding { + host_ip: Some("0.0.0.0".to_owned()), + host_port: Some(format!("{}", port)), + }]), + ), + ] + .into_iter() + .collect::>(), + ); + + host_config +} diff --git a/clash_lib/src/proxy/utils/test_utils/mod.rs b/clash_lib/src/proxy/utils/test_utils/mod.rs new file mode 100644 index 000000000..d61905bb7 --- /dev/null +++ b/clash_lib/src/proxy/utils/test_utils/mod.rs @@ -0,0 +1,220 @@ +use std::{ + sync::Arc, + time::{Duration, Instant}, +}; + +use crate::{ + app::dispatcher::ChainedStream, + proxy::OutboundHandler, + session::{Session, SocksAddr}, +}; +use futures::{future::select_all, Future}; +use tokio::{ + io::{split, AsyncRead, AsyncReadExt, AsyncWrite, AsyncWriteExt}, + net::TcpListener, +}; +use tracing::info; + +use self::docker_runner::DockerTestRunner; + +pub mod config_helper; +pub mod consts; +pub mod docker_runner; + +// TODO: add the throughput metrics +pub async fn ping_pong_test(handler: Arc, port: u16) -> anyhow::Result<()> { + // PATH: our proxy handler -> proxy-server(container) -> target local server(127.0.0.1:port) + + let sess = Session { + destination: ("127.0.0.1".to_owned(), port) + .try_into() + .unwrap_or_else(|_| panic!("")), + ..Default::default() + }; + + let (_, resolver) = config_helper::load_config().await?; + + let listener = TcpListener::bind(format!("0.0.0.0:{}", port).as_str()).await?; + + info!("target local server started at: {}", listener.local_addr()?); + + async fn destination_fn(incoming: T) -> anyhow::Result<()> + where + T: AsyncRead + AsyncWrite, + { + // Use inbound_stream here + let (mut read_half, mut write_half) = split(incoming); + let chunk = "world"; + let mut buf = vec![0; 5]; + + tracing::info!("destination_fn start read"); + + for _ in 0..100 { + read_half.read_exact(&mut buf).await?; + assert_eq!(&buf, b"hello"); + } + + tracing::info!("destination_fn start write"); + + for _ in 0..100 { + write_half.write_all(chunk.as_bytes()).await?; + write_half.flush().await?; + } + + tracing::info!("destination_fn end"); + Ok(()) + } + + let target_local_server_handler = tokio::spawn(async move { + loop { + let (stream, _) = listener.accept().await?; + + tracing::info!("Accepted connection from: {}", stream.peer_addr().unwrap()); + destination_fn(stream).await? + } + }); + + async fn proxy_fn(stream: Box) -> anyhow::Result<()> { + let (mut read_half, mut write_half) = split(stream); + + let chunk = "hello"; + let mut buf = vec![0; 5]; + + tracing::info!("proxy_fn start write"); + + for _ in 0..100 { + write_half + .write_all(chunk.as_bytes()) + .await + .inspect_err(|x| { + tracing::error!("proxy_fn write error: {}", x); + })?; + } + write_half.flush().await?; + + tracing::info!("proxy_fn start read"); + + for _ in 0..100 { + read_half.read_exact(&mut buf).await.inspect_err(|x| { + tracing::error!("proxy_fn read error: {}", x); + })?; + assert_eq!(buf, "world".as_bytes().to_owned()); + } + + tracing::info!("proxy_fn end"); + + Ok(()) + } + + let proxy_task = tokio::spawn(async move { + // give some time for the target local server to start + tokio::time::sleep(Duration::from_secs(3)).await; + + match handler.connect_stream(&sess, resolver).await { + Ok(stream) => proxy_fn(stream).await, + Err(e) => { + tracing::error!("Failed to proxy connection: {}", e); + Err(anyhow!("Failed to proxy connection: {}", e)) + } + } + }); + + let futs = vec![proxy_task, target_local_server_handler]; + + select_all(futs).await.0? +} + +/// Represents the options for a latency test. +pub struct LatencyTestOption<'a> { + /// The destination address for the test. + pub dst: SocksAddr, + /// The request data for the test. + pub req: &'a [u8], + /// The expected response data for the test. + pub expected_resp: &'a [u8], + /// Indicates whether to read the exact amount of data specified by `expected_resp`. + pub read_exact: bool, +} + +// latency test of the proxy +pub async fn latency_test( + handler: Arc, + option: LatencyTestOption<'_>, +) -> anyhow::Result { + // our proxy handler -> proxy-server -> destination(google.com) + + let sess = Session { + destination: option.dst, + ..Default::default() + }; + + let (_, resolver) = config_helper::load_config().await?; + + let stream = handler.connect_stream(&sess, resolver).await?; + + let (mut read_half, mut write_half) = split(stream); + + write_half.write_all(option.req).await?; + write_half.flush().await?; + drop(write_half); + + let start_time = Instant::now(); + let mut response = vec![0; option.expected_resp.len()]; + + if option.read_exact { + read_half.read_exact(&mut response).await?; + tracing::debug!("response:\n{}", String::from_utf8_lossy(&response)); + assert_eq!(&response, option.expected_resp); + } else { + read_half.read_to_end(&mut response).await?; + tracing::debug!("response:\n{}", String::from_utf8_lossy(&response)); + assert_eq!(&response, option.expected_resp); + } + + let end_time = Instant::now(); + tracing::debug!("time cost:{:?}", end_time.duration_since(start_time)); + Ok(end_time.duration_since(start_time)) +} + +pub async fn run( + handler: Arc, + runner_creater: impl Future>, +) -> anyhow::Result<()> { + let watch = match runner_creater.await { + Ok(runner) => runner, + Err(e) => { + tracing::warn!("cannot start container, please check the docker environment"); + return Err(e); + } + }; + + watch + .run_and_cleanup(async move { + let rv = ping_pong_test(handler.clone(), 10001).await; + if rv.is_err() { + tracing::error!("ping_pong_test failed: {:?}", rv); + return rv; + } else { + tracing::info!("ping_pong_test success"); + } + + let rv = latency_test( + handler, + LatencyTestOption { + dst: SocksAddr::Domain("example.com".to_owned(), 80), + req: consts::EXAMPLE_REQ, + expected_resp: consts::EXAMLE_RESP_200, + read_exact: true, + }, + ) + .await; + if rv.is_err() { + return Err(rv.unwrap_err()); + } else { + tracing::info!("latency test success: {}", rv.unwrap().as_millis()); + } + + return Ok(()); + }) + .await +} diff --git a/clash_lib/src/proxy/vmess/mod.rs b/clash_lib/src/proxy/vmess/mod.rs index 327996a50..c600a0efc 100644 --- a/clash_lib/src/proxy/vmess/mod.rs +++ b/clash_lib/src/proxy/vmess/mod.rs @@ -2,6 +2,7 @@ use std::{collections::HashMap, io, net::IpAddr, sync::Arc}; use async_trait::async_trait; use futures::TryFutureExt; +use tracing::debug; mod vmess_impl; @@ -168,6 +169,7 @@ impl OutboundHandler for Handler { sess: &Session, resolver: ThreadSafeDNSResolver, ) -> io::Result { + debug!("Connecting to {} via VMess", sess); let stream = new_tcp_stream( resolver, self.opts.server.as_str(), @@ -250,3 +252,143 @@ impl OutboundHandler for Handler { Ok(Box::new(chained)) } } + +#[cfg(all(test, not(ci)))] +mod tests { + + use tracing_test::traced_test; + + use crate::proxy::utils::test_utils::{ + config_helper::test_config_base_dir, + consts::*, + docker_runner::{DockerTestRunner, DockerTestRunnerBuilder}, + run, + }; + + use super::*; + + async fn get_ws_runner() -> anyhow::Result { + let test_config_dir = test_config_base_dir(); + let vmess_ws_conf = test_config_dir.join("vmess-ws.json"); + + DockerTestRunnerBuilder::new() + .image(IMAGE_VMESS) + .mounts(&[(vmess_ws_conf.to_str().unwrap(), "/etc/v2ray/config.json")]) + .build() + .await + } + + #[tokio::test] + #[traced_test] + #[serial_test::serial] + async fn test_vmess_ws() -> anyhow::Result<()> { + let opts = HandlerOptions { + name: "test-vmess-ws".into(), + common_opts: Default::default(), + server: LOCAL_ADDR.into(), + port: 10002, + uuid: "b831381d-6324-4d53-ad4f-8cda48b30811".into(), + alter_id: 0, + security: "none".into(), + udp: true, + tls: None, + transport: Some(VmessTransport::Ws(WsOption { + path: "".to_owned(), + headers: [("Host".to_owned(), "example.org".to_owned())] + .into_iter() + .collect::>(), + // ignore the rest by setting max_early_data to 0 + max_early_data: 0, + early_data_header_name: "".to_owned(), + })), + }; + let handler = Handler::new(opts); + run(handler, get_ws_runner()).await + } + + async fn get_grpc_runner() -> anyhow::Result { + let test_config_dir = test_config_base_dir(); + let conf = test_config_dir.join("vmess-grpc.json"); + let cert = test_config_dir.join("example.org.pem"); + let key = test_config_dir.join("example.org-key.pem"); + + DockerTestRunnerBuilder::new() + .image(IMAGE_VMESS) + .mounts(&[ + (conf.to_str().unwrap(), "/etc/v2ray/config.json"), + (cert.to_str().unwrap(), "/etc/ssl/v2ray/fullchain.pem"), + (key.to_str().unwrap(), "/etc/ssl/v2ray/privkey.pem"), + ]) + .build() + .await + } + + #[tokio::test] + #[serial_test::serial] + async fn test_vmess_grpc() -> anyhow::Result<()> { + let opts = HandlerOptions { + name: "test-vmess-grpc".into(), + common_opts: Default::default(), + server: LOCAL_ADDR.into(), + port: 10002, + uuid: "b831381d-6324-4d53-ad4f-8cda48b30811".into(), + alter_id: 0, + security: "auto".into(), + udp: true, + tls: Some(transport::TLSOptions { + skip_cert_verify: true, + sni: "example.org".into(), + alpn: None, + }), + transport: Some(VmessTransport::Grpc(GrpcOption { + host: "example.org".to_owned(), + service_name: "example!".to_owned(), + })), + }; + let handler = Handler::new(opts); + run(handler, get_grpc_runner()).await + } + + async fn get_h2_runner() -> anyhow::Result { + let test_config_dir = test_config_base_dir(); + let conf = test_config_dir.join("vmess-http2.json"); + let cert = test_config_dir.join("example.org.pem"); + let key = test_config_dir.join("example.org-key.pem"); + + DockerTestRunnerBuilder::new() + .image(IMAGE_VMESS) + .mounts(&[ + (conf.to_str().unwrap(), "/etc/v2ray/config.json"), + (cert.to_str().unwrap(), "/etc/ssl/v2ray/fullchain.pem"), + (key.to_str().unwrap(), "/etc/ssl/v2ray/privkey.pem"), + ]) + .build() + .await + } + + #[tokio::test] + #[serial_test::serial] + async fn test_vmess_h2() -> anyhow::Result<()> { + let opts = HandlerOptions { + name: "test-vmess-h2".into(), + common_opts: Default::default(), + server: LOCAL_ADDR.into(), + port: 10002, + uuid: "b831381d-6324-4d53-ad4f-8cda48b30811".into(), + alter_id: 0, + security: "auto".into(), + udp: false, + tls: Some(transport::TLSOptions { + skip_cert_verify: true, + sni: "example.org".into(), + alpn: None, + }), + transport: Some(VmessTransport::H2(Http2Option { + host: vec!["example.org".into()], + path: "/testlollol".into(), + })), + }; + let handler = Handler::new(opts); + run(handler, get_h2_runner()).await + } +}