diff --git a/Cargo.lock b/Cargo.lock index 528da1d52..3493afdbe 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -62,7 +62,7 @@ dependencies = [ "cfg-if", "once_cell", "version_check", - "zerocopy", + "zerocopy 0.7.35", ] [[package]] @@ -248,7 +248,7 @@ dependencies = [ "libc", "once_cell", "postage", - "rand", + "rand 0.8.5", "safelog", "serde", "thiserror 2.0.11", @@ -305,7 +305,7 @@ checksum = "965c2d33e53cb6b267e148a4cb0760bc01f4904c1cd4bb4002a085bb016d1490" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", "synstructure", ] @@ -317,7 +317,7 @@ checksum = "7b18050c2cd6fe86c3a76584ef5e0baf286d038cda203eb6223df2cc413565f7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -341,7 +341,7 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -363,18 +363,18 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] name = "async-trait" -version = "0.1.85" +version = "0.1.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f934833b4b7233644e5848f235df3f57ed8c80f1528a26c3dfa13d2147fa056" +checksum = "644dd749086bf3771a2fbc5f256fdb982d53f011c7d5d560304eafeecebce79d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -544,7 +544,7 @@ checksum = "604fde5e028fea851ce1d8570bbdc034bec850d157f7569d10f347d06808c05c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -611,7 +611,7 @@ dependencies = [ "regex", "rustc-hash 1.1.0", "shlex", - "syn 2.0.96", + "syn 2.0.98", "which", ] @@ -632,7 +632,7 @@ dependencies = [ "regex", "rustc-hash 1.1.0", "shlex", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -689,7 +689,7 @@ checksum = "e0b121a9fe0df916e362fb3271088d071159cdf11db0e4182d02152850756eff" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -761,7 +761,7 @@ dependencies = [ "libc", "nix", "parking_lot", - "rand_core", + "rand_core 0.6.4", "ring 0.17.8", "tracing", "untrusted 0.9.0", @@ -808,9 +808,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.16.0" +version = "3.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" +checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" [[package]] name = "by_address" @@ -838,9 +838,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" +checksum = "f61dac84819c6588b558454b194026eb1f09c293b9036ae9b159e74e73ab6cf9" [[package]] name = "c2rust-bitfields" @@ -886,9 +886,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.2.10" +version = "1.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13208fcbb66eaeffe09b99fffbe1af420f00a7b35aa99ad683dfc1aa76145229" +checksum = "c7777341816418c02e033934a09f20dc0ccaf65a5201ef8a450ae0105a573fda" dependencies = [ "shlex", ] @@ -1013,9 +1013,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.27" +version = "4.5.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "769b0145982b4b48713e01ec42d61614425f27b7058bda7180a3a41f30104796" +checksum = "3e77c3243bd94243c03672cb5154667347c457ca271254724f9f393aee1c05ff" dependencies = [ "clap_builder", "clap_derive", @@ -1035,14 +1035,14 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.24" +version = "4.5.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54b755194d6389280185988721fffba69495eed5ee9feeee9a599b53db80318c" +checksum = "bf4ced95c6f4a675af3da73304b9ac4ed991640c36374e4b46795c49e17cf1ed" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -1143,7 +1143,7 @@ dependencies = [ "public-suffix", "quinn", "quinn-proto", - "rand", + "rand 0.9.0", "regex", "register-count", "ring-compat", @@ -1305,9 +1305,9 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" dependencies = [ "libc", ] @@ -1428,7 +1428,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" dependencies = [ "generic-array", - "rand_core", + "rand_core 0.6.4", "subtle", "zeroize", ] @@ -1440,7 +1440,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array", - "rand_core", + "rand_core 0.6.4", "typenum", ] @@ -1477,7 +1477,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -1525,7 +1525,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.11.1", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -1547,14 +1547,14 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core 0.20.10", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] name = "data-encoding" -version = "2.7.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e60eed09d8c01d3cee5b7d30acb059b76614c918fa0f992e0dd6eeb10daad6f" +checksum = "575f75dfd25738df5b91b8e43e14d44bda14637a58fae779fd2b064f8bf3e010" [[package]] name = "defmt" @@ -1576,7 +1576,7 @@ dependencies = [ "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -1647,7 +1647,7 @@ dependencies = [ "quote", "sha3", "strum", - "syn 2.0.96", + "syn 2.0.98", "void", ] @@ -1700,7 +1700,7 @@ dependencies = [ "convert_case", "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", "unicode-xid", ] @@ -1729,7 +1729,7 @@ dependencies = [ "dhcproto-macros", "hex", "ipnet", - "rand", + "rand 0.8.5", "thiserror 1.0.69", "trust-dns-proto", "url", @@ -1791,7 +1791,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -1814,9 +1814,9 @@ checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" [[package]] name = "dyn-clone" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" +checksum = "feeef44e73baff3a26d371801df019877a9866a8c493d315ab00177843314f35" [[package]] name = "dynosaur" @@ -1836,7 +1836,7 @@ checksum = "16c187d1e575ef546d24f0fcd7701cc04abfe6b5e7e2758aabc450b99e835ac3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -1872,7 +1872,7 @@ dependencies = [ "curve25519-dalek", "ed25519", "merlin", - "rand_core", + "rand_core 0.6.4", "serde", "sha2", "subtle", @@ -1910,7 +1910,7 @@ dependencies = [ "generic-array", "group", "pkcs8", - "rand_core", + "rand_core 0.6.4", "sec1", "subtle", "zeroize", @@ -1943,7 +1943,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -1956,7 +1956,7 @@ dependencies = [ "num-traits", "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -2053,7 +2053,7 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" dependencies = [ - "rand_core", + "rand_core 0.6.4", "subtle", ] @@ -2234,7 +2234,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -2324,6 +2324,18 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "getrandom" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a49c392881ce6d5c3b8cb70f98717b7c07aabbdff06687b9030dbfbe2725f8" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.13.3+wasi-0.2.2", + "windows-targets 0.52.6", +] + [[package]] name = "ghash" version = "0.5.1" @@ -2359,7 +2371,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ "ff", - "rand_core", + "rand_core 0.6.4", "subtle", ] @@ -2509,9 +2521,9 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hickory-client" -version = "0.25.0-alpha.4" +version = "0.25.0-alpha.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83536dab9a159b2b5cf2c20c47ecf188cee35316f96be028e63e8e1340d2724d" +checksum = "aba7b17856dc1b69706dcf163cfcf2a768de2e4a15aa41ac2a4b99896c6e4968" dependencies = [ "cfg-if", "data-encoding", @@ -2520,7 +2532,7 @@ dependencies = [ "hickory-proto", "once_cell", "radix_trie", - "rand", + "rand 0.9.0", "thiserror 2.0.11", "tokio", "tracing", @@ -2528,9 +2540,9 @@ dependencies = [ [[package]] name = "hickory-proto" -version = "0.25.0-alpha.4" +version = "0.25.0-alpha.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d063c0692ee669aa6d261988aa19ca5510f1cc40e4f211024f50c888499a35d7" +checksum = "1d00147af6310f4392a31680db52a3ed45a2e0f68eb18e8c3fe5537ecc96d9e2" dependencies = [ "async-recursion", "async-trait", @@ -2551,9 +2563,10 @@ dependencies = [ "once_cell", "pin-project-lite", "quinn", - "rand", + "rand 0.9.0", "ring 0.17.8", "rustls", + "rustls-pki-types", "serde", "thiserror 2.0.11", "time", @@ -2578,7 +2591,7 @@ dependencies = [ "once_cell", "parking_lot", "quinn", - "rand", + "rand 0.8.5", "resolv-conf", "rustls", "serde", @@ -2705,9 +2718,9 @@ checksum = "9171a2ea8a68358193d15dd5d70c1c10a2afc3e7e4c5bc92bc9f025cebd7359c" [[package]] name = "httparse" -version = "1.9.5" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" +checksum = "f2d708df4e7140240a16cd6ab0ab65c972d7433ab77819ea693fde9c43811e2a" [[package]] name = "httpdate" @@ -2733,9 +2746,9 @@ dependencies = [ [[package]] name = "hyper" -version = "1.5.2" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "256fb8d4bd6413123cc9d91832d78325c48ff41677595be797d90f42969beae0" +checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80" dependencies = [ "bytes", "futures-channel", @@ -2969,7 +2982,7 @@ checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -3078,9 +3091,9 @@ dependencies = [ [[package]] name = "inventory" -version = "0.3.17" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b31349d02fe60f80bbbab1a9402364cad7460626d6030494b08ac4a2075bf81" +checksum = "54b12ebb6799019b044deaf431eadfe23245b259bba5a2c0796acec3943a3cdb" dependencies = [ "rustversion", ] @@ -3450,7 +3463,7 @@ checksum = "58c38e2799fc0978b65dfff8023ec7843e2330bb462f19198840b34b6582397d" dependencies = [ "byteorder", "keccak", - "rand_core", + "rand_core 0.6.4", "zeroize", ] @@ -3526,7 +3539,7 @@ dependencies = [ "cfg-if", "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -3678,7 +3691,7 @@ dependencies = [ "num-integer", "num-iter", "num-traits", - "rand", + "rand 0.8.5", "smallvec", "zeroize", ] @@ -3737,7 +3750,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -3751,9 +3764,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.20.2" +version = "1.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" +checksum = "945462a4b81e43c4e3ba96bd7b49d834c6f61198356aa858733bc4acf3cbe62e" [[package]] name = "oneshot-fused-workaround" @@ -3849,7 +3862,7 @@ dependencies = [ "glob", "opentelemetry", "percent-encoding", - "rand", + "rand 0.8.5", "serde_json", "thiserror 1.0.69", "tokio", @@ -3900,9 +3913,9 @@ dependencies = [ [[package]] name = "p384" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70786f51bcc69f6a4c0360e063a4cac5419ef7c5cd5b3c99ad70f3be5ba79209" +checksum = "fe42f1670a52a47d448f14b6a5c61dd78fce51856e68edaa38f7ae3a46b8d6b6" dependencies = [ "ecdsa", "elliptic-curve", @@ -3920,7 +3933,7 @@ dependencies = [ "ecdsa", "elliptic-curve", "primeorder", - "rand_core", + "rand_core 0.6.4", "sha2", ] @@ -4001,7 +4014,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" dependencies = [ "phf_shared", - "rand", + "rand 0.8.5", ] [[package]] @@ -4014,7 +4027,7 @@ dependencies = [ "phf_shared", "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -4028,22 +4041,22 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.1.8" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e2ec53ad785f4d35dac0adea7f7dc6f1bb277ad84a680c7afefeae05d1f5916" +checksum = "dfe2e71e1471fe07709406bf725f710b02927c9c54b2b5b2ec0e8087d97c327d" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.8" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d56a66c0c55993aa927429d0f8a0abfd74f084e4d9c192cffed01e418d83eefb" +checksum = "f6e859e6e5bd50440ab63c47e3ebabc90f26251f7c73c3d3e837b74a1cc3fa67" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -4169,7 +4182,7 @@ version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" dependencies = [ - "zerocopy", + "zerocopy 0.7.35", ] [[package]] @@ -4215,7 +4228,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6924ced06e1f7dfe3fa48d57b9f74f55d8915f5036121bef647ef4b204895fac" dependencies = [ "proc-macro2", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -4229,9 +4242,9 @@ dependencies = [ [[package]] name = "priority-queue" -version = "2.1.1" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "714c75db297bc88a63783ffc6ab9f830698a6705aa0201416931759ef4c8183d" +checksum = "090ded312ed32a928fb49cb91ab4db6523ae3767225e61fbf6ceaaec3664ed26" dependencies = [ "autocfg", "equivalent", @@ -4266,7 +4279,7 @@ dependencies = [ "proc-macro-error-attr2", "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -4304,7 +4317,7 @@ dependencies = [ "prost", "prost-types", "regex", - "syn 2.0.96", + "syn 2.0.98", "tempfile", ] @@ -4318,7 +4331,7 @@ dependencies = [ "itertools 0.13.0", "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -4381,7 +4394,7 @@ dependencies = [ "pin-project-lite", "quinn-proto", "quinn-udp", - "rustc-hash 2.1.0", + "rustc-hash 2.1.1", "rustls", "socket2 0.5.8", "thiserror 2.0.11", @@ -4396,10 +4409,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2fe5ef3495d7d2e377ff17b1a8ce2ee2ec2a18cde8b6ad6619d65d0701c135d" dependencies = [ "bytes", - "getrandom", - "rand", + "getrandom 0.2.15", + "rand 0.8.5", "ring 0.17.8", - "rustc-hash 2.1.0", + "rustc-hash 2.1.1", "rustls", "rustls-pki-types", "slab", @@ -4455,8 +4468,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", - "rand_chacha", - "rand_core", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3779b94aeb87e8bd4e834cee3650289ee9e0d5677f976ecdb6d219e5f4f6cd94" +dependencies = [ + "rand_chacha 0.9.0", + "rand_core 0.9.0", + "zerocopy 0.8.17", ] [[package]] @@ -4466,7 +4490,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core 0.9.0", ] [[package]] @@ -4475,7 +4509,17 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom", + "getrandom 0.2.15", +] + +[[package]] +name = "rand_core" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b08f3c9802962f7e1b25113931d94f43ed9725bebc59db9d0c3e9a23b67e15ff" +dependencies = [ + "getrandom 0.3.1", + "zerocopy 0.8.17", ] [[package]] @@ -4522,7 +4566,7 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ - "getrandom", + "getrandom 0.2.15", "libredox", "thiserror 1.0.69", ] @@ -4626,7 +4670,7 @@ checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", "cfg-if", - "getrandom", + "getrandom 0.2.15", "libc", "spin 0.9.8", "untrusted 0.9.0", @@ -4647,7 +4691,7 @@ dependencies = [ "p256", "p384", "pkcs8", - "rand_core", + "rand_core 0.6.4", "ring 0.17.8", "signature", ] @@ -4665,7 +4709,7 @@ dependencies = [ "num-traits", "pkcs1", "pkcs8", - "rand_core", + "rand_core 0.6.4", "sha2", "signature", "spki", @@ -4702,9 +4746,9 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustc-hash" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7fb8039b3032c191086b10f11f319a6e99e1e82889c5cc6046f515c9db1d497" +checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" [[package]] name = "rustc_version" @@ -4762,9 +4806,9 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.10.1" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2bf47e6ff922db3825eb750c4e2ff784c6ff8fb9e13046ef6a1d1c5401b0b37" +checksum = "917ce264624a4b4db1c364dcc35bfca9ded014d0a958cd47ad3e960e988ea51c" dependencies = [ "web-time", ] @@ -4788,9 +4832,9 @@ checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4" [[package]] name = "ryu" -version = "1.0.18" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" +checksum = "6ea1a2d0a644769cc99faa24c3ad26b379b786fe7c36fd3c546254801650e6dd" [[package]] name = "safelog" @@ -4825,9 +4869,9 @@ dependencies = [ [[package]] name = "scc" -version = "2.3.0" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28e1c91382686d21b5ac7959341fcb9780fa7c03773646995a87c950fa7be640" +checksum = "ea091f6cac2595aa38993f04f4ee692ed43757035c36e67c180b6828356385b1" dependencies = [ "sdd", ] @@ -4846,9 +4890,9 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "sdd" -version = "3.0.5" +version = "3.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "478f121bb72bbf63c52c93011ea1791dca40140dfe13f8336c4c5ac952c33aa9" +checksum = "b07779b9b918cc05650cb30f404d4d7835d26df37c235eded8a6832e2fb82cca" [[package]] name = "sec1" @@ -4930,7 +4974,7 @@ checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -4944,9 +4988,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.137" +version = "1.0.138" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "930cfb6e6abf99298aaad7d29abbef7a9999a9a8806a40088f55f0dcec03146b" +checksum = "d434192e7da787e94a6ea7e9670b26a036d0ca41e0b7efb2676dd32bae872949" dependencies = [ "itoa", "memchr", @@ -4972,7 +5016,7 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -5023,7 +5067,7 @@ dependencies = [ "darling 0.20.10", "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -5061,7 +5105,7 @@ checksum = "5d69265a08751de7844521fd15003ae0a888e035773ba05695c5c759a6f89eef" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -5119,7 +5163,7 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project", - "rand", + "rand 0.8.5", "sendfd", "serde", "serde_json", @@ -5152,7 +5196,7 @@ dependencies = [ "ctr", "hkdf", "md-5", - "rand", + "rand 0.8.5", "ring-compat", "sha1", ] @@ -5199,7 +5243,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ "digest", - "rand_core", + "rand_core 0.6.4", ] [[package]] @@ -5336,7 +5380,7 @@ dependencies = [ "p256", "p384", "p521", - "rand_core", + "rand_core 0.6.4", "rsa", "sec1", "sha2", @@ -5390,7 +5434,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -5412,9 +5456,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.96" +version = "2.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5d0adab1ae378d7f53bdebc67a39f1f151407ef230f0ce2883572f5d8985c80" +checksum = "36147f1a48ae0ec2b5b3bc5b537d267457555a10dc06f3dbc8cb11ba3006d3b1" dependencies = [ "proc-macro2", "quote", @@ -5435,7 +5479,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -5452,13 +5496,13 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tempfile" -version = "3.15.0" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a8a559c81686f576e8cd0290cd2a24a2a9ad80c98b3478856500fcbd7acd704" +checksum = "38c246215d7d24f48ae091a2902398798e05d978b24315d6efbc00ede9a8bb91" dependencies = [ "cfg-if", "fastrand", - "getrandom", + "getrandom 0.3.1", "once_cell", "rustix", "windows-sys 0.59.0", @@ -5496,7 +5540,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -5507,7 +5551,7 @@ checksum = "26afc1baea8a989337eeb52b6e72a039780ce45c3edfcc9c5b9d112feeb173c2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -5628,7 +5672,7 @@ checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -5710,9 +5754,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.19" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" +checksum = "cd87a5cdd6ffab733b2f74bc4fd7ee5fff6634124999ac278c35fc78c6120148" dependencies = [ "serde", "serde_spanned", @@ -5731,9 +5775,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.22" +version = "0.22.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" +checksum = "02a8b472d1a3d7c18e2d61a489aee3453fd9031c33e4f55bd533f4a7adca1bee" dependencies = [ "indexmap 2.7.1", "serde", @@ -5799,8 +5843,8 @@ dependencies = [ "itertools 0.14.0", "libc", "paste", - "rand", - "rand_chacha", + "rand 0.8.5", + "rand_chacha 0.3.1", "serde", "slab", "smallvec", @@ -5817,7 +5861,7 @@ dependencies = [ "derive-deftly", "digest", "educe", - "getrandom", + "getrandom 0.2.15", "safelog", "thiserror 2.0.11", "tor-error", @@ -5839,7 +5883,7 @@ dependencies = [ "derive_more", "educe", "paste", - "rand", + "rand 0.8.5", "smallvec", "thiserror 2.0.11", "tor-basic-utils", @@ -5883,7 +5927,7 @@ dependencies = [ "futures", "oneshot-fused-workaround", "postage", - "rand", + "rand 0.8.5", "safelog", "serde", "thiserror 2.0.11", @@ -5937,7 +5981,7 @@ dependencies = [ "once_cell", "oneshot-fused-workaround", "pin-project", - "rand", + "rand 0.8.5", "retry-error", "safelog", "serde", @@ -6077,7 +6121,7 @@ dependencies = [ "oneshot-fused-workaround", "paste", "postage", - "rand", + "rand 0.8.5", "rusqlite", "safelog", "scopeguard", @@ -6154,7 +6198,7 @@ dependencies = [ "oneshot-fused-workaround", "pin-project", "postage", - "rand", + "rand 0.8.5", "safelog", "serde", "strum", @@ -6190,7 +6234,7 @@ dependencies = [ "itertools 0.14.0", "oneshot-fused-workaround", "postage", - "rand", + "rand 0.8.5", "retry-error", "safelog", "slotmap-careful", @@ -6230,7 +6274,7 @@ dependencies = [ "digest", "itertools 0.14.0", "paste", - "rand", + "rand 0.8.5", "safelog", "signature", "subtle", @@ -6255,7 +6299,7 @@ dependencies = [ "derive_more", "downcast-rs", "paste", - "rand", + "rand 0.8.5", "signature", "ssh-key", "thiserror 2.0.11", @@ -6283,7 +6327,7 @@ dependencies = [ "humantime", "inventory", "itertools 0.14.0", - "rand", + "rand 0.8.5", "serde", "signature", "ssh-key", @@ -6344,9 +6388,9 @@ dependencies = [ "digest", "ed25519-dalek", "educe", - "getrandom", + "getrandom 0.2.15", "hex", - "rand_core", + "rand_core 0.6.4", "rsa", "safelog", "serde", @@ -6421,7 +6465,7 @@ dependencies = [ "humantime", "itertools 0.14.0", "num_enum", - "rand", + "rand 0.8.5", "serde", "static_assertions", "strum", @@ -6458,7 +6502,7 @@ dependencies = [ "itertools 0.14.0", "once_cell", "phf", - "rand", + "rand 0.8.5", "serde", "serde_with", "signature", @@ -6531,8 +6575,8 @@ dependencies = [ "hmac", "oneshot-fused-workaround", "pin-project", - "rand", - "rand_core", + "rand 0.8.5", + "rand_core 0.6.4", "safelog", "slotmap-careful", "subtle", @@ -6578,7 +6622,7 @@ version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2bc9f6f400d52990361bbbda30576895af10efa723c1e25b07b2468e5c5edad" dependencies = [ - "rand", + "rand 0.8.5", "serde", "tor-basic-utils", "tor-linkspec", @@ -6682,7 +6726,7 @@ dependencies = [ "indexmap 1.9.3", "pin-project", "pin-project-lite", - "rand", + "rand 0.8.5", "slab", "tokio", "tokio-util", @@ -6776,7 +6820,7 @@ checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -6868,7 +6912,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04659ddb06c87d233c566112c1c9c5b9e98256d9af50ec3bc9c8327f873a7568" dependencies = [ "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -6896,7 +6940,7 @@ checksum = "70977707304198400eb4835a78f6a9f928bf41bba420deb8fdb175cd965d77a7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -6915,7 +6959,7 @@ dependencies = [ "idna 0.2.3", "ipnet", "lazy_static", - "rand", + "rand 0.8.5", "smallvec", "thiserror 1.0.69", "tinyvec", @@ -6931,8 +6975,8 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "tuic" -version = "1.4.3" -source = "git+https://github.com/Itsusinn/tuic.git?tag=v1.4.3#2a962370a50ca9265b22aee0d299cf4ad573d310" +version = "1.4.5" +source = "git+https://github.com/Itsusinn/tuic.git?tag=v1.4.5#17ee3f702e26aca048495d4c66ad5316bb8eaf98" dependencies = [ "bytes", "futures-util", @@ -6944,8 +6988,8 @@ dependencies = [ [[package]] name = "tuic-quinn" -version = "1.4.3" -source = "git+https://github.com/Itsusinn/tuic.git?tag=v1.4.3#2a962370a50ca9265b22aee0d299cf4ad573d310" +version = "1.4.5" +source = "git+https://github.com/Itsusinn/tuic.git?tag=v1.4.5#17ee3f702e26aca048495d4c66ad5316bb8eaf98" dependencies = [ "bytes", "eyre", @@ -6986,7 +7030,7 @@ dependencies = [ "http", "httparse", "log", - "rand", + "rand 0.8.5", "sha1", "thiserror 2.0.11", "utf-8", @@ -7033,9 +7077,9 @@ checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" [[package]] name = "unicode-ident" -version = "1.0.15" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11cd88e12b17c6494200a9c1b683a04fcac9573ed74cd1b62aeb2727c5592243" +checksum = "a210d160f08b701c8721ba1c726c11662f877ea6b7094007e1ca9a1041945034" [[package]] name = "unicode-normalization" @@ -7140,25 +7184,25 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.12.1" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3758f5e68192bb96cc8f9b7e2c2cfdabb435499a28499a42f8f984092adad4b" +checksum = "ced87ca4be083373936a67f8de945faa23b6b42384bd5b64434850802c6dccd0" dependencies = [ - "getrandom", - "rand", + "getrandom 0.3.1", + "rand 0.9.0", "serde", "uuid-macro-internal", ] [[package]] name = "uuid-macro-internal" -version = "1.12.1" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8a86d88347b61a0e17b9908a67efcc594130830bf1045653784358dd023e294" +checksum = "d28dd23acb5f2fa7bd2155ab70b960e770596b3bb6395119b40476c3655dfba4" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -7187,7 +7231,7 @@ checksum = "d674d135b4a8c1d7e813e2f8d1c9a58308aee4a680323066025e53132218bd91" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -7227,6 +7271,15 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +[[package]] +name = "wasi" +version = "0.13.3+wasi-0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26816d2e1a4a36a2940b96c5296ce403917633dff8f3440e9b236ed6f6bacad2" +dependencies = [ + "wit-bindgen-rt", +] + [[package]] name = "wasix" version = "0.12.21" @@ -7258,7 +7311,7 @@ dependencies = [ "log", "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", "wasm-bindgen-shared", ] @@ -7280,7 +7333,7 @@ checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -7343,9 +7396,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.26.7" +version = "0.26.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d642ff16b7e79272ae451b7322067cdc17cadf68c23264be9d94a32319efe7e" +checksum = "2210b291f7ea53617fbafcc4939f10914214ec15aace5ba62293a668f322c5c9" dependencies = [ "rustls-pki-types", ] @@ -7481,7 +7534,7 @@ checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -7492,7 +7545,7 @@ checksum = "83577b051e2f49a058c308f17f273b570a6a758386fc291b5f6a934dd84e48c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -7503,7 +7556,7 @@ checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -7514,7 +7567,7 @@ checksum = "cb26fd936d991781ea39e87c3a27285081e3c0da5ca0fcbc02d368cc6f52ff01" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -7768,9 +7821,9 @@ checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" [[package]] name = "winnow" -version = "0.6.24" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8d71a593cc5c42ad7876e2c1fda56f314f3754c084128833e64f1345ff8a03a" +checksum = "86e376c75f4f43f44db463cf729e0d3acbf954d13e22c51e26e4c264b4ab545f" dependencies = [ "memchr", ] @@ -7798,6 +7851,15 @@ dependencies = [ "windows 0.51.1", ] +[[package]] +name = "wit-bindgen-rt" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3268f3d866458b787f390cf61f4bbb563b922d091359f9608842999eaee3943c" +dependencies = [ + "bitflags 2.8.0", +] + [[package]] name = "write16" version = "1.0.0" @@ -7826,7 +7888,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c7e468321c81fb07fa7f4c636c3972b9100f0346e5b6a9f2bd0603a52f7ed277" dependencies = [ "curve25519-dalek", - "rand_core", + "rand_core 0.6.4", "serde", "zeroize", ] @@ -7861,7 +7923,7 @@ checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", "synstructure", ] @@ -7872,7 +7934,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ "byteorder", - "zerocopy-derive", + "zerocopy-derive 0.7.35", +] + +[[package]] +name = "zerocopy" +version = "0.8.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa91407dacce3a68c56de03abe2760159582b846c6a4acd2f456618087f12713" +dependencies = [ + "zerocopy-derive 0.8.17", ] [[package]] @@ -7883,7 +7954,18 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06718a168365cad3d5ff0bb133aad346959a2074bd4a85c121255a11304a8626" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.98", ] [[package]] @@ -7903,7 +7985,7 @@ checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", "synstructure", ] @@ -7924,7 +8006,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -7946,5 +8028,5 @@ checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] diff --git a/clash_lib/Cargo.toml b/clash_lib/Cargo.toml index 6c9f86127..9dba06ffa 100644 --- a/clash_lib/Cargo.toml +++ b/clash_lib/Cargo.toml @@ -105,7 +105,7 @@ hickory-proto = { version = "0.25.0-alpha.2", features = ["dns-over-rustls", "dn dhcproto = "0.12" ring-compat = { version = "0.8", features = ["aead"] } -rand = "0.8" +rand = "0.9" tracing = "0.1" tracing-subscriber = { version = "0.3", features = ["env-filter"] } tracing-appender = "0.2" @@ -119,8 +119,8 @@ arti-client = { version = "0.26", optional = true, default-features = false, fea tor-rtcompat = { version = "0.26", optional = true, default-features = false } # tuic -tuic = { tag = "v1.4.3", optional = true, git = "https://github.com/Itsusinn/tuic.git" } -tuic-quinn = { tag = "v1.4.3", optional = true, git = "https://github.com/Itsusinn/tuic.git" } +tuic = { tag = "v1.4.5", optional = true, git = "https://github.com/Itsusinn/tuic.git" } +tuic-quinn = { tag = "v1.4.5", optional = true, git = "https://github.com/Itsusinn/tuic.git" } register-count = { version = "0.1", optional = true } quinn = { version = "0.11", default-features = false, features = ["futures-io", "runtime-tokio", "rustls"] } diff --git a/clash_lib/src/app/dns/resolver/enhanced.rs b/clash_lib/src/app/dns/resolver/enhanced.rs index 5eb310efb..626e9751e 100644 --- a/clash_lib/src/app/dns/resolver/enhanced.rs +++ b/clash_lib/src/app/dns/resolver/enhanced.rs @@ -1,6 +1,6 @@ use async_trait::async_trait; use futures::{FutureExt, TryFutureExt}; -use rand::prelude::SliceRandom; +use rand::seq::IndexedRandom; use std::{ net, sync::{ @@ -531,7 +531,7 @@ impl ClashResolver for EnhancedResolver { } match self.lookup_ip(host, rr::RecordType::A).await { - Ok(result) => match result.choose(&mut rand::thread_rng()).unwrap() { + Ok(result) => match result.choose(&mut rand::rng()).unwrap() { net::IpAddr::V4(v4) => Ok(Some(*v4)), _ => unreachable!("invalid IP family"), }, @@ -564,7 +564,7 @@ impl ClashResolver for EnhancedResolver { } match self.lookup_ip(host, rr::RecordType::AAAA).await { - Ok(result) => match result.choose(&mut rand::thread_rng()).unwrap() { + Ok(result) => match result.choose(&mut rand::rng()).unwrap() { net::IpAddr::V6(v6) => Ok(Some(*v6)), _ => unreachable!("invalid IP family"), }, diff --git a/clash_lib/src/app/dns/resolver/system_linux.rs b/clash_lib/src/app/dns/resolver/system_linux.rs index 099d18355..3ccc8d14a 100644 --- a/clash_lib/src/app/dns/resolver/system_linux.rs +++ b/clash_lib/src/app/dns/resolver/system_linux.rs @@ -33,7 +33,7 @@ impl ClashResolver for SystemResolver { Ok(response .iter() .filter(|x| self.ipv6() || x.is_ipv4()) - .choose(&mut rand::thread_rng())) + .choose(&mut rand::rng())) } async fn resolve_v4( @@ -42,7 +42,7 @@ impl ClashResolver for SystemResolver { _: bool, ) -> anyhow::Result> { let response = self.inner.ipv4_lookup(host).await?; - Ok(response.iter().map(|x| x.0).choose(&mut rand::thread_rng())) + Ok(response.iter().map(|x| x.0).choose(&mut rand::rng())) } async fn resolve_v6( @@ -51,7 +51,7 @@ impl ClashResolver for SystemResolver { _: bool, ) -> anyhow::Result> { let response = self.inner.ipv6_lookup(host).await?; - Ok(response.iter().map(|x| x.0).choose(&mut rand::thread_rng())) + Ok(response.iter().map(|x| x.0).choose(&mut rand::rng())) } async fn cached_for(&self, _: std::net::IpAddr) -> Option { diff --git a/clash_lib/src/app/dns/resolver/system_non_linux.rs b/clash_lib/src/app/dns/resolver/system_non_linux.rs index 88df66bf4..d137d8e09 100644 --- a/clash_lib/src/app/dns/resolver/system_non_linux.rs +++ b/clash_lib/src/app/dns/resolver/system_non_linux.rs @@ -39,7 +39,7 @@ impl ClashResolver for SystemResolver { } }) .collect::>(); - Ok(response.into_iter().choose(&mut rand::thread_rng())) + Ok(response.into_iter().choose(&mut rand::rng())) } async fn resolve_v4( @@ -54,7 +54,7 @@ impl ClashResolver for SystemResolver { _ => None, }) .collect::>(); - Ok(response.into_iter().choose(&mut rand::thread_rng())) + Ok(response.into_iter().choose(&mut rand::rng())) } async fn resolve_v6( @@ -72,7 +72,7 @@ impl ClashResolver for SystemResolver { _ => None, }) .collect::>(); - Ok(response.into_iter().choose(&mut rand::thread_rng())) + Ok(response.into_iter().choose(&mut rand::rng())) } async fn cached_for(&self, _: std::net::IpAddr) -> Option { diff --git a/clash_lib/src/common/utils.rs b/clash_lib/src/common/utils.rs index f121a1917..526500bdf 100644 --- a/clash_lib/src/common/utils.rs +++ b/clash_lib/src/common/utils.rs @@ -5,7 +5,7 @@ use std::{fmt::Write, num::ParseIntError, path::Path}; use crate::{common::errors::new_io_error, Error}; use rand::{ - distributions::uniform::{SampleRange, SampleUniform}, + distr::uniform::{SampleRange, SampleUniform}, Fill, Rng, }; use sha2::Digest; @@ -16,15 +16,15 @@ where T: SampleUniform, R: SampleRange, { - let mut rng = rand::thread_rng(); - rng.gen_range(range) + let mut rng = rand::rng(); + rng.random_range(range) } pub fn rand_fill(buf: &mut T) where T: Fill + ?Sized, { - let mut rng = rand::thread_rng(); + let mut rng = rand::rng(); rng.fill(buf) } diff --git a/clash_lib/src/proxy/converters/hysteria2.rs b/clash_lib/src/proxy/converters/hysteria2.rs index cb587881a..f7f888684 100644 --- a/clash_lib/src/proxy/converters/hysteria2.rs +++ b/clash_lib/src/proxy/converters/hysteria2.rs @@ -40,10 +40,10 @@ impl PortGenrateor { } pub fn get(&self) -> u16 { - let mut rng = rand::thread_rng(); + let mut rng = rand::rng(); let len = 1 + self.ports.len() + self.range.iter().map(|r| r.len()).sum::(); - let idx = rng.gen_range(0..len); + let idx = rng.random_range(0..len); match idx { 0 => self.default, idx if idx <= self.ports.len() => self.ports[idx - 1], diff --git a/clash_lib/src/proxy/hysteria2/codec.rs b/clash_lib/src/proxy/hysteria2/codec.rs index ab58609cb..6c83e14e1 100644 --- a/clash_lib/src/proxy/hysteria2/codec.rs +++ b/clash_lib/src/proxy/hysteria2/codec.rs @@ -2,7 +2,7 @@ use std::io::ErrorKind; use bytes::{Buf, BufMut, BytesMut}; use quinn_proto::{coding::Codec, VarInt}; -use rand::distributions::Alphanumeric; +use rand::distr::Alphanumeric; use tokio_util::codec::{Decoder, Encoder}; use crate::session::SocksAddr; @@ -64,8 +64,8 @@ impl Decoder for Hy2TcpCodec { #[inline] pub fn padding(range: std::ops::RangeInclusive) -> Vec { use rand::Rng; - let mut rng = rand::thread_rng(); - let len = rng.gen_range(range) as usize; + let mut rng = rand::rng(); + let len = rng.random_range(range) as usize; rng.sample_iter(Alphanumeric).take(len).collect() } diff --git a/clash_lib/src/proxy/hysteria2/salamander.rs b/clash_lib/src/proxy/hysteria2/salamander.rs index adb0b782f..e3149e081 100644 --- a/clash_lib/src/proxy/hysteria2/salamander.rs +++ b/clash_lib/src/proxy/hysteria2/salamander.rs @@ -42,7 +42,7 @@ impl SalamanderObfs { } fn encrypt(&self, data: &mut [u8]) -> Bytes { - let salt: [u8; 8] = rand::thread_rng().gen(); + let salt: [u8; 8] = rand::rng().random(); let mut res = BytesMut::with_capacity(8 + data.len()); res.put_slice(&salt); diff --git a/clash_lib/src/proxy/shadowsocks/shadow_tls/connector.rs b/clash_lib/src/proxy/shadowsocks/shadow_tls/connector.rs index 909265e04..6f3b0629f 100644 --- a/clash_lib/src/proxy/shadowsocks/shadow_tls/connector.rs +++ b/clash_lib/src/proxy/shadowsocks/shadow_tls/connector.rs @@ -2,7 +2,7 @@ use std::{io, ptr::copy_nonoverlapping, sync::Arc}; use rand::Rng; -use rand::distributions::Distribution; +use rand::distr::Distribution; use tokio::io::{AsyncReadExt, AsyncWrite, AsyncWriteExt}; use tokio_rustls::{client::TlsStream, TlsConnector}; @@ -119,7 +119,7 @@ fn generate_session_id(hmac: &Hmac, buf: &[u8]) -> [u8; TLS_SESSION_ID_SIZE] { } let mut session_id = [0; TLS_SESSION_ID_SIZE]; - rand::thread_rng().fill(&mut session_id[..TLS_SESSION_ID_SIZE - HMAC_SIZE]); + rand::rng().fill(&mut session_id[..TLS_SESSION_ID_SIZE - HMAC_SIZE]); let mut hmac = hmac.to_owned(); hmac.update(&buf[0..SESSION_ID_START]); hmac.update(&session_id); @@ -143,13 +143,13 @@ async fn fake_request( ) -> std::io::Result<()> { const HEADER: &[u8; 207] = b"GET / HTTP/1.1\nUser-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36\nAccept: gzip, deflate, br\nConnection: Close\nCookie: sessionid="; const FAKE_REQUEST_LENGTH_RANGE: (usize, usize) = (16, 64); - let cnt = rand::thread_rng() - .gen_range(FAKE_REQUEST_LENGTH_RANGE.0..FAKE_REQUEST_LENGTH_RANGE.1); + let cnt = rand::rng() + .random_range(FAKE_REQUEST_LENGTH_RANGE.0..FAKE_REQUEST_LENGTH_RANGE.1); let mut buffer = Vec::with_capacity(cnt + HEADER.len() + 1); buffer.extend_from_slice(HEADER); - rand::distributions::Alphanumeric - .sample_iter(rand::thread_rng()) + rand::distr::Alphanumeric + .sample_iter(rand::rng()) .take(cnt) .for_each(|c| buffer.push(c)); buffer.push(b'\n'); diff --git a/clash_lib/src/proxy/shadowsocks/simple_obfs/http.rs b/clash_lib/src/proxy/shadowsocks/simple_obfs/http.rs index dc09649ab..37a3b89d0 100644 --- a/clash_lib/src/proxy/shadowsocks/simple_obfs/http.rs +++ b/clash_lib/src/proxy/shadowsocks/simple_obfs/http.rs @@ -3,6 +3,7 @@ use std::pin::Pin; use crate::proxy::AnyStream; use base64::Engine; use bytes::{BufMut, BytesMut}; +use rand::Rng; use tokio::io::{AsyncRead, AsyncWrite}; #[derive(Debug)] @@ -41,8 +42,8 @@ impl AsyncWrite for HTTPObfs { buffer.put_slice( format!( "User-Agent: curl/7.{}.{}\r\n", - rand::random::() % 54, - rand::random::() % 2 + rand::rng().random_range(0..54), + rand::rng().random_range(0..2), ) .as_bytes(), ); diff --git a/clash_lib/src/proxy/transport/h2.rs b/clash_lib/src/proxy/transport/h2.rs index bcc2d0b78..1860ed698 100644 --- a/clash_lib/src/proxy/transport/h2.rs +++ b/clash_lib/src/proxy/transport/h2.rs @@ -4,7 +4,7 @@ use bytes::{Bytes, BytesMut}; use futures::ready; use h2::{RecvStream, SendStream}; use http::Request; -use rand::random; +use rand::Rng; use tokio::io::{AsyncRead, AsyncWrite}; use tracing::error; @@ -20,7 +20,7 @@ pub struct Http2Config { impl Http2Config { fn req(&self) -> std::io::Result> { - let uri_idx = random::() % self.hosts.len(); + let uri_idx = rand::rng().random_range(0..self.hosts.len()); let uri = { http::Uri::builder() .scheme("https") diff --git a/clash_lib/src/proxy/wg/device.rs b/clash_lib/src/proxy/wg/device.rs index a604a0f24..033646c70 100644 --- a/clash_lib/src/proxy/wg/device.rs +++ b/clash_lib/src/proxy/wg/device.rs @@ -8,7 +8,7 @@ use std::{ use bytes::{BufMut, Bytes, BytesMut}; use futures::{SinkExt, StreamExt}; -use rand::seq::SliceRandom; +use rand::seq::IndexedRandom; use smoltcp::{ iface::{Config, Interface, SocketHandle, SocketSet}, phy::Device, @@ -488,7 +488,7 @@ impl DeviceManager { if let Ok(ip) = domain.parse::() { ip } else { - let dns_server = self.dns_servers.choose(&mut rand::thread_rng()); + let dns_server = self.dns_servers.choose(&mut rand::rng()); if let Some(dns_server) = dns_server { let ip = self.look_up_dns(domain, *dns_server).await; if let Some(ip) = ip { diff --git a/clash_lib/src/proxy/wg/mod.rs b/clash_lib/src/proxy/wg/mod.rs index 6c028e025..4fbd22932 100644 --- a/clash_lib/src/proxy/wg/mod.rs +++ b/clash_lib/src/proxy/wg/mod.rs @@ -29,7 +29,7 @@ use async_trait::async_trait; use futures::TryFutureExt; use ipnet::IpNet; -use rand::seq::SliceRandom; +use rand::seq::IndexedRandom; use tokio::sync::OnceCell; use tracing::debug; @@ -268,7 +268,7 @@ impl OutboundHandler for Handler { .dns .as_ref() .unwrap() - .choose(&mut rand::thread_rng()) + .choose(&mut rand::rng()) .unwrap(); inner diff --git a/clash_lib/src/proxy/wg/ports.rs b/clash_lib/src/proxy/wg/ports.rs index 75499dcb6..58de412d5 100644 --- a/clash_lib/src/proxy/wg/ports.rs +++ b/clash_lib/src/proxy/wg/ports.rs @@ -1,7 +1,7 @@ use std::{collections::VecDeque, ops::Range, sync::Arc}; use anyhow::Context; -use rand::{seq::SliceRandom, thread_rng}; +use rand::seq::SliceRandom; const MIN_PORT: u16 = 1025; const MAX_PORT: u16 = 60000; @@ -24,7 +24,7 @@ impl PortPool { pub fn new() -> Self { let mut inner = TcpPortPoolInner::default(); let mut ports: Vec = PORT_RANGE.collect(); - ports.shuffle(&mut thread_rng()); + ports.shuffle(&mut rand::rng()); ports .into_iter() .for_each(|p| inner.queue.push_back(p) as ());