From d5ce82064e5283dc1dcde64350a04f9f82b96858 Mon Sep 17 00:00:00 2001 From: nab138 Date: Wed, 6 May 2026 21:47:34 -0400 Subject: [PATCH 01/15] start work on wasm stuff Co-authored-by: Copilot --- Cargo.lock | 623 +++++++++++++++++++++++++++++++------------ isideload/Cargo.toml | 11 +- 2 files changed, 463 insertions(+), 171 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d9ad384..b03d7c6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8,6 +8,16 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" +[[package]] +name = "aead" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" +dependencies = [ + "crypto-common 0.1.7", + "generic-array", +] + [[package]] name = "aead" version = "0.6.0-rc.10" @@ -40,17 +50,31 @@ dependencies = [ "cpufeatures 0.3.0", ] +[[package]] +name = "aes-gcm" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" +dependencies = [ + "aead 0.5.2", + "aes 0.8.4", + "cipher 0.4.4", + "ctr 0.9.2", + "ghash 0.5.1", + "subtle", +] + [[package]] name = "aes-gcm" version = "0.11.0-rc.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e22c0c90bbe8d4f77c3ca9ddabe41a1f8382d6fc1f7cea89459d0f320371f972" dependencies = [ - "aead", + "aead 0.6.0-rc.10", "aes 0.9.0", "cipher 0.5.1", - "ctr", - "ghash", + "ctr 0.10.0", + "ghash 0.6.0", "subtle", ] @@ -458,12 +482,6 @@ dependencies = [ "shlex", ] -[[package]] -name = "cesu8" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" - [[package]] name = "cfg-if" version = "1.0.4" @@ -476,6 +494,17 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" +[[package]] +name = "chacha20" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3613f74bd2eac03dad61bd53dbe620703d4371614fe0bc3b9f04dd36fe4e818" +dependencies = [ + "cfg-if", + "cipher 0.4.4", + "cpufeatures 0.2.17", +] + [[package]] name = "chacha20" version = "0.10.0" @@ -487,6 +516,19 @@ dependencies = [ "rand_core 0.10.1", ] +[[package]] +name = "chacha20poly1305" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10cd79432192d1c0f4e1a0fef9527696cc039165d729fb41b3f4f4f354c2dc35" +dependencies = [ + "aead 0.5.2", + "chacha20 0.9.1", + "cipher 0.4.4", + "poly1305", + "zeroize", +] + [[package]] name = "chrono" version = "0.4.44" @@ -509,6 +551,7 @@ checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" dependencies = [ "crypto-common 0.1.7", "inout 0.1.4", + "zeroize", ] [[package]] @@ -717,9 +760,9 @@ dependencies = [ [[package]] name = "cpubits" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ef0c543070d296ea414df2dd7625d1b24866ce206709d8a4a424f28377f5861" +checksum = "15b85f9c39137c3a891689859392b1bd49812121d0d61c9caf00d46ed5ce06ae" [[package]] name = "cpufeatures" @@ -832,6 +875,15 @@ dependencies = [ "rand_core 0.10.1", ] +[[package]] +name = "ctr" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" +dependencies = [ + "cipher 0.4.4", +] + [[package]] name = "ctr" version = "0.10.0" @@ -850,6 +902,33 @@ dependencies = [ "cmov", ] +[[package]] +name = "curve25519-dalek" +version = "4.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" +dependencies = [ + "cfg-if", + "cpufeatures 0.2.17", + "curve25519-dalek-derive", + "digest 0.10.7", + "fiat-crypto", + "rustc_version", + "subtle", + "zeroize", +] + +[[package]] +name = "curve25519-dalek-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "data-encoding" version = "2.11.0" @@ -999,9 +1078,9 @@ dependencies = [ [[package]] name = "digest" -version = "0.11.2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4850db49bf08e663084f7fb5c87d202ef91a3907271aff24a94eb97ff039153c" +checksum = "f1dd6dbb5841937940781866fa1281a1ff7bd3bf827091440879f9994983d5c2" dependencies = [ "block-buffer 0.12.0", "const-oid 0.10.2", @@ -1056,10 +1135,35 @@ dependencies = [ "der 0.7.10", "digest 0.10.7", "elliptic-curve", + "rfc6979", "signature 2.2.0", "spki 0.7.3", ] +[[package]] +name = "ed25519" +version = "2.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" +dependencies = [ + "pkcs8 0.10.2", + "signature 2.2.0", +] + +[[package]] +name = "ed25519-dalek" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70e796c081cee67dc755e1a36a0a172b897fab85fc3f6bc48307991f64e4eca9" +dependencies = [ + "curve25519-dalek", + "ed25519", + "serde", + "sha2 0.10.9", + "subtle", + "zeroize", +] + [[package]] name = "either" version = "1.15.0" @@ -1078,6 +1182,8 @@ dependencies = [ "ff", "generic-array", "group", + "hkdf", + "pem-rfc7468 0.7.0", "pkcs8 0.10.2", "rand_core 0.6.4", "sec1", @@ -1155,6 +1261,12 @@ dependencies = [ "subtle", ] +[[package]] +name = "fiat-crypto" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" + [[package]] name = "figment" version = "0.10.19" @@ -1397,11 +1509,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555" dependencies = [ "cfg-if", + "js-sys", "libc", "r-efi 6.0.0", "rand_core 0.10.1", "wasip2", "wasip3", + "wasm-bindgen", +] + +[[package]] +name = "ghash" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0d8a4362ccb29cb0b265253fb0a2728f592895ee6854fd9bc13f2ffda266ff1" +dependencies = [ + "opaque-debug", + "polyval 0.6.2", ] [[package]] @@ -1410,7 +1534,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2eecf2d5dc9b66b732b97707a0210906b1d30523eb773193ab777c0c84b3e8d5" dependencies = [ - "polyval", + "polyval 0.7.1", ] [[package]] @@ -1443,9 +1567,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f44da3a8150a6703ed5d34e164b875fd14c2cdab9af1252a9a1020bde2bdc54" +checksum = "171fefbc92fe4a4de27e0698d6a5b392d6a0e333506bc49133760b3bcf948733" dependencies = [ "atomic-waker", "bytes", @@ -1502,6 +1626,15 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +[[package]] +name = "hkdf" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" +dependencies = [ + "hmac 0.12.1", +] + [[package]] name = "hmac" version = "0.12.1" @@ -1517,7 +1650,7 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6303bc9732ae41b04cb554b844a762b4115a61bfaa81e3e83050991eeb56863f" dependencies = [ - "digest 0.11.2", + "digest 0.11.3", ] [[package]] @@ -1759,23 +1892,30 @@ checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954" [[package]] name = "idevice" -version = "0.1.58" +version = "0.1.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "066aab61e525fdc6181ae32bf88d535a1eae8462e3e190516ec15a863f5926cd" +checksum = "8eb824248fe76a393fbb52da9c7c180e258e7228f6397672d4821cb7867c4bf7" dependencies = [ "async_zip", "base64", "chrono", "futures", + "getrandom 0.2.17", + "getrandom 0.4.2", + "libc", "plist", "plist-macro", "rand 0.10.1", "rustls", + "rustls-pki-types", + "rustls-rustcrypto", "serde", "thiserror 2.0.18", "tokio", "tokio-rustls", "tracing", + "wasm-bindgen-futures", + "wasmtimer", ] [[package]] @@ -1791,9 +1931,9 @@ dependencies = [ [[package]] name = "idna_adapter" -version = "1.2.1" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" +checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714" dependencies = [ "icu_normalizer", "icu_properties", @@ -1843,16 +1983,6 @@ version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2" -[[package]] -name = "iri-string" -version = "0.7.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25e659a4bb38e810ebc252e53b5814ff908a8c58c2a9ce2fae1bbec24cbf4e20" -dependencies = [ - "memchr", - "serde", -] - [[package]] name = "is_executable" version = "1.0.5" @@ -1873,11 +2003,13 @@ name = "isideload" version = "0.2.22" dependencies = [ "aes 0.9.0", - "aes-gcm", + "aes-gcm 0.11.0-rc.3", "async-trait", "base64", "cbc 0.2.0", "futures-util", + "getrandom 0.2.17", + "getrandom 0.4.2", "hex", "hmac 0.13.0", "idevice", @@ -1892,7 +2024,7 @@ dependencies = [ "rcgen", "reqwest", "rootcause", - "rsa 0.10.0-rc.17", + "rsa 0.10.0-rc.18", "serde", "serde_json", "sha1 0.11.0", @@ -2055,7 +2187,7 @@ dependencies = [ "hmac 0.13.0", "pkcs12 0.2.0-pre.0", "pkcs5 0.8.0", - "pkcs8 0.11.0-rc.11", + "pkcs8 0.11.0", "rand 0.10.1", "rc2 0.9.0", "sha1 0.11.0", @@ -2124,27 +2256,32 @@ dependencies = [ [[package]] name = "jni" -version = "0.21.1" +version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" +checksum = "5efd9a482cf3a427f00d6b35f14332adc7902ce91efb778580e180ff90fa3498" dependencies = [ - "cesu8", "cfg-if", "combine", - "jni-sys 0.3.1", + "jni-macros", + "jni-sys", "log", - "thiserror 1.0.69", + "simd_cesu8", + "thiserror 2.0.18", "walkdir", - "windows-sys 0.45.0", + "windows-link", ] [[package]] -name = "jni-sys" -version = "0.3.1" +name = "jni-macros" +version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41a652e1f9b6e0275df1f15b32661cf0d4b78d4d87ddec5e0c3c20f097433258" +checksum = "a00109accc170f0bdb141fed3e393c565b6f5e072365c3bd58f5b062591560a3" dependencies = [ - "jni-sys 0.4.1", + "proc-macro2", + "quote", + "rustc_version", + "simd_cesu8", + "syn", ] [[package]] @@ -2178,9 +2315,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.95" +version = "0.3.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2964e92d1d9dc3364cae4d718d93f227e3abb088e747d92e0395bfdedf1c12ca" +checksum = "67df7112613f8bfd9150013a0314e196f4800d3201ae742489d999db2f979f08" dependencies = [ "cfg-if", "futures-util", @@ -2269,7 +2406,7 @@ dependencies = [ "bitflags", "libc", "plain", - "redox_syscall", + "redox_syscall 0.7.5", ] [[package]] @@ -2294,6 +2431,15 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0" +[[package]] +name = "lock_api" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" +dependencies = [ + "scopeguard", +] + [[package]] name = "log" version = "0.4.29" @@ -2512,17 +2658,22 @@ version = "1.70.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" +[[package]] +name = "opaque-debug" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" + [[package]] name = "openssl" -version = "0.10.78" +version = "0.10.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f38c4372413cdaaf3cc79dd92d29d7d9f5ab09b51b10dded508fb90bb70b9222" +checksum = "bf0b434746ee2832f4f0baf10137e1cabb18cbe6912c69e2e33263c45250f542" dependencies = [ "bitflags", "cfg-if", "foreign-types", "libc", - "once_cell", "openssl-macros", "openssl-sys", ] @@ -2546,9 +2697,9 @@ checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe" [[package]] name = "openssl-sys" -version = "0.9.114" +version = "0.9.115" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13ce1245cd07fcc4cfdb438f7507b0c7e4f3849a69fd84d52374c66d83741bb6" +checksum = "158fe5b292746440aa6e7a7e690e55aeb72d41505e2804c23c6973ad0e9c9781" dependencies = [ "cc", "libc", @@ -2611,6 +2762,19 @@ dependencies = [ "ecdsa", "elliptic-curve", "primeorder", + "sha2 0.10.9", +] + +[[package]] +name = "p384" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe42f1670a52a47d448f14b6a5c61dd78fce51856e68edaa38f7ae3a46b8d6b6" +dependencies = [ + "ecdsa", + "elliptic-curve", + "primeorder", + "sha2 0.10.9", ] [[package]] @@ -2619,6 +2783,35 @@ version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" +[[package]] +name = "parking_lot" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall 0.5.18", + "smallvec", + "windows-link", +] + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + [[package]] name = "pbkdf2" version = "0.12.2" @@ -2635,7 +2828,7 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "112d82ceb8c5bf524d9af484d4e4970c9fd5a0cc15ba14ad93dccd28873b0629" dependencies = [ - "digest 0.11.2", + "digest 0.11.3", "hmac 0.13.0", ] @@ -2698,18 +2891,18 @@ checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] name = "pin-project" -version = "1.1.11" +version = "1.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1749c7ed4bcaf4c3d0a3efc28538844fb29bcdd7d2b67b2be7e20ba861ff517" +checksum = "cbf0d9e68100b3a7989b4901972f265cd542e560a3a8a724e1e20322f4d06ce9" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.11" +version = "1.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b20ed30f105399776b9c883e68e536ef602a16ae6f596d2c473591d6ad64c6" +checksum = "a990e22f43e84855daf260dded30524ef4a9021cc7541c26540500a50b624389" dependencies = [ "proc-macro2", "quote", @@ -2722,6 +2915,12 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + [[package]] name = "pkcs1" version = "0.7.5" @@ -2767,7 +2966,7 @@ dependencies = [ "cms 0.3.0-pre.1", "const-oid 0.10.2", "der 0.8.0", - "digest 0.11.2", + "digest 0.11.3", "spki 0.8.0", "x509-cert 0.3.0-rc.4", "zeroize", @@ -2810,14 +3009,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" dependencies = [ "der 0.7.10", + "pkcs5 0.7.1", "spki 0.7.3", ] [[package]] name = "pkcs8" -version = "0.11.0-rc.11" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12922b6296c06eb741b02d7b5161e3aaa22864af38dfa025a1a3ba3f68c84577" +checksum = "451913da69c775a56034ea8d9003d27ee8948e12443eae7c038ba100a4f21cb7" dependencies = [ "der 0.8.0", "spki 0.8.0", @@ -2857,6 +3057,29 @@ dependencies = [ "plist", ] +[[package]] +name = "poly1305" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf" +dependencies = [ + "cpufeatures 0.2.17", + "opaque-debug", + "universal-hash 0.5.1", +] + +[[package]] +name = "polyval" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25" +dependencies = [ + "cfg-if", + "cpufeatures 0.2.17", + "opaque-debug", + "universal-hash 0.5.1", +] + [[package]] name = "polyval" version = "0.7.1" @@ -2865,7 +3088,7 @@ checksum = "7dfc63250416fea14f5749b90725916a6c903f599d51cb635aa7a52bfd03eede" dependencies = [ "cpubits", "cpufeatures 0.3.0", - "universal-hash", + "universal-hash 0.6.1", ] [[package]] @@ -2950,9 +3173,9 @@ dependencies = [ [[package]] name = "quick-xml" -version = "0.39.2" +version = "0.39.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "958f21e8e7ceb5a1aa7fa87fab28e7c75976e0bfe7e23ff069e0a260f894067d" +checksum = "721da970c312655cde9b4ffe0547f20a8494866a4af5ff51f18b7c633d0c870b" dependencies = [ "memchr", ] @@ -3067,7 +3290,7 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2e8e8bcc7961af1fdac401278c6a831614941f6164ee3bf4ce61b7edb162207" dependencies = [ - "chacha20", + "chacha20 0.10.0", "getrandom 0.4.2", "rand_core 0.10.1", ] @@ -3209,9 +3432,18 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.7.4" +version = "0.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f450ad9c3b1da563fb6948a8e0fb0fb9269711c9c73d9ea1de5058c79c8d643a" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" +dependencies = [ + "bitflags", +] + +[[package]] +name = "redox_syscall" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4666a1a60d8412eab19d94f6d13dcc9cea0a5ef4fdf6a5db306537413c661b1b" dependencies = [ "bitflags", ] @@ -3258,9 +3490,9 @@ checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" [[package]] name = "reqwest" -version = "0.13.2" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab3f43e3283ab1488b624b44b0e988d0acea0b3214e694730a055cb6b2efa801" +checksum = "62e0021ea2c22aed41653bc7e1419abb2c97e038ff2c33d0e1309e49a97deec0" dependencies = [ "base64", "bytes", @@ -3299,6 +3531,16 @@ dependencies = [ "web-sys", ] +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac 0.12.1", + "subtle", +] + [[package]] name = "ring" version = "0.17.14" @@ -3349,6 +3591,7 @@ dependencies = [ "pkcs1 0.7.5", "pkcs8 0.10.2", "rand_core 0.6.4", + "sha2 0.10.9", "signature 2.2.0", "spki 0.7.3", "subtle", @@ -3357,18 +3600,18 @@ dependencies = [ [[package]] name = "rsa" -version = "0.10.0-rc.17" +version = "0.10.0-rc.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87ed3e93fc7e473e464b9726f4759659e72bc8665e4b8ea227547024f416d905" +checksum = "30b2aa4ba0d89f73d1e332df05be0eeab8840351c36ca5654341dfdb57bb3caf" dependencies = [ "const-oid 0.10.2", "crypto-bigint 0.7.3", "crypto-primes", - "digest 0.11.2", + "digest 0.11.3", "pkcs1 0.8.0-rc.4", - "pkcs8 0.11.0-rc.11", + "pkcs8 0.11.0", "rand_core 0.10.1", - "signature 3.0.0-rc.10", + "signature 3.0.0", "spki 0.8.0", "zeroize", ] @@ -3379,6 +3622,15 @@ version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94300abf3f1ae2e2b8ffb7b58043de3d399c73fa6f4b73826402a5c457614dbe" +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + [[package]] name = "rusticata-macros" version = "4.1.0" @@ -3403,14 +3655,14 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.39" +version = "0.23.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c2c118cb077cca2822033836dfb1b975355dfb784b5e8da48f7b6c5db74e60e" +checksum = "ef86cd5876211988985292b91c96a8f2d298df24e75989a43a3c73f2d4d8168b" dependencies = [ "aws-lc-rs", "once_cell", "rustls-pki-types", - "rustls-webpki", + "rustls-webpki 0.103.13", "subtle", "zeroize", ] @@ -3439,9 +3691,9 @@ dependencies = [ [[package]] name = "rustls-platform-verifier" -version = "0.6.2" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d99feebc72bae7ab76ba994bb5e121b8d83d910ca40b36e0921f53becc41784" +checksum = "26d1e2536ce4f35f4846aa13bff16bd0ff40157cdb14cc056c7b14ba41233ba0" dependencies = [ "core-foundation 0.10.1", "core-foundation-sys", @@ -3451,7 +3703,7 @@ dependencies = [ "rustls", "rustls-native-certs", "rustls-platform-verifier-android", - "rustls-webpki", + "rustls-webpki 0.103.13", "security-framework 3.7.0", "security-framework-sys", "webpki-root-certs", @@ -3464,6 +3716,47 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f" +[[package]] +name = "rustls-rustcrypto" +version = "0.0.2-alpha" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f12052947763ab8515f753315357599e9b0b4dab3b8ba15f30f725fe6d025557" +dependencies = [ + "aead 0.5.2", + "aes-gcm 0.10.3", + "chacha20poly1305", + "crypto-common 0.1.7", + "der 0.7.10", + "digest 0.10.7", + "ecdsa", + "ed25519-dalek", + "hmac 0.12.1", + "p256", + "p384", + "paste", + "pkcs8 0.10.2", + "rand_core 0.6.4", + "rsa 0.9.10", + "rustls", + "rustls-pki-types", + "rustls-webpki 0.102.8", + "sec1", + "sha2 0.10.9", + "signature 2.2.0", + "x25519-dalek", +] + +[[package]] +name = "rustls-webpki" +version = "0.102.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" +dependencies = [ + "ring", + "rustls-pki-types", + "untrusted 0.9.0", +] + [[package]] name = "rustls-webpki" version = "0.103.13" @@ -3534,6 +3827,12 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + [[package]] name = "scroll" version = "0.12.0" @@ -3712,9 +4011,9 @@ dependencies = [ [[package]] name = "serdect" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9af4a3e75ebd5599b30d4de5768e00b5095d518a79fefc3ecbaf77e665d1ec06" +checksum = "66cf8fedced2fcf12406bcb34223dffb92eaf34908ede12fed414c82b7f00b3e" dependencies = [ "base16ct 1.0.0", "serde", @@ -3739,7 +4038,7 @@ checksum = "aacc4cc499359472b4abe1bf11d0b12e688af9a805fa5e3016f9a386dc2d0214" dependencies = [ "cfg-if", "cpufeatures 0.3.0", - "digest 0.11.2", + "digest 0.11.3", ] [[package]] @@ -3761,7 +4060,7 @@ checksum = "446ba717509524cb3f22f17ecc096f10f4822d76ab5c0b9822c5f9c284e825f4" dependencies = [ "cfg-if", "cpufeatures 0.3.0", - "digest 0.11.2", + "digest 0.11.3", ] [[package]] @@ -3797,11 +4096,11 @@ dependencies = [ [[package]] name = "signature" -version = "3.0.0-rc.10" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f1880df446116126965eeec169136b2e0251dba37c6223bcc819569550edea3" +checksum = "28d567dcbaf0049cb8ac2608a76cd95ff9e4412e1899d389ee400918ca7537f5" dependencies = [ - "digest 0.11.2", + "digest 0.11.3", "rand_core 0.10.1", ] @@ -3811,6 +4110,22 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "703d5c7ef118737c72f1af64ad2f6f8c5e1921f818cdcb97b8fe6fc69bf66214" +[[package]] +name = "simd_cesu8" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94f90157bb87cddf702797c5dadfa0be7d266cdf49e22da2fcaa32eff75b2c33" +dependencies = [ + "rustc_version", + "simdutf8", +] + +[[package]] +name = "simdutf8" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" + [[package]] name = "simple-file-manifest" version = "0.11.0" @@ -3894,7 +4209,7 @@ checksum = "4b5f622c2d21b826b3501f4c620ccc4696e4a09a6b51727fcb21036dec87c101" dependencies = [ "crypto-bigint 0.7.3", "crypto-common 0.2.1", - "digest 0.11.2", + "digest 0.11.3", "subtle", ] @@ -4100,9 +4415,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.52.1" +version = "1.52.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67dee974fe86fd92cc45b7a95fdd2f99a36a6d7b0d431a231178d3d670bbcc6" +checksum = "110a78583f19d5cdb2c5ccf321d1290344e71313c6c37d43520d386027d18386" dependencies = [ "bytes", "libc", @@ -4232,9 +4547,9 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.6.8" +version = "0.6.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4e6559d53cc268e5031cd8429d05415bc4cb4aefc4aa5d6cc35fbf5b924a1f8" +checksum = "68d6fdd9f81c2819c9a8b0e0cd91660e7746a8e6ea2ba7c6b2b057985f6bcb51" dependencies = [ "async-compression", "bitflags", @@ -4244,13 +4559,13 @@ dependencies = [ "http", "http-body", "http-body-util", - "iri-string", "pin-project-lite", "tokio", "tokio-util", "tower", "tower-layer", "tower-service", + "url", ] [[package]] @@ -4416,6 +4731,16 @@ version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" +[[package]] +name = "universal-hash" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" +dependencies = [ + "crypto-common 0.1.7", + "subtle", +] + [[package]] name = "universal-hash" version = "0.6.1" @@ -4542,9 +4867,9 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.118" +version = "0.2.121" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bf938a0bacb0469e83c1e148908bd7d5a6010354cf4fb73279b7447422e3a89" +checksum = "49ace1d07c165b0864824eee619580c4689389afa9dc9ed3a4c75040d82e6790" dependencies = [ "cfg-if", "once_cell", @@ -4555,9 +4880,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.68" +version = "0.4.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f371d383f2fb139252e0bfac3b81b265689bf45b6874af544ffa4c975ac1ebf8" +checksum = "96492d0d3ffba25305a7dc88720d250b1401d7edca02cc3bcd50633b424673b8" dependencies = [ "js-sys", "wasm-bindgen", @@ -4565,9 +4890,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.118" +version = "0.2.121" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eeff24f84126c0ec2db7a449f0c2ec963c6a49efe0698c4242929da037ca28ed" +checksum = "8e68e6f4afd367a562002c05637acb8578ff2dea1943df76afb9e83d177c8578" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -4575,9 +4900,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.118" +version = "0.2.121" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d08065faf983b2b80a79fd87d8254c409281cf7de75fc4b773019824196c904" +checksum = "d95a9ec35c64b2a7cb35d3fead40c4238d0940c86d107136999567a4703259f2" dependencies = [ "bumpalo", "proc-macro2", @@ -4588,9 +4913,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.118" +version = "0.2.121" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fd04d9e306f1907bd13c6361b5c6bfc7b3b3c095ed3f8a9246390f8dbdee129" +checksum = "c4e0100b01e9f0d03189a92b96772a1fb998639d981193d7dbab487302513441" dependencies = [ "unicode-ident", ] @@ -4629,11 +4954,24 @@ dependencies = [ "semver", ] +[[package]] +name = "wasmtimer" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c598d6b99ea013e35844697fc4670d08339d5cda15588f193c6beedd12f644b" +dependencies = [ + "futures", + "js-sys", + "parking_lot", + "pin-utils", + "wasm-bindgen", +] + [[package]] name = "web-sys" -version = "0.3.95" +version = "0.3.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f2dfbb17949fa2088e5d39408c48368947b86f7834484e87b73de55bc14d97d" +checksum = "4b572dff8bcf38bad0fa19729c89bb5748b2b9b1d8be70cf90df697e3a8f32aa" dependencies = [ "js-sys", "wasm-bindgen", @@ -4761,15 +5099,6 @@ dependencies = [ "windows-link", ] -[[package]] -name = "windows-sys" -version = "0.45.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" -dependencies = [ - "windows-targets 0.42.2", -] - [[package]] name = "windows-sys" version = "0.48.0" @@ -4815,21 +5144,6 @@ dependencies = [ "windows-link", ] -[[package]] -name = "windows-targets" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" -dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", -] - [[package]] name = "windows-targets" version = "0.48.5" @@ -4878,12 +5192,6 @@ dependencies = [ "windows_x86_64_msvc 0.53.1", ] -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" - [[package]] name = "windows_aarch64_gnullvm" version = "0.48.5" @@ -4902,12 +5210,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" -[[package]] -name = "windows_aarch64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" - [[package]] name = "windows_aarch64_msvc" version = "0.48.5" @@ -4926,12 +5228,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" -[[package]] -name = "windows_i686_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" - [[package]] name = "windows_i686_gnu" version = "0.48.5" @@ -4962,12 +5258,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" -[[package]] -name = "windows_i686_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" - [[package]] name = "windows_i686_msvc" version = "0.48.5" @@ -4986,12 +5276,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" -[[package]] -name = "windows_x86_64_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" - [[package]] name = "windows_x86_64_gnu" version = "0.48.5" @@ -5010,12 +5294,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" - [[package]] name = "windows_x86_64_gnullvm" version = "0.48.5" @@ -5034,12 +5312,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" -[[package]] -name = "windows_x86_64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" - [[package]] name = "windows_x86_64_msvc" version = "0.48.5" @@ -5176,6 +5448,17 @@ dependencies = [ "tap", ] +[[package]] +name = "x25519-dalek" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7e468321c81fb07fa7f4c636c3972b9100f0346e5b6a9f2bd0603a52f7ed277" +dependencies = [ + "curve25519-dalek", + "rand_core 0.6.4", + "zeroize", +] + [[package]] name = "x509" version = "0.2.0" diff --git a/isideload/Cargo.toml b/isideload/Cargo.toml index e8a63b7..01ce5e2 100644 --- a/isideload/Cargo.toml +++ b/isideload/Cargo.toml @@ -14,13 +14,14 @@ readme = "../README.md" default = ["install", "keyring-storage"] install = ["dep:idevice"] keyring-storage = ["dep:keyring"] +wasm = ["idevice/wasm", "dep:getrandom_02", "dep:getrandom_04"] fs-storage = [] # Unfortunately, dependencies are kinda a mess rn, since this requires a beta version of the srp crate. # Once that becomes stable, hopefuly duplicate dependencies should clean up.\ # Until then, I will wince in pain every time I see how long the output of cargo tree -d is. [dependencies] -idevice = { version = "0.1.58", optional = true, features = ["afc", "installation_proxy"]} +idevice = { version = "0.1.60", optional = true, features = ["afc", "installation_proxy"]} plist = "1.8" plist-macro = "0.1.4" reqwest = { version = "0.13.2", features = ["json", "gzip"] } @@ -58,3 +59,11 @@ sha1 = "0.11.0" # Using native-tls avoids the issue. [target.'cfg(windows)'.dependencies] reqwest = { version = "0.13.2", features = ["json", "gzip", "native-tls"] } + +[target.'cfg(target_arch = "wasm32")'.dependencies] +getrandom_02 = { package = "getrandom", version = "0.2", default-features = false, features = [ + "js", +], optional = true } +getrandom_04 = { package = "getrandom", version = "0.4", default-features = false, features = [ + "wasm_js", +], optional = true } From 2845633a866872451eec6f09ca5bb7f439943daa Mon Sep 17 00:00:00 2001 From: nab138 Date: Sat, 16 May 2026 20:52:41 -0400 Subject: [PATCH 02/15] wasm patches --- .vscode/settings.json | 3 + Cargo.lock | 1835 ++--------------- examples/minimal/Cargo.toml | 14 +- examples/minimal/src/main.rs | 272 +-- isideload/Cargo.toml | 30 +- isideload/src/anisette/mod.rs | 6 +- isideload/src/anisette/remote_v3/mod.rs | 158 +- isideload/src/anisette/remote_v3/websocket.rs | 97 + isideload/src/auth/apple_account.rs | 38 +- isideload/src/auth/builder.rs | 5 +- isideload/src/auth/grandslam.rs | 54 +- isideload/src/auth/mod.rs | 2 + isideload/src/auth/wasm_middleware.rs | 30 + isideload/src/dev/app_groups.rs | 3 +- isideload/src/dev/app_ids.rs | 3 +- isideload/src/dev/certificates.rs | 3 +- isideload/src/dev/devices.rs | 3 +- isideload/src/dev/teams.rs | 3 +- isideload/src/lib.rs | 1 + isideload/src/sideload/application.rs | 20 +- isideload/src/sideload/cert_identity.rs | 50 +- isideload/src/sideload/sideloader.rs | 6 + isideload/src/sideload/sign.rs | 71 +- 23 files changed, 697 insertions(+), 2010 deletions(-) create mode 100644 .vscode/settings.json create mode 100644 isideload/src/anisette/remote_v3/websocket.rs create mode 100644 isideload/src/auth/wasm_middleware.rs diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..2e62bd7 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "rust-analyzer.cargo.target": "wasm32-unknown-unknown" +} diff --git a/Cargo.lock b/Cargo.lock index b03d7c6..6f5ba5e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -78,27 +78,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "ahash" -version = "0.8.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" -dependencies = [ - "cfg-if", - "once_cell", - "version_check", - "zerocopy", -] - -[[package]] -name = "aho-corasick" -version = "1.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" -dependencies = [ - "memchr", -] - [[package]] name = "android_system_properties" version = "0.1.5" @@ -108,80 +87,12 @@ dependencies = [ "libc", ] -[[package]] -name = "anstream" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d" -dependencies = [ - "anstyle", - "anstyle-parse", - "anstyle-query", - "anstyle-wincon", - "colorchoice", - "is_terminal_polyfill", - "utf8parse", -] - -[[package]] -name = "anstyle" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000" - -[[package]] -name = "anstyle-parse" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52ce7f38b242319f7cabaa6813055467063ecdc9d355bbb4ce0c68908cd8130e" -dependencies = [ - "utf8parse", -] - -[[package]] -name = "anstyle-query" -version = "1.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" -dependencies = [ - "windows-sys 0.61.2", -] - -[[package]] -name = "anstyle-wincon" -version = "3.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" -dependencies = [ - "anstyle", - "once_cell_polyfill", - "windows-sys 0.61.2", -] - [[package]] name = "anyhow" version = "1.0.102" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c" -[[package]] -name = "apple-bundles" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0f40bb8f844cec39fa3aceae717808c2ac3d2b6c474a9dffbeba07a4a945d10" -dependencies = [ - "anyhow", - "plist", - "simple-file-manifest", - "walkdir", -] - -[[package]] -name = "arrayvec" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" - [[package]] name = "asn1-rs" version = "0.7.1" @@ -194,7 +105,7 @@ dependencies = [ "nom", "num-traits", "rusticata-macros", - "thiserror 2.0.18", + "thiserror", "time", ] @@ -245,6 +156,17 @@ dependencies = [ "syn", ] +[[package]] +name = "async_io_stream" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6d7b9decdf35d8908a7e3ef02f64c5e9b1695e230154c0e8de3969142d9b94c" +dependencies = [ + "futures", + "pharos", + "rustc_version", +] + [[package]] name = "async_zip" version = "0.0.18" @@ -255,20 +177,11 @@ dependencies = [ "crc32fast", "futures-lite", "pin-project", - "thiserror 2.0.18", + "thiserror", "tokio", "tokio-util", ] -[[package]] -name = "atomic" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a89cbf775b137e9b968e67227ef7f775587cde3fd31b0d8599dbd0f598a48340" -dependencies = [ - "bytemuck", -] - [[package]] name = "atomic-waker" version = "1.1.2" @@ -281,29 +194,6 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" -[[package]] -name = "aws-lc-rs" -version = "1.16.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ec6fb3fe69024a75fa7e1bfb48aa6cf59706a101658ea01bfd33b2b248a038f" -dependencies = [ - "aws-lc-sys", - "untrusted 0.7.1", - "zeroize", -] - -[[package]] -name = "aws-lc-sys" -version = "0.40.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f50037ee5e1e41e7b8f9d161680a725bd1626cb6f8c7e901f91f942850852fe7" -dependencies = [ - "cc", - "cmake", - "dunce", - "fs_extra", -] - [[package]] name = "base16ct" version = "0.2.0" @@ -339,32 +229,19 @@ dependencies = [ ] [[package]] -name = "bitflags" -version = "2.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4512299f36f043ab09a583e57bceb5a5aab7a73db1805848e8fef3c9e8c78b3" - -[[package]] -name = "bitvec" -version = "1.0.1" +name = "bit-vec" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +checksum = "b71798fca2c1fe1086445a7258a4bc81e6e49dcd24c8d0dd9a1e57395b603f51" dependencies = [ - "funty", - "radium", - "tap", - "wyz", + "serde", ] [[package]] -name = "bitvec-nom2" -version = "0.2.1" +name = "bitflags" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d988fcc40055ceaa85edc55875a08f8abd29018582647fd82ad6128dba14a5f0" -dependencies = [ - "bitvec", - "nom", -] +checksum = "c4512299f36f043ab09a583e57bceb5a5aab7a73db1805848e8fef3c9e8c78b3" [[package]] name = "block-buffer" @@ -384,15 +261,6 @@ dependencies = [ "hybrid-array", ] -[[package]] -name = "block-padding" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8894febbff9f758034a5b8e12d87918f56dfc64a8e1fe757d65e29041538d93" -dependencies = [ - "generic-array", -] - [[package]] name = "block-padding" version = "0.4.2" @@ -408,12 +276,6 @@ version = "3.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb" -[[package]] -name = "bytemuck" -version = "1.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8efb64bd706a16a1bdde310ae86b351e4d21550d98d056f22f8a7f7a2183fec" - [[package]] name = "byteorder" version = "1.5.0" @@ -426,41 +288,6 @@ version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" -[[package]] -name = "bytesize" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e93abca9e28e0a1b9877922aacb20576e05d4679ffa78c3d6dc22a26a216659" - -[[package]] -name = "bzip2" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" -dependencies = [ - "bzip2-sys", - "libc", -] - -[[package]] -name = "bzip2-sys" -version = "0.1.13+1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225bff33b2141874fe80d71e07d6eec4f85c5c216453dd96388240f96e1acc14" -dependencies = [ - "cc", - "pkg-config", -] - -[[package]] -name = "cbc" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b52a9543ae338f279b96b0b9fed9c8093744685043739079ce85cd58f289a6" -dependencies = [ - "cipher 0.4.4", -] - [[package]] name = "cbc" version = "0.2.0" @@ -472,13 +299,11 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.61" +version = "1.2.62" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d16d90359e986641506914ba71350897565610e87ce0ad9e6f28569db3dd5c6d" +checksum = "a1dce859f0832a7d088c4f1119888ab94ef4b5d6795d1ce05afb7fe159d79f98" dependencies = [ "find-msvc-tools", - "jobserver", - "libc", "shlex", ] @@ -488,12 +313,6 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" -[[package]] -name = "cfg_aliases" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" - [[package]] name = "chacha20" version = "0.9.1" @@ -536,10 +355,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c673075a2e0e5f4a1dde27ce9dee1ea4558c7ffe648f576438a20ca1d2acc4b0" dependencies = [ "iana-time-zone", - "js-sys", "num-traits", "serde", - "wasm-bindgen", "windows-link", ] @@ -565,73 +382,12 @@ dependencies = [ "inout 0.2.2", ] -[[package]] -name = "clap" -version = "4.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ddb117e43bbf7dacf0a4190fef4d345b9bad68dfc649cb349e7d17d28428e51" -dependencies = [ - "clap_builder", - "clap_derive", -] - -[[package]] -name = "clap_builder" -version = "4.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "714a53001bf66416adb0e2ef5ac857140e7dc3a0c48fb28b2f10762fc4b5069f" -dependencies = [ - "anstream", - "anstyle", - "clap_lex", - "strsim", -] - -[[package]] -name = "clap_derive" -version = "4.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2ce8604710f6733aa641a2b3731eaa1e8b3d9973d5e3565da11800813f997a9" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "clap_lex" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9" - -[[package]] -name = "cmake" -version = "0.1.58" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0f78a02292a74a88ac736019ab962ece0bc380e3f977bf72e376c5d78ff0678" -dependencies = [ - "cc", -] - [[package]] name = "cmov" version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f88a43d011fc4a6876cb7344703e297c71dda42494fee094d5f7c76bf13f746" -[[package]] -name = "cms" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b77c319abfd5219629c45c34c89ba945ed3c5e49fcde9d16b6c3885f118a730" -dependencies = [ - "const-oid 0.9.6", - "der 0.7.10", - "spki 0.7.3", - "x509-cert 0.2.5", -] - [[package]] name = "cms" version = "0.3.0-pre.1" @@ -641,15 +397,9 @@ dependencies = [ "const-oid 0.10.2", "der 0.8.0", "spki 0.8.0", - "x509-cert 0.3.0-rc.4", + "x509-cert", ] -[[package]] -name = "colorchoice" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570" - [[package]] name = "combine" version = "4.6.7" @@ -677,19 +427,6 @@ version = "0.4.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc14f565cf027a105f7a44ccf9e5b424348421a1d8952a8fc9d499d313107789" -[[package]] -name = "console" -version = "0.15.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "054ccb5b10f9f2cbf51eb355ca1d05c2d279ce1804688d0db74b4733a5aeafd8" -dependencies = [ - "encode_unicode", - "libc", - "once_cell", - "unicode-width", - "windows-sys 0.59.0", -] - [[package]] name = "const-oid" version = "0.9.6" @@ -702,24 +439,6 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a6ef517f0926dd24a1582492c791b6a4818a4d94e789a334894aa15b0d12f55c" -[[package]] -name = "const_panic" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e262cdaac42494e3ae34c43969f9cdeb7da178bdb4b66fa6a1ea2edb4c8ae652" -dependencies = [ - "typewit", -] - -[[package]] -name = "cookie-factory" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9885fa71e26b8ab7855e2ec7cae6e9b380edff76cd052e07c683a0319d51b3a2" -dependencies = [ - "futures", -] - [[package]] name = "core-foundation" version = "0.9.4" @@ -746,18 +465,6 @@ version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" -[[package]] -name = "cpio-archive" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f11d34b07689c21889fc89bd7cc885b3244b0157bbededf4a1c159832cd0df05" -dependencies = [ - "chrono", - "is_executable", - "simple-file-manifest", - "thiserror 1.0.69", -] - [[package]] name = "cpubits" version = "0.1.1" @@ -791,31 +498,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "crossbeam-deque" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" -dependencies = [ - "crossbeam-epoch", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" - [[package]] name = "crypto-bigint" version = "0.5.5" @@ -963,8 +645,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" dependencies = [ "const-oid 0.9.6", - "der_derive 0.7.3", - "flagset", "pem-rfc7468 0.7.0", "zeroize", ] @@ -976,7 +656,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71fd89660b2dc699704064e59e9dba0147b903e85319429e131620d022be411b" dependencies = [ "const-oid 0.10.2", - "der_derive 0.8.0", + "der_derive", "flagset", "pem-rfc7468 1.0.0", "zeroize", @@ -996,17 +676,6 @@ dependencies = [ "rusticata-macros", ] -[[package]] -name = "der_derive" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8034092389675178f570469e6c3b0465d3d30b4505c294a6550db47f3c17ad18" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "der_derive" version = "0.8.0" @@ -1027,15 +696,6 @@ dependencies = [ "powerfmt", ] -[[package]] -name = "des" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffdd80ce8ce993de27e9f063a444a4d53ce8e8db4c1f00cc03af5ad5a9867a1e" -dependencies = [ - "cipher 0.4.4", -] - [[package]] name = "des" version = "0.9.0" @@ -1045,25 +705,6 @@ dependencies = [ "cipher 0.5.1", ] -[[package]] -name = "dialoguer" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "658bce805d770f407bc62102fca7c2c64ceef2fbcb2b8bd19d2765ce093980de" -dependencies = [ - "console", - "shell-words", - "tempfile", - "thiserror 1.0.69", - "zeroize", -] - -[[package]] -name = "difference" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" - [[package]] name = "digest" version = "0.10.7" @@ -1089,43 +730,16 @@ dependencies = [ ] [[package]] -name = "dirs" -version = "5.0.1" +name = "displaydoc" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" -dependencies = [ - "dirs-sys", -] - -[[package]] -name = "dirs-sys" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" -dependencies = [ - "libc", - "option-ext", - "redox_users", - "windows-sys 0.48.0", -] - -[[package]] -name = "displaydoc" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", "syn", ] -[[package]] -name = "dunce" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" - [[package]] name = "ecdsa" version = "0.16.9" @@ -1164,12 +778,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "either" -version = "1.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" - [[package]] name = "elliptic-curve" version = "0.13.8" @@ -1191,12 +799,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "encode_unicode" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" - [[package]] name = "encoding_rs" version = "0.8.35" @@ -1206,29 +808,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "env_filter" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32e90c2accc4b07a8456ea0debdc2e7587bdd890680d71173a15d4ae604f6eef" -dependencies = [ - "log", - "regex", -] - -[[package]] -name = "env_logger" -version = "0.11.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0621c04f2196ac3f488dd583365b9c09be011a4ab8b9f37248ffcc8f6198b56a" -dependencies = [ - "anstream", - "anstyle", - "env_filter", - "jiff", - "log", -] - [[package]] name = "equivalent" version = "1.0.2" @@ -1267,31 +846,6 @@ version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" -[[package]] -name = "figment" -version = "0.10.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cb01cd46b0cf372153850f4c6c272d9cbea2da513e07538405148f95bd789f3" -dependencies = [ - "atomic", - "pear", - "serde", - "toml", - "uncased", - "version_check", -] - -[[package]] -name = "filetime" -version = "0.2.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f98844151eee8917efc50bd9e8318cb963ae8b297431495d3f758616ea5c57db" -dependencies = [ - "cfg-if", - "libc", - "libredox", -] - [[package]] name = "find-msvc-tools" version = "0.1.9" @@ -1351,18 +905,6 @@ dependencies = [ "percent-encoding", ] -[[package]] -name = "fs_extra" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" - -[[package]] -name = "funty" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" - [[package]] name = "futures" version = "0.3.32" @@ -1495,11 +1037,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" dependencies = [ "cfg-if", - "js-sys", "libc", "r-efi 5.3.0", "wasip2", - "wasm-bindgen", ] [[package]] @@ -1537,23 +1077,6 @@ dependencies = [ "polyval 0.7.1", ] -[[package]] -name = "glob" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" - -[[package]] -name = "goblin" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daa0a64d21a7eb230583b4c5f4e23b7e4e57974f96620f42a7e75e08ae66d745" -dependencies = [ - "log", - "plain", - "scroll", -] - [[package]] name = "group" version = "0.13.0" @@ -1584,15 +1107,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "hashbrown" -version = "0.14.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" -dependencies = [ - "ahash", -] - [[package]] name = "hashbrown" version = "0.15.5" @@ -1610,9 +1124,9 @@ checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" [[package]] name = "hashbrown" -version = "0.17.0" +version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f467dd6dccf739c208452f8014c75c18bb8301b050ad1cfb27153803edb0f51" +checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" [[package]] name = "heck" @@ -1694,9 +1208,9 @@ checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" [[package]] name = "hybrid-array" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d46837a0ed51fe95bd3b05de33cd64a1ee88fc797477ca48446872504507c5" +checksum = "9155a582abd142abc056962c29e3ce5ff2ad5469f4246b537ed42c5deba857da" dependencies = [ "typenum", ] @@ -1892,9 +1406,9 @@ checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954" [[package]] name = "idevice" -version = "0.1.60" +version = "0.1.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eb824248fe76a393fbb52da9c7c180e258e7228f6397672d4821cb7867c4bf7" +checksum = "ab414e99190ac3dcd39587a210c1799ec3f8ef5943d132024108409bfa6976ab" dependencies = [ "async_zip", "base64", @@ -1910,7 +1424,7 @@ dependencies = [ "rustls-pki-types", "rustls-rustcrypto", "serde", - "thiserror 2.0.18", + "thiserror", "tokio", "tokio-rustls", "tracing", @@ -1946,24 +1460,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9" dependencies = [ "equivalent", - "hashbrown 0.17.0", + "hashbrown 0.17.1", "serde", "serde_core", ] -[[package]] -name = "inlinable_string" -version = "0.1.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8fae54786f62fb2918dcfae3d568594e50eb9b5c25bf04371af6fe7516452fb" - [[package]] name = "inout" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01" dependencies = [ - "block-padding 0.3.3", "generic-array", ] @@ -1973,7 +1480,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4250ce6452e92010fdf7268ccc5d14faa80bb12fc741938534c58f16804e03c7" dependencies = [ - "block-padding 0.4.2", + "block-padding", "hybrid-array", ] @@ -1983,21 +1490,6 @@ version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2" -[[package]] -name = "is_executable" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baabb8b4867b26294d818bf3f651a454b6901431711abb96e296245888d6e8c4" -dependencies = [ - "windows-sys 0.60.2", -] - -[[package]] -name = "is_terminal_polyfill" -version = "1.70.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" - [[package]] name = "isideload" version = "0.2.22" @@ -2006,254 +1498,95 @@ dependencies = [ "aes-gcm 0.11.0-rc.3", "async-trait", "base64", - "cbc 0.2.0", + "cbc", + "futures", "futures-util", "getrandom 0.2.17", "getrandom 0.4.2", "hex", "hmac 0.13.0", + "http", "idevice", - "isideload-apple-codesign", "isideload-p12-keystore", "isideload-x509-certificate", "keyring", - "pbkdf2 0.13.0", + "pbkdf2", "plist", "plist-macro", "rand 0.10.1", "rcgen", "reqwest", + "reqwest-middleware", + "ring", "rootcause", "rsa 0.10.0-rc.18", + "rustls", "serde", "serde_json", "sha1 0.11.0", "sha2 0.11.0", "srp", - "thiserror 2.0.18", + "thiserror", "tokio", "tokio-tungstenite", "tracing", + "urlencoding", "uuid", + "web-time", + "ws_stream_wasm", "zip", ] -[[package]] -name = "isideload-apple-codesign" -version = "0.29.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51fa9e2b18c4408d79afc72d21b581ffe2fe95d1fb457a997dc3a091a7a3b2dd" -dependencies = [ - "anyhow", - "apple-bundles", - "aws-lc-rs", - "base64", - "bcder", - "bitflags", - "bytes", - "chrono", - "clap", - "der 0.7.10", - "dialoguer", - "difference", - "digest 0.10.7", - "dirs", - "elliptic-curve", - "env_logger", - "figment", - "filetime", - "glob", - "goblin", - "hex", - "isideload-apple-flat-package", - "isideload-apple-xar", - "isideload-cryptographic-message-syntax", - "isideload-x509-certificate", - "log", - "md-5", - "num-traits", - "object", - "oid-registry", - "once_cell", - "p12", - "p12-keystore", - "p256", - "pem", - "pkcs1 0.7.5", - "pkcs8 0.10.2", - "plist", - "rand 0.8.6", - "rasn", - "rayon", - "regex", - "rsa 0.9.10", - "scroll", - "security-framework 2.11.1", - "security-framework-sys", - "semver", - "serde", - "serde_json", - "serde_yaml", - "sha2 0.10.9", - "signature 2.2.0", - "simple-file-manifest", - "spki 0.7.3", - "subtle", - "tempfile", - "thiserror 2.0.18", - "tokio", - "uuid", - "walkdir", - "widestring", - "windows-sys 0.59.0", - "x509", - "xml-rs", - "yasna", - "zeroize", - "zip", - "zip_structs", -] - -[[package]] -name = "isideload-apple-flat-package" -version = "0.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25f3978cc1914a7a50335bcadcf0153ecca6d0197b78a351a2fe5ee6d2459e14" -dependencies = [ - "cpio-archive", - "flate2", - "isideload-apple-xar", - "scroll", - "serde", - "serde-xml-rs", - "thiserror 2.0.18", -] - -[[package]] -name = "isideload-apple-xar" -version = "0.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad30993dda492d8ec75641d93569f22644a2c7304d8a67199149035f0f5789f4" -dependencies = [ - "base64", - "bcder", - "bzip2", - "chrono", - "digest 0.10.7", - "flate2", - "isideload-cryptographic-message-syntax", - "isideload-x509-certificate", - "log", - "md-5", - "rand 0.8.6", - "scroll", - "serde", - "serde-xml-rs", - "sha1 0.10.6", - "sha2 0.10.9", - "signature 2.2.0", - "thiserror 2.0.18", - "xml-rs", - "xz2", -] - -[[package]] -name = "isideload-cryptographic-message-syntax" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1adacd3764e74e0041ac53c0dbb4e5a2d6833834afdbd58caaff272cd703f82f" -dependencies = [ - "aws-lc-rs", - "bcder", - "bytes", - "chrono", - "hex", - "isideload-x509-certificate", - "pem", - "signature 2.2.0", -] - [[package]] name = "isideload-p12-keystore" version = "0.3.0-rc4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "169d9344eb672235ee5e1f311809d7dec0b3a0448ce5138d53d0f19c2924d6f9" dependencies = [ - "cbc 0.2.0", - "cms 0.3.0-pre.1", + "cbc", + "cms", "der 0.8.0", - "des 0.9.0", + "des", "hex", "hmac 0.13.0", - "pkcs12 0.2.0-pre.0", + "pkcs12", "pkcs5 0.8.0", "pkcs8 0.11.0", "rand 0.10.1", - "rc2 0.9.0", + "rc2", "sha1 0.11.0", "sha2 0.11.0", - "thiserror 2.0.18", + "thiserror", "x509-parser", ] [[package]] name = "isideload-x509-certificate" -version = "0.25.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b8f6640892423dd86bac32808e94d586595b3e09a8e3b99ca101dc570d084bc" +checksum = "12f85f3d655536bce5bf609cd70283f851e221371eb5724aaa03783a9e804a2f" dependencies = [ - "aws-lc-rs", "bcder", "bytes", "chrono", "der 0.7.10", + "getrandom 0.2.17", + "getrandom 0.4.2", "hex", "pem", + "ring", "signature 2.2.0", "spki 0.7.3", - "thiserror 2.0.18", + "thiserror", "zeroize", ] -[[package]] -name = "itertools" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" -dependencies = [ - "either", -] - [[package]] name = "itoa" version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" -[[package]] -name = "jiff" -version = "0.2.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f00b5dbd620d61dfdcb6007c9c1f6054ebd75319f163d886a9055cec1155073d" -dependencies = [ - "jiff-static", - "log", - "portable-atomic", - "portable-atomic-util", - "serde_core", -] - -[[package]] -name = "jiff-static" -version = "0.2.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e000de030ff8022ea1da3f466fbb0f3a809f5e51ed31f6dd931c35181ad8e6d7" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "jni" version = "0.22.4" @@ -2266,7 +1599,7 @@ dependencies = [ "jni-sys", "log", "simd_cesu8", - "thiserror 2.0.18", + "thiserror", "walkdir", "windows-link", ] @@ -2303,16 +1636,6 @@ dependencies = [ "syn", ] -[[package]] -name = "jobserver" -version = "0.1.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" -dependencies = [ - "getrandom 0.3.4", - "libc", -] - [[package]] name = "js-sys" version = "0.3.98" @@ -2341,26 +1664,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "konst" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97feab15b395d1860944abe6a8dd8ed9f8eadfae01750fada8427abda531d887" -dependencies = [ - "const_panic", - "konst_kernel", - "typewit", -] - -[[package]] -name = "konst_kernel" -version = "0.3.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4b1eb7788f3824c629b1116a7a9060d6e898c358ebff59070093d51103dcc3c" -dependencies = [ - "typewit", -] - [[package]] name = "lazy_static" version = "1.5.0" @@ -2397,18 +1700,6 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" -[[package]] -name = "libredox" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e02f3bb43d335493c96bf3fd3a321600bf6bd07ed34bc64118e9293bdffea46c" -dependencies = [ - "bitflags", - "libc", - "plain", - "redox_syscall 0.7.5", -] - [[package]] name = "linux-keyutils" version = "0.2.5" @@ -2446,33 +1737,6 @@ version = "0.4.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" -[[package]] -name = "lru-slab" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" - -[[package]] -name = "lzma-sys" -version = "0.1.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fda04ab3764e6cde78b9974eec4f779acaba7c4e84b36eca3cf77c581b85d27" -dependencies = [ - "cc", - "libc", - "pkg-config", -] - -[[package]] -name = "md-5" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" -dependencies = [ - "cfg-if", - "digest 0.10.7", -] - [[package]] name = "memchr" version = "2.8.0" @@ -2488,15 +1752,6 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "minimal" version = "0.1.0" -dependencies = [ - "idevice", - "isideload", - "plist", - "plist-macro", - "tokio", - "tracing", - "tracing-subscriber", -] [[package]] name = "minimal-lexical" @@ -2552,15 +1807,6 @@ dependencies = [ "minimal-lexical", ] -[[package]] -name = "nu-ansi-term" -version = "0.50.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" -dependencies = [ - "windows-sys 0.61.2", -] - [[package]] name = "num-bigint" version = "0.4.6" @@ -2623,20 +1869,6 @@ dependencies = [ "libm", ] -[[package]] -name = "object" -version = "0.36.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" -dependencies = [ - "crc32fast", - "flate2", - "hashbrown 0.15.5", - "indexmap", - "memchr", - "ruzstd", -] - [[package]] name = "oid-registry" version = "0.8.1" @@ -2652,12 +1884,6 @@ version = "1.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" -[[package]] -name = "once_cell_polyfill" -version = "1.70.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" - [[package]] name = "opaque-debug" version = "0.3.1" @@ -2666,9 +1892,9 @@ checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "openssl" -version = "0.10.79" +version = "0.10.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf0b434746ee2832f4f0baf10137e1cabb18cbe6912c69e2e33263c45250f542" +checksum = "a45fa2aa886c42762255da344f0a0d313e254066c46aad76f300c3d3da62d967" dependencies = [ "bitflags", "cfg-if", @@ -2697,9 +1923,9 @@ checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe" [[package]] name = "openssl-sys" -version = "0.9.115" +version = "0.9.116" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "158fe5b292746440aa6e7a7e690e55aeb72d41505e2804c23c6973ad0e9c9781" +checksum = "f28a22dc7140cda5f096e5e7724a6962ca81a7f8bfd2979f9b18c11af56318c4" dependencies = [ "cc", "libc", @@ -2707,52 +1933,6 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "option-ext" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" - -[[package]] -name = "p12" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4873306de53fe82e7e484df31e1e947d61514b6ea2ed6cd7b45d63006fd9224" -dependencies = [ - "cbc 0.1.2", - "cipher 0.4.4", - "des 0.8.1", - "getrandom 0.2.17", - "hmac 0.12.1", - "lazy_static", - "rc2 0.8.1", - "sha1 0.10.6", - "yasna", -] - -[[package]] -name = "p12-keystore" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffb9bf5222606eb712d3bb30e01bc9420545b00859970897e70c682353a034f2" -dependencies = [ - "base64", - "cbc 0.1.2", - "cms 0.2.3", - "der 0.7.10", - "des 0.8.1", - "hex", - "hmac 0.12.1", - "pkcs12 0.1.0", - "pkcs5 0.7.1", - "rand 0.10.1", - "rc2 0.8.1", - "sha1 0.10.6", - "sha2 0.10.9", - "thiserror 2.0.18", - "x509-parser", -] - [[package]] name = "p256" version = "0.13.2" @@ -2801,7 +1981,7 @@ checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.18", + "redox_syscall", "smallvec", "windows-link", ] @@ -2812,16 +1992,6 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" -[[package]] -name = "pbkdf2" -version = "0.12.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" -dependencies = [ - "digest 0.10.7", - "hmac 0.12.1", -] - [[package]] name = "pbkdf2" version = "0.13.0" @@ -2832,29 +2002,6 @@ dependencies = [ "hmac 0.13.0", ] -[[package]] -name = "pear" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdeeaa00ce488657faba8ebf44ab9361f9365a97bd39ffb8a60663f57ff4b467" -dependencies = [ - "inlinable_string", - "pear_codegen", - "yansi", -] - -[[package]] -name = "pear_codegen" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bab5b985dc082b345f812b7df84e1bef27e7207b39e448439ba8bd69c93f147" -dependencies = [ - "proc-macro2", - "proc-macro2-diagnostics", - "quote", - "syn", -] - [[package]] name = "pem" version = "3.0.6" @@ -2889,20 +2036,30 @@ version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" +[[package]] +name = "pharos" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9567389417feee6ce15dd6527a8a1ecac205ef62c2932bcf3d9f6fc5b78b414" +dependencies = [ + "futures", + "rustc_version", +] + [[package]] name = "pin-project" -version = "1.1.12" +version = "1.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbf0d9e68100b3a7989b4901972f265cd542e560a3a8a724e1e20322f4d06ce9" +checksum = "2466b2336ed02bcdca6b294417127b90ec92038d1d5c4fbeac971a922e0e0924" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.12" +version = "1.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a990e22f43e84855daf260dded30524ef4a9021cc7541c26540500a50b624389" +checksum = "c96395f0a926bc13b1c17622aaddda1ecb55d49c8f1bf9777e4d877800a43f8b" dependencies = [ "proc-macro2", "quote", @@ -2933,28 +2090,13 @@ dependencies = [ ] [[package]] -name = "pkcs1" -version = "0.8.0-rc.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "986d2e952779af96ea048f160fd9194e1751b4faea78bcf3ceb456efe008088e" -dependencies = [ - "der 0.8.0", - "spki 0.8.0", -] - -[[package]] -name = "pkcs12" -version = "0.1.0" +name = "pkcs1" +version = "0.8.0-rc.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "695b3df3d3cc1015f12d70235e35b6b79befc5fa7a9b95b951eab1dd07c9efc2" +checksum = "986d2e952779af96ea048f160fd9194e1751b4faea78bcf3ceb456efe008088e" dependencies = [ - "cms 0.2.3", - "const-oid 0.9.6", - "der 0.7.10", - "digest 0.10.7", - "spki 0.7.3", - "x509-cert 0.2.5", - "zeroize", + "der 0.8.0", + "spki 0.8.0", ] [[package]] @@ -2963,12 +2105,12 @@ version = "0.2.0-pre.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8059bd79345d1d1c125656025814704bab5cdd204b1cefd5fab59b0fdd7476d2" dependencies = [ - "cms 0.3.0-pre.1", + "cms", "const-oid 0.10.2", "der 0.8.0", "digest 0.11.3", "spki 0.8.0", - "x509-cert 0.3.0-rc.4", + "x509-cert", "zeroize", ] @@ -2978,12 +2120,7 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e847e2c91a18bfa887dd028ec33f2fe6f25db77db3619024764914affe8b69a6" dependencies = [ - "aes 0.8.4", - "cbc 0.1.2", "der 0.7.10", - "pbkdf2 0.12.2", - "scrypt 0.11.0", - "sha2 0.10.9", "spki 0.7.3", ] @@ -2994,10 +2131,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "279a91971a1d8eb1260a30938eae3be9cb67b472dffecb222fbbbe2fd2dc1453" dependencies = [ "aes 0.9.0", - "cbc 0.2.0", + "cbc", "der 0.8.0", - "pbkdf2 0.13.0", - "scrypt 0.12.0", + "pbkdf2", + "scrypt", "sha2 0.11.0", "spki 0.8.0", ] @@ -3029,12 +2166,6 @@ version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "19f132c84eca552bf34cab8ec81f1c1dcc229b811638f9d283dceabe58c5569e" -[[package]] -name = "plain" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" - [[package]] name = "plist" version = "1.9.0" @@ -3091,21 +2222,6 @@ dependencies = [ "universal-hash 0.6.1", ] -[[package]] -name = "portable-atomic" -version = "1.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49" - -[[package]] -name = "portable-atomic-util" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2a106d1259c23fac8e543272398ae0e3c0b8d33c88ed73d0cc71b0f1d902618" -dependencies = [ - "portable-atomic", -] - [[package]] name = "potential_utf" version = "0.1.5" @@ -3158,84 +2274,15 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "proc-macro2-diagnostics" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "version_check", - "yansi", -] - [[package]] name = "quick-xml" -version = "0.39.3" +version = "0.39.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "721da970c312655cde9b4ffe0547f20a8494866a4af5ff51f18b7c633d0c870b" +checksum = "cdcc8dd4e2f670d309a5f0e83fe36dfdc05af317008fea29144da1a2ac858e5e" dependencies = [ "memchr", ] -[[package]] -name = "quinn" -version = "0.11.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e20a958963c291dc322d98411f541009df2ced7b5a4f2bd52337638cfccf20" -dependencies = [ - "bytes", - "cfg_aliases", - "pin-project-lite", - "quinn-proto", - "quinn-udp", - "rustc-hash", - "rustls", - "socket2", - "thiserror 2.0.18", - "tokio", - "tracing", - "web-time", -] - -[[package]] -name = "quinn-proto" -version = "0.11.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "434b42fec591c96ef50e21e886936e66d3cc3f737104fdb9b737c40ffb94c098" -dependencies = [ - "aws-lc-rs", - "bytes", - "getrandom 0.3.4", - "lru-slab", - "rand 0.9.4", - "ring", - "rustc-hash", - "rustls", - "rustls-pki-types", - "slab", - "thiserror 2.0.18", - "tinyvec", - "tracing", - "web-time", -] - -[[package]] -name = "quinn-udp" -version = "0.5.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "addec6a0dcad8a8d96a771f815f0eaf55f9d1805756410b39f5fa81332574cbd" -dependencies = [ - "cfg_aliases", - "libc", - "once_cell", - "socket2", - "tracing", - "windows-sys 0.60.2", -] - [[package]] name = "quote" version = "1.0.45" @@ -3257,19 +2304,12 @@ version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" -[[package]] -name = "radium" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" - [[package]] name = "rand" version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5ca0ecfa931c29007047d1bc58e623ab12e5590e8c7cc53200d5202b69266d8a" dependencies = [ - "libc", "rand_chacha 0.3.1", "rand_core 0.6.4", ] @@ -3339,74 +2379,6 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69" -[[package]] -name = "rasn" -version = "0.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e442690f86da40561d5548e7ffb4a18af90d1c1b3536090de847ca2d5a3a6426" -dependencies = [ - "arrayvec", - "bitvec", - "bitvec-nom2", - "bytes", - "chrono", - "either", - "hashbrown 0.14.5", - "konst", - "nom", - "num-bigint", - "num-integer", - "num-traits", - "once_cell", - "rasn-derive", - "serde_json", - "snafu", -] - -[[package]] -name = "rasn-derive" -version = "0.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96b0d374c7e4e985e6bc97ca7e7ad1d9642a8415db2017777d6e383002edaab2" -dependencies = [ - "either", - "itertools", - "proc-macro2", - "quote", - "rayon", - "syn", - "uuid", -] - -[[package]] -name = "rayon" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb39b166781f92d482534ef4b4b1b2568f42613b53e5b6c160e24cfbfa30926d" -dependencies = [ - "either", - "rayon-core", -] - -[[package]] -name = "rayon-core" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91" -dependencies = [ - "crossbeam-deque", - "crossbeam-utils", -] - -[[package]] -name = "rc2" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62c64daa8e9438b84aaae55010a93f396f8e60e3911590fcba770d04643fc1dd" -dependencies = [ - "cipher 0.4.4", -] - [[package]] name = "rc2" version = "0.9.0" @@ -3418,12 +2390,12 @@ dependencies = [ [[package]] name = "rcgen" -version = "0.14.7" +version = "0.14.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10b99e0098aa4082912d4c649628623db6aba77335e4f4569ff5083a6448b32e" +checksum = "57f6d249aad744e274e682777a50283a225a32705394ee6d5fcc01efa25e4055" dependencies = [ - "aws-lc-rs", "pem", + "ring", "rustls-pki-types", "time", "x509-parser", @@ -3439,55 +2411,6 @@ dependencies = [ "bitflags", ] -[[package]] -name = "redox_syscall" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4666a1a60d8412eab19d94f6d13dcc9cea0a5ef4fdf6a5db306537413c661b1b" -dependencies = [ - "bitflags", -] - -[[package]] -name = "redox_users" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" -dependencies = [ - "getrandom 0.2.17", - "libredox", - "thiserror 1.0.69", -] - -[[package]] -name = "regex" -version = "1.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.8.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" - [[package]] name = "reqwest" version = "0.13.3" @@ -3512,7 +2435,6 @@ dependencies = [ "native-tls", "percent-encoding", "pin-project-lite", - "quinn", "rustls", "rustls-pki-types", "rustls-platform-verifier", @@ -3531,6 +2453,20 @@ dependencies = [ "web-sys", ] +[[package]] +name = "reqwest-middleware" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "199dda04a536b532d0cc04d7979e39b1c763ea749bf91507017069c00b96056f" +dependencies = [ + "anyhow", + "async-trait", + "http", + "reqwest", + "thiserror", + "tower-service", +] + [[package]] name = "rfc6979" version = "0.4.0" @@ -3551,7 +2487,7 @@ dependencies = [ "cfg-if", "getrandom 0.2.17", "libc", - "untrusted 0.9.0", + "untrusted", "windows-sys 0.52.0", ] @@ -3659,8 +2595,8 @@ version = "0.23.40" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef86cd5876211988985292b91c96a8f2d298df24e75989a43a3c73f2d4d8168b" dependencies = [ - "aws-lc-rs", "once_cell", + "ring", "rustls-pki-types", "rustls-webpki 0.103.13", "subtle", @@ -3754,7 +2690,7 @@ checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" dependencies = [ "ring", "rustls-pki-types", - "untrusted 0.9.0", + "untrusted", ] [[package]] @@ -3763,10 +2699,9 @@ version = "0.103.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61c429a8649f110dddef65e2a5ad240f747e85f7758a6bccc7e5777bd33f756e" dependencies = [ - "aws-lc-rs", "ring", "rustls-pki-types", - "untrusted 0.9.0", + "untrusted", ] [[package]] @@ -3775,30 +2710,6 @@ version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" -[[package]] -name = "ruzstd" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fad02996bfc73da3e301efe90b1837be9ed8f4a462b6ed410aa35d00381de89f" -dependencies = [ - "twox-hash", -] - -[[package]] -name = "ryu" -version = "1.0.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" - -[[package]] -name = "salsa20" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97a22f5af31f73a954c10289c93e8a50cc23d971e80ee446f1f6f7137a088213" -dependencies = [ - "cipher 0.4.4", -] - [[package]] name = "salsa20" version = "0.11.0" @@ -3833,37 +2744,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" -[[package]] -name = "scroll" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ab8598aa408498679922eff7fa985c25d58a90771bd6be794434c5277eab1a6" -dependencies = [ - "scroll_derive", -] - -[[package]] -name = "scroll_derive" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1783eabc414609e28a5ba76aee5ddd52199f7107a0b24c2e9746a1ecc34a683d" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "scrypt" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0516a385866c09368f0b5bcd1caff3366aace790fcd46e2bb032697bb172fd1f" -dependencies = [ - "pbkdf2 0.12.2", - "salsa20 0.10.2", - "sha2 0.10.9", -] - [[package]] name = "scrypt" version = "0.12.0" @@ -3871,8 +2751,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d87af57419b594aa23fa95f09f0e06d80d84ba01c26148c43844cad6ff4485f0" dependencies = [ "cfg-if", - "pbkdf2 0.13.0", - "salsa20 0.11.0", + "pbkdf2", + "salsa20", "sha2 0.11.0", ] @@ -3932,6 +2812,12 @@ version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" +[[package]] +name = "send_wrapper" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" + [[package]] name = "serde" version = "1.0.228" @@ -3942,18 +2828,6 @@ dependencies = [ "serde_derive", ] -[[package]] -name = "serde-xml-rs" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb3aa78ecda1ebc9ec9847d5d3aba7d618823446a049ba2491940506da6e2782" -dependencies = [ - "log", - "serde", - "thiserror 1.0.69", - "xml-rs", -] - [[package]] name = "serde_core" version = "1.0.228" @@ -3987,28 +2861,6 @@ dependencies = [ "zmij", ] -[[package]] -name = "serde_spanned" -version = "0.6.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3" -dependencies = [ - "serde", -] - -[[package]] -name = "serde_yaml" -version = "0.9.34+deprecated" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" -dependencies = [ - "indexmap", - "itoa", - "ryu", - "serde", - "unsafe-libyaml", -] - [[package]] name = "serdect" version = "0.4.3" @@ -4063,21 +2915,6 @@ dependencies = [ "digest 0.11.3", ] -[[package]] -name = "sharded-slab" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" -dependencies = [ - "lazy_static", -] - -[[package]] -name = "shell-words" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc6fe69c597f9c37bfeeeeeb33da3530379845f10be461a66d16d03eca2ded77" - [[package]] name = "shlex" version = "1.3.0" @@ -4127,43 +2964,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" [[package]] -name = "simple-file-manifest" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dd19be0257552dd56d1bb6946f89f193c6e5b9f13cc9327c4bc84a357507c74" - -[[package]] -name = "slab" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" - -[[package]] -name = "smallvec" -version = "1.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" - -[[package]] -name = "snafu" -version = "0.8.9" +name = "slab" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e84b3f4eacbf3a1ce05eac6763b4d629d60cbc94d632e4092c54ade71f1e1a2" -dependencies = [ - "snafu-derive", -] +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" [[package]] -name = "snafu-derive" -version = "0.8.9" +name = "smallvec" +version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1c97747dbf44bb1ca44a561ece23508e99cb592e862f22222dcf42f51d1e451" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "syn", -] +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" [[package]] name = "socket2" @@ -4219,18 +3029,6 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - -[[package]] -name = "strsim" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" - [[package]] name = "subtle" version = "2.6.1" @@ -4289,12 +3087,6 @@ dependencies = [ "libc", ] -[[package]] -name = "tap" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" - [[package]] name = "tempfile" version = "3.27.0" @@ -4308,33 +3100,13 @@ dependencies = [ "windows-sys 0.61.2", ] -[[package]] -name = "thiserror" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" -dependencies = [ - "thiserror-impl 1.0.69", -] - [[package]] name = "thiserror" version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" dependencies = [ - "thiserror-impl 2.0.18", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" -dependencies = [ - "proc-macro2", - "quote", - "syn", + "thiserror-impl", ] [[package]] @@ -4348,15 +3120,6 @@ dependencies = [ "syn", ] -[[package]] -name = "thread_local" -version = "1.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" -dependencies = [ - "cfg-if", -] - [[package]] name = "time" version = "0.3.47" @@ -4398,47 +3161,20 @@ dependencies = [ "zerovec", ] -[[package]] -name = "tinyvec" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e61e67053d25a4e82c844e8424039d9745781b3fc4f32b8d55ed50f5f667ef3" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - [[package]] name = "tokio" -version = "1.52.2" +version = "1.52.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "110a78583f19d5cdb2c5ccf321d1290344e71313c6c37d43520d386027d18386" +checksum = "8fc7f01b389ac15039e4dc9531aa973a135d7a4135281b12d7c1bc79fd57fffe" dependencies = [ "bytes", "libc", "mio", "pin-project-lite", "socket2", - "tokio-macros", "windows-sys 0.61.2", ] -[[package]] -name = "tokio-macros" -version = "2.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "385a6cb71ab9ab790c5fe8d67f1645e6c450a7ce006a33de03daa956cf70a496" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "tokio-native-tls" version = "0.3.1" @@ -4489,47 +3225,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "toml" -version = "0.8.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" -dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit", -] - -[[package]] -name = "toml_datetime" -version = "0.6.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" -dependencies = [ - "serde", -] - -[[package]] -name = "toml_edit" -version = "0.22.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" -dependencies = [ - "indexmap", - "serde", - "serde_spanned", - "toml_datetime", - "toml_write", - "winnow", -] - -[[package]] -name = "toml_write" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" - [[package]] name = "tower" version = "0.5.3" @@ -4609,32 +3304,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" dependencies = [ "once_cell", - "valuable", -] - -[[package]] -name = "tracing-log" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" -dependencies = [ - "log", - "once_cell", - "tracing-core", -] - -[[package]] -name = "tracing-subscriber" -version = "0.3.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7f578e5945fb242538965c2d0b04418d38ec25c79d160cd279bf0731c8d319" -dependencies = [ - "nu-ansi-term", - "sharded-slab", - "smallvec", - "thread_local", - "tracing-core", - "tracing-log", ] [[package]] @@ -4664,17 +3333,7 @@ dependencies = [ "rustls", "rustls-pki-types", "sha1 0.10.6", - "thiserror 2.0.18", -] - -[[package]] -name = "twox-hash" -version = "1.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" -dependencies = [ - "cfg-if", - "static_assertions", + "thiserror", ] [[package]] @@ -4689,42 +3348,12 @@ version = "1.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40ce102ab67701b8526c123c1bab5cbe42d7040ccfd0f64af1a385808d2f43de" -[[package]] -name = "typewit" -version = "1.15.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "214ca0b2191785cbc06209b9ca1861e048e39b5ba33574b3cedd58363d5bb5f6" -dependencies = [ - "typewit_proc_macros", -] - -[[package]] -name = "typewit_proc_macros" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e36a83ea2b3c704935a01b4642946aadd445cea40b10935e3f8bd8052b8193d6" - -[[package]] -name = "uncased" -version = "0.9.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1b88fcfe09e89d3866a5c11019378088af2d24c3fbd4f0543f96b479ec90697" -dependencies = [ - "version_check", -] - [[package]] name = "unicode-ident" version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" -[[package]] -name = "unicode-width" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" - [[package]] name = "unicode-xid" version = "0.2.6" @@ -4751,18 +3380,6 @@ dependencies = [ "ctutils", ] -[[package]] -name = "unsafe-libyaml" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" - -[[package]] -name = "untrusted" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" - [[package]] name = "untrusted" version = "0.9.0" @@ -4782,16 +3399,16 @@ dependencies = [ ] [[package]] -name = "utf8_iter" -version = "1.0.4" +name = "urlencoding" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" +checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" [[package]] -name = "utf8parse" -version = "0.2.2" +name = "utf8_iter" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" [[package]] name = "uuid" @@ -4804,12 +3421,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "valuable" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" - [[package]] name = "vcpkg" version = "0.2.15" @@ -5014,12 +3625,6 @@ dependencies = [ "rustls-pki-types", ] -[[package]] -name = "widestring" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72069c3113ab32ab29e5584db3c6ec55d416895e60715417b5b883a357c3e471" - [[package]] name = "winapi-util" version = "0.1.11" @@ -5099,15 +3704,6 @@ dependencies = [ "windows-link", ] -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.5", -] - [[package]] name = "windows-sys" version = "0.52.0" @@ -5117,15 +3713,6 @@ dependencies = [ "windows-targets 0.52.6", ] -[[package]] -name = "windows-sys" -version = "0.59.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" -dependencies = [ - "windows-targets 0.52.6", -] - [[package]] name = "windows-sys" version = "0.60.2" @@ -5144,21 +3731,6 @@ dependencies = [ "windows-link", ] -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", -] - [[package]] name = "windows-targets" version = "0.52.6" @@ -5192,12 +3764,6 @@ dependencies = [ "windows_x86_64_msvc 0.53.1", ] -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" @@ -5210,12 +3776,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - [[package]] name = "windows_aarch64_msvc" version = "0.52.6" @@ -5228,12 +3788,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - [[package]] name = "windows_i686_gnu" version = "0.52.6" @@ -5258,12 +3812,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - [[package]] name = "windows_i686_msvc" version = "0.52.6" @@ -5276,12 +3824,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - [[package]] name = "windows_x86_64_gnu" version = "0.52.6" @@ -5294,12 +3836,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" @@ -5312,12 +3848,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - [[package]] name = "windows_x86_64_msvc" version = "0.52.6" @@ -5330,15 +3860,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" -[[package]] -name = "winnow" -version = "0.7.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df79d97927682d2fd8adb29682d1140b343be4ac0f08fd68b7765d9c059d3945" -dependencies = [ - "memchr", -] - [[package]] name = "wit-bindgen" version = "0.51.0" @@ -5440,12 +3961,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ffae5123b2d3fc086436f8834ae3ab053a283cfac8fe0a0b8eaae044768a4c4" [[package]] -name = "wyz" -version = "0.5.1" +name = "ws_stream_wasm" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +checksum = "6c173014acad22e83f16403ee360115b38846fe754e735c5d9d3803fe70c6abc" dependencies = [ - "tap", + "async_io_stream", + "futures", + "js-sys", + "log", + "pharos", + "rustc_version", + "send_wrapper", + "thiserror", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", ] [[package]] @@ -5459,27 +3990,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "x509" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3cec94c3999f31341553f358ef55f65fc031291a022cd42ec0ce7219560c76" -dependencies = [ - "chrono", - "cookie-factory", -] - -[[package]] -name = "x509-cert" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1301e935010a701ae5f8655edc0ad17c44bad3ac5ce8c39185f75453b720ae94" -dependencies = [ - "const-oid 0.9.6", - "der 0.7.10", - "spki 0.7.3", -] - [[package]] name = "x509-cert" version = "0.3.0-rc.4" @@ -5498,44 +4008,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d43b0f71ce057da06bc0851b23ee24f3f86190b07203dd8f567d0b706a185202" dependencies = [ "asn1-rs", - "aws-lc-rs", "data-encoding", "der-parser", "lazy_static", "nom", "oid-registry", + "ring", "rusticata-macros", - "thiserror 2.0.18", + "thiserror", "time", ] -[[package]] -name = "xml-rs" -version = "0.8.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ae8337f8a065cfc972643663ea4279e04e7256de865aa66fe25cec5fb912d3f" - -[[package]] -name = "xz2" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "388c44dc09d76f1536602ead6d325eb532f5c122f17782bd57fb47baeeb767e2" -dependencies = [ - "lzma-sys", -] - -[[package]] -name = "yansi" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" - [[package]] name = "yasna" -version = "0.5.2" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" +checksum = "b5f6765e852b9b4dc8e2a76843e4d64d1cea8e79bcde0b6901aea8e7c7f08282" dependencies = [ + "bit-vec", "time", ] @@ -5584,9 +4074,9 @@ dependencies = [ [[package]] name = "zerofrom" -version = "0.1.7" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69faa1f2a1ea75661980b013019ed6687ed0e83d069bc1114e2cc74c6c04c4df" +checksum = "0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272" dependencies = [ "zerofrom-derive", ] @@ -5670,17 +4160,6 @@ dependencies = [ "zopfli", ] -[[package]] -name = "zip_structs" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce824a6bfffe8942820fa36d24973b7c83a40896749a42e33de0abdd11750ee5" -dependencies = [ - "byteorder", - "bytesize", - "thiserror 1.0.69", -] - [[package]] name = "zlib-rs" version = "0.6.3" diff --git a/examples/minimal/Cargo.toml b/examples/minimal/Cargo.toml index abf29a2..d861c81 100644 --- a/examples/minimal/Cargo.toml +++ b/examples/minimal/Cargo.toml @@ -4,10 +4,10 @@ version = "0.1.0" edition = "2024" [dependencies] -isideload = { path = "../../isideload" } -plist = "1.8.0" -plist-macro = "0.1.3" -tokio = { version = "1.49.0", features = ["rt-multi-thread", "macros"] } -tracing = "0.1.44" -tracing-subscriber = "0.3.22" -idevice = { version = "0.1.54", features = ["usbmuxd"] } \ No newline at end of file +# isideload = { path = "../../isideload" } +# plist = "1.8.0" +# plist-macro = "0.1.3" +# tokio = { version = "1.40.0", features = ["rt-multi-thread", "macros"] } +# tracing = "0.1.44" +# tracing-subscriber = "0.3.22" +# idevice = { version = "0.1.61", default-features = false, features = ["usbmuxd", "ring"] } \ No newline at end of file diff --git a/examples/minimal/src/main.rs b/examples/minimal/src/main.rs index d24ccf7..2170baa 100644 --- a/examples/minimal/src/main.rs +++ b/examples/minimal/src/main.rs @@ -1,136 +1,136 @@ -use std::{env, path::PathBuf}; - -use idevice::usbmuxd::{UsbmuxdAddr, UsbmuxdConnection}; -use isideload::{ - anisette::remote_v3::RemoteV3AnisetteProvider, - auth::apple_account::AppleAccount, - dev::{ - certificates::DevelopmentCertificate, developer_session::DeveloperSession, - teams::DeveloperTeam, - }, - sideload::{SideloaderBuilder, TeamSelection, builder::MaxCertsBehavior}, - util::keyring_storage::KeyringStorage, -}; - -use tracing::Level; -use tracing_subscriber::FmtSubscriber; - -#[tokio::main] -async fn main() { - isideload::init().expect("Failed to initialize error reporting"); - let subscriber = FmtSubscriber::builder() - .with_max_level(Level::INFO) - .finish(); - tracing::subscriber::set_global_default(subscriber).expect("setting default subscriber failed"); - - let args: Vec = env::args().collect(); - - let apple_id = args - .get(1) - .expect("Please provide the Apple ID to use for installation"); - let apple_password = args.get(2).expect("Please provide the Apple ID password"); - let app_path = PathBuf::from( - args.get(3) - .expect("Please provide the path to the app to install"), - ); - - let get_2fa_code = || { - let mut code = String::new(); - println!("Enter 2FA code:"); - std::io::stdin().read_line(&mut code).unwrap(); - Some(code.trim().to_string()) - }; - - let account = AppleAccount::builder(apple_id) - .anisette_provider( - RemoteV3AnisetteProvider::default() - .unwrap() - .set_serial_number("2".to_string()), - ) - .login(apple_password, get_2fa_code) - .await; - - let mut account = account.unwrap(); - - let dev_session = DeveloperSession::from_account(&mut account) - .await - .expect("Failed to create developer session"); - - let usbmuxd = UsbmuxdConnection::default().await; - if usbmuxd.is_err() { - panic!("Failed to connect to usbmuxd: {:?}", usbmuxd.err()); - } - let mut usbmuxd = usbmuxd.unwrap(); - - let devs = usbmuxd.get_devices().await.unwrap(); - if devs.is_empty() { - panic!("No devices found"); - } - - let provider = devs - .first() - .unwrap() - .to_provider(UsbmuxdAddr::from_env_var().unwrap(), "isideload-demo"); - - let team_selection_prompt = |teams: &Vec| { - println!("Please select a team:"); - for (index, team) in teams.iter().enumerate() { - println!( - "{}: {} ({})", - index + 1, - team.name.as_deref().unwrap_or(""), - team.team_id - ); - } - let mut input = String::new(); - std::io::stdin().read_line(&mut input).unwrap(); - let selection = input.trim().parse::().ok()?; - if selection == 0 || selection > teams.len() { - return None; - } - Some(teams[selection - 1].team_id.clone()) - }; - - let cert_selection_prompt = |certs: &Vec| { - println!("Maximum number of certificates reached. Please select certificates to revoke:"); - for (index, cert) in certs.iter().enumerate() { - println!( - "({}) {}: {}", - index + 1, - cert.name.as_deref().unwrap_or(""), - cert.machine_name.as_deref().unwrap_or(""), - ); - } - println!("Enter the numbers of the certificates to revoke, separated by commas:"); - let mut input = String::new(); - std::io::stdin().read_line(&mut input).unwrap(); - let selections: Vec = input - .trim() - .split(',') - .filter_map(|s| s.trim().parse::().ok()) - .filter(|&n| n > 0 && n <= certs.len()) - .collect(); - if selections.is_empty() { - return None; - } - Some( - selections - .into_iter() - .map(|n| certs[n - 1].serial_number.clone().unwrap_or_default()) - .collect::>(), - ) - }; - - let mut sideloader = SideloaderBuilder::new(dev_session, apple_id.to_string()) - .team_selection(TeamSelection::PromptOnce(team_selection_prompt)) - .max_certs_behavior(MaxCertsBehavior::Prompt(Box::new(cert_selection_prompt))) - .storage(Box::new(KeyringStorage::new("minimal".to_string()))) - .machine_name("isideload-minimal".to_string()) - .build(); - - let result = sideloader.install_app(&provider, app_path, true).await; - match result { - Ok(_) => println!("App installed successfully"), - Err(e) => panic!("{}", e), - } -} +// use std::{env, path::PathBuf}; + +// use idevice::usbmuxd::{UsbmuxdAddr, UsbmuxdConnection}; +// use isideload::{ +// anisette::remote_v3::RemoteV3AnisetteProvider, +// auth::apple_account::AppleAccount, +// dev::{ +// certificates::DevelopmentCertificate, developer_session::DeveloperSession, +// teams::DeveloperTeam, +// }, +// sideload::{SideloaderBuilder, TeamSelection, builder::MaxCertsBehavior}, +// util::keyring_storage::KeyringStorage, +// }; + +// use tracing::Level; +// use tracing_subscriber::FmtSubscriber; + +// #[tokio::main] +// async fn main() { +// isideload::init().expect("Failed to initialize error reporting"); +// let subscriber = FmtSubscriber::builder() +// .with_max_level(Level::INFO) +// .finish(); +// tracing::subscriber::set_global_default(subscriber).expect("setting default subscriber failed"); + +// let args: Vec = env::args().collect(); + +// let apple_id = args +// .get(1) +// .expect("Please provide the Apple ID to use for installation"); +// let apple_password = args.get(2).expect("Please provide the Apple ID password"); +// let app_path = PathBuf::from( +// args.get(3) +// .expect("Please provide the path to the app to install"), +// ); + +// let get_2fa_code = || { +// let mut code = String::new(); +// println!("Enter 2FA code:"); +// std::io::stdin().read_line(&mut code).unwrap(); +// Some(code.trim().to_string()) +// }; + +// let account = AppleAccount::builder(apple_id) +// .anisette_provider( +// RemoteV3AnisetteProvider::default() +// .unwrap() +// .set_serial_number("2".to_string()), +// ) +// .login(apple_password, get_2fa_code) +// .await; + +// let mut account = account.unwrap(); + +// let dev_session = DeveloperSession::from_account(&mut account) +// .await +// .expect("Failed to create developer session"); + +// let usbmuxd = UsbmuxdConnection::default().await; +// if usbmuxd.is_err() { +// panic!("Failed to connect to usbmuxd: {:?}", usbmuxd.err()); +// } +// let mut usbmuxd = usbmuxd.unwrap(); + +// let devs = usbmuxd.get_devices().await.unwrap(); +// if devs.is_empty() { +// panic!("No devices found"); +// } + +// let provider = devs +// .first() +// .unwrap() +// .to_provider(UsbmuxdAddr::from_env_var().unwrap(), "isideload-demo"); + +// let team_selection_prompt = |teams: &Vec| { +// println!("Please select a team:"); +// for (index, team) in teams.iter().enumerate() { +// println!( +// "{}: {} ({})", +// index + 1, +// team.name.as_deref().unwrap_or(""), +// team.team_id +// ); +// } +// let mut input = String::new(); +// std::io::stdin().read_line(&mut input).unwrap(); +// let selection = input.trim().parse::().ok()?; +// if selection == 0 || selection > teams.len() { +// return None; +// } +// Some(teams[selection - 1].team_id.clone()) +// }; + +// let cert_selection_prompt = |certs: &Vec| { +// println!("Maximum number of certificates reached. Please select certificates to revoke:"); +// for (index, cert) in certs.iter().enumerate() { +// println!( +// "({}) {}: {}", +// index + 1, +// cert.name.as_deref().unwrap_or(""), +// cert.machine_name.as_deref().unwrap_or(""), +// ); +// } +// println!("Enter the numbers of the certificates to revoke, separated by commas:"); +// let mut input = String::new(); +// std::io::stdin().read_line(&mut input).unwrap(); +// let selections: Vec = input +// .trim() +// .split(',') +// .filter_map(|s| s.trim().parse::().ok()) +// .filter(|&n| n > 0 && n <= certs.len()) +// .collect(); +// if selections.is_empty() { +// return None; +// } +// Some( +// selections +// .into_iter() +// .map(|n| certs[n - 1].serial_number.clone().unwrap_or_default()) +// .collect::>(), +// ) +// }; + +// let mut sideloader = SideloaderBuilder::new(dev_session, apple_id.to_string()) +// .team_selection(TeamSelection::PromptOnce(team_selection_prompt)) +// .max_certs_behavior(MaxCertsBehavior::Prompt(Box::new(cert_selection_prompt))) +// .storage(Box::new(KeyringStorage::new("minimal".to_string()))) +// .machine_name("isideload-minimal".to_string()) +// .build(); + +// let result = sideloader.install_app(&provider, app_path, true).await; +// match result { +// Ok(_) => println!("App installed successfully"), +// Err(e) => panic!("{}", e), +// } +// } diff --git a/isideload/Cargo.toml b/isideload/Cargo.toml index 01ce5e2..5101b65 100644 --- a/isideload/Cargo.toml +++ b/isideload/Cargo.toml @@ -11,27 +11,29 @@ keywords = ["ios", "sideload"] readme = "../README.md" [features] -default = ["install", "keyring-storage"] +default = ["install", "keyring-storage", "tokio-mt"] +# default = ["wasm"] +tokio-mt = ["tokio/rt-multi-thread", "tokio/fs", "dep:tokio-tungstenite"] install = ["dep:idevice"] keyring-storage = ["dep:keyring"] -wasm = ["idevice/wasm", "dep:getrandom_02", "dep:getrandom_04"] +wasm = ["idevice/wasm", "dep:getrandom_02", "dep:getrandom_04", "uuid/js", "dep:ws_stream_wasm", "dep:urlencoding"] fs-storage = [] # Unfortunately, dependencies are kinda a mess rn, since this requires a beta version of the srp crate. # Once that becomes stable, hopefuly duplicate dependencies should clean up.\ # Until then, I will wince in pain every time I see how long the output of cargo tree -d is. [dependencies] -idevice = { version = "0.1.60", optional = true, features = ["afc", "installation_proxy"]} +idevice = { version = "0.1.61", optional = true, default-features = false, features = ["ring", "afc", "installation_proxy"]} plist = "1.8" plist-macro = "0.1.4" -reqwest = { version = "0.13.2", features = ["json", "gzip"] } +reqwest = { version = "0.13.2", default-features = false, features = ["json", "gzip", "rustls-no-provider", "http2", "charset", "system-proxy"] } thiserror = "2.0.17" async-trait = "0.1.89" serde = "1.0.228" rand = "0.10.0" uuid = {version = "1.20.0", features = ["v4"] } tracing = "0.1.44" -tokio-tungstenite = { version = "0.29.0", features = ["rustls-tls-webpki-roots"] } +tokio-tungstenite = { version = "0.29.0", features = ["rustls-tls-webpki-roots"], optional = true } rootcause = "0.12.0" futures-util = "0.3.31" serde_json = "1.0.149" @@ -45,20 +47,27 @@ cbc = { version = "0.2.0", features = ["alloc"] } aes = "0.9.0" aes-gcm = "0.11.0-rc.3" rsa = { version = "0.10.0-rc.17" } -tokio = { version = "1.49.0", features = ["fs", "rt-multi-thread"] } +tokio = { version = "1.49" } keyring = { version = "3.6.3", features = ["apple-native", "linux-native-sync-persistent", "windows-native"], optional = true } -x509-certificate = { version = "0.25.0", package = "isideload-x509-certificate" } -rcgen = { version = "0.14.7", default-features = false, features = ["aws_lc_rs", "pem"] } +x509-certificate = { version = "0.26.0", package = "isideload-x509-certificate" } +rcgen = { version = "0.14.7", default-features = false, features = ["ring", "pem"] } p12-keystore = { version = "0.3.0-rc4", package = "isideload-p12-keystore" } zip = { version = "8.3", default-features = false, features = ["deflate"] } -apple-codesign = { version = "0.29.4", package = "isideload-apple-codesign" } +# apple-codesign = { version = "0.29.7", package = "isideload-apple-codesign", path = "../../isideload-apple-platform-rs/apple-codesign"} sha1 = "0.11.0" +rustls = { version = "0.23", default-features = false, features = ["ring", "tls12", "std"] } +reqwest-middleware = "0.5.1" +http = "1.4.0" +urlencoding = { version = "2.1.3", optional = true } +futures = "0.3.32" +ws_stream_wasm = { version = "0.7.5", optional = true} +web-time = "1" # There is a bug in rustls-platform-verifier that causes an invalid certificate error with apple's root cert. # It has been fixed already but I am waiting for a new release before I can update the dependency. # Using native-tls avoids the issue. [target.'cfg(windows)'.dependencies] -reqwest = { version = "0.13.2", features = ["json", "gzip", "native-tls"] } +reqwest = { version = "0.13.2", default-features = false, features = ["json", "gzip", "native-tls", "http2", "charset", "system-proxy"] } [target.'cfg(target_arch = "wasm32")'.dependencies] getrandom_02 = { package = "getrandom", version = "0.2", default-features = false, features = [ @@ -67,3 +76,4 @@ getrandom_02 = { package = "getrandom", version = "0.2", default-features = fals getrandom_04 = { package = "getrandom", version = "0.4", default-features = false, features = [ "wasm_js", ], optional = true } +ring = { version = "0.17.14", features = ["wasm32_unknown_unknown_js"] } diff --git a/isideload/src/anisette/mod.rs b/isideload/src/anisette/mod.rs index bd3701a..5c83983 100644 --- a/isideload/src/anisette/mod.rs +++ b/isideload/src/anisette/mod.rs @@ -6,9 +6,10 @@ use plist_macro::plist; use reqwest::header::HeaderMap; use rootcause::prelude::*; use serde::Deserialize; -use std::{collections::HashMap, sync::Arc, time::SystemTime}; +use std::{collections::HashMap, sync::Arc}; use tokio::sync::RwLock; use tracing::warn; +use web_time::SystemTime; #[derive(Deserialize, Debug, Clone)] pub struct AnisetteClientInfo { @@ -100,7 +101,8 @@ impl AnisetteData { } } -#[async_trait::async_trait] +#[cfg_attr(feature = "wasm", async_trait::async_trait(?Send))] +#[cfg_attr(not(feature = "wasm"), async_trait::async_trait)] pub trait AnisetteProvider { async fn get_anisette_data(&self) -> Result; diff --git a/isideload/src/anisette/remote_v3/mod.rs b/isideload/src/anisette/remote_v3/mod.rs index 7c26d75..c663db0 100644 --- a/isideload/src/anisette/remote_v3/mod.rs +++ b/isideload/src/anisette/remote_v3/mod.rs @@ -1,25 +1,28 @@ mod state; +mod websocket; use std::sync::Arc; -use std::time::SystemTime; +use web_time::SystemTime; use base64::prelude::*; use plist_macro::plist; -use reqwest::header::{CONTENT_TYPE, HeaderMap, HeaderValue}; +use reqwest::{ + ClientBuilder, + header::{CONTENT_TYPE, HeaderMap, HeaderValue}, +}; +#[cfg(feature = "wasm")] +use reqwest_middleware::ClientBuilder as MwClientBuilder; use rootcause::option_ext::OptionExt; use rootcause::prelude::*; use serde::Deserialize; -use tokio::time::{Duration, timeout}; -use tokio_tungstenite::tungstenite::Message; use tracing::{debug, info, warn}; -use crate::SideloadError; -use crate::anisette::remote_v3::state::AnisetteState; +use crate::anisette::remote_v3::{state::AnisetteState, websocket::WsMessage}; use crate::anisette::{AnisetteClientInfo, AnisetteData, AnisetteProvider}; use crate::auth::grandslam::GrandSlam; use crate::util::plist::PlistDataExtract; use crate::util::storage::{SideloadingStorage, new_storage}; -use futures_util::{SinkExt, StreamExt}; +use crate::{SideloadError, anisette::remote_v3::websocket::AppWebSocket}; pub const DEFAULT_ANISETTE_V3_URL: &str = "https://ani.stikstore.app"; @@ -29,7 +32,7 @@ pub struct RemoteV3AnisetteProvider { storage: Box, serial_number: String, client_info: Option, - client: reqwest::Client, + client: reqwest_middleware::ClientWithMiddleware, } impl RemoteV3AnisetteProvider { @@ -50,12 +53,29 @@ impl RemoteV3AnisetteProvider { storage, serial_number, client_info: None, - client: reqwest::ClientBuilder::new() - .build() - .context("Failed to build HTTP client")?, + client: Self::build_reqwest_client()?, }) } + fn build_reqwest_client() -> Result { + #[cfg(not(feature = "wasm"))] + { + let client = ClientBuilder::new().build()?; + + Ok(reqwest_middleware::ClientBuilder::new(client).build()) + } + #[cfg(feature = "wasm")] + { + use crate::auth::wasm_middleware::WasmProxyMiddleware; + + let client = ClientBuilder::new().build()?; + + Ok(MwClientBuilder::new(client) + .with(WasmProxyMiddleware) + .build()) + } + } + pub fn default() -> Result { Self::new( DEFAULT_ANISETTE_V3_URL, @@ -80,7 +100,8 @@ impl RemoteV3AnisetteProvider { } } -#[async_trait::async_trait] +#[cfg_attr(feature = "wasm", async_trait::async_trait(?Send))] +#[cfg_attr(not(feature = "wasm"), async_trait::async_trait)] impl AnisetteProvider for RemoteV3AnisetteProvider { async fn get_anisette_data(&self) -> Result { let state = self @@ -242,47 +263,46 @@ impl RemoteV3AnisetteProvider { .replace("http://", "ws://"); debug!("Starting provisioning at {}", websocket_url); - let (mut ws_stream, _) = timeout( - Duration::from_secs(30), - tokio_tungstenite::connect_async(&websocket_url), - ) - .await - .map_err(|_| { - report!("Timed out connecting to provisioning socket. Try a different anisette server.") - }) - .context("Failed to connect to provisioning socket")? - .context("Failed to connect to provisioning socket")?; + // let (mut ws_stream, _) = timeout( + // Duration::from_secs(30), + // tokio_tungstenite::connect_async(&websocket_url), + // ) + // .await + // .map_err(|_| { + // report!("Timed out connecting to provisioning socket. Try a different anisette server.") + // }) + // .context("Failed to connect to provisioning socket")? + // .context("Failed to connect to provisioning socket")?; + + let mut ws = AppWebSocket::connect(&websocket_url) + .await + .context("Failed to connect to provisioning socket")?; debug!("Connected to provisioning socket"); loop { - let Some(msg) = ws_stream.next().await else { - continue; + let Some(msg) = ws.next().await else { continue }; + let msg = msg?; + + let text = match msg { + WsMessage::Close => bail!("Provisioning socket closed unexpectedly"), + WsMessage::Text(t) => t, }; - let msg = msg.context("Failed to read anisette provisioning socket message")?; - if msg.is_close() { - bail!("Anisette provisioning socket closed unexpectedly"); - } - let msg = msg - .into_text() - .context("Failed to parse provisioning message")?; - debug!("Received provisioning message: {}", msg); - let provision_msg: ProvisioningMessage = - serde_json::from_str(&msg).context("Unknown provisioning message")?; + debug!("Received provisioning message: {}", text); + let provision_msg: ProvisioningMessage = serde_json::from_str(&text)?; match provision_msg { ProvisioningMessage::GiveIdentifier => { - ws_stream - .send(Message::Text( - serde_json::json!({ - "identifier": BASE64_STANDARD.encode(state.keychain_identifier), - }) - .to_string() - .into(), - )) - .await - .context("Failed to send identifier")?; + ws.send_text( + serde_json::json!({ + "identifier": BASE64_STANDARD.encode(state.keychain_identifier), + }) + .to_string() + .into(), + ) + .await + .context("Failed to send identifier")?; } ProvisioningMessage::GiveStartProvisioningData => { let body = plist!(dict { @@ -303,16 +323,15 @@ impl RemoteV3AnisetteProvider { .get_str("spim") .context("Start provisioning response missing spim")?; - ws_stream - .send(Message::Text( - serde_json::json!({ - "spim": spim, - }) - .to_string() - .into(), - )) - .await - .context("Failed to send start provisioning data")?; + ws.send_text( + serde_json::json!({ + "spim": spim, + }) + .to_string() + .into(), + ) + .await + .context("Failed to send start provisioning data")?; } ProvisioningMessage::GiveEndProvisioningData { cpim } => { let body = plist!(dict { @@ -331,25 +350,24 @@ impl RemoteV3AnisetteProvider { .await .context("Failed to send end provisioning request")?; - ws_stream - .send(Message::Text( - serde_json::json!({ - "ptm": response - .get_str("ptm") - .context("End provisioning response missing ptm")?, - "tk": response - .get_str("tk") - .context("End provisioning response missing tk")?, - }) - .to_string() - .into(), - )) - .await - .context("Failed to send start provisioning data")?; + ws.send_text( + serde_json::json!({ + "ptm": response + .get_str("ptm") + .context("End provisioning response missing ptm")?, + "tk": response + .get_str("tk") + .context("End provisioning response missing tk")?, + }) + .to_string() + .into(), + ) + .await + .context("Failed to send start provisioning data")?; } ProvisioningMessage::ProvisioningSuccess { adi_pb } => { state.adi_pb = Some(BASE64_STANDARD.decode(adi_pb)?); - ws_stream.close(None).await?; + ws.close().await?; info!("Provisioning successful"); break; } diff --git a/isideload/src/anisette/remote_v3/websocket.rs b/isideload/src/anisette/remote_v3/websocket.rs new file mode 100644 index 0000000..e371723 --- /dev/null +++ b/isideload/src/anisette/remote_v3/websocket.rs @@ -0,0 +1,97 @@ +use futures::{SinkExt, StreamExt}; +use rootcause::prelude::*; + +pub enum WsMessage { + Text(String), + Close, +} + +pub struct AppWebSocket { + #[cfg(not(feature = "wasm"))] + inner: tokio_tungstenite::WebSocketStream< + tokio_tungstenite::MaybeTlsStream, + >, + #[cfg(feature = "wasm")] + inner: ws_stream_wasm::WsStream, + #[cfg(feature = "wasm")] + meta: ws_stream_wasm::WsMeta, +} + +impl AppWebSocket { + pub async fn connect(url: &str) -> Result { + #[cfg(not(feature = "wasm"))] + { + use tokio::time::{Duration, timeout}; + + let (stream, _) = timeout( + Duration::from_secs(30), + tokio_tungstenite::connect_async(url), + ) + .await? + .context( + "Timed out connecting to provisioning socket. Try a different anisette server.", + )?; + Ok(Self { inner: stream }) + } + #[cfg(feature = "wasm")] + { + let proxied = format!( + "https://worker.nabdev.workers.dev/?url={}", + urlencoding::encode(url) + ) + .replace("https://", "wss://"); + + let (meta, stream) = ws_stream_wasm::WsMeta::connect(&proxied, None) + .await + .map_err(|e| report!("WS connect failed: {e:?}"))?; + Ok(Self { + meta, + inner: stream, + }) + } + } + + pub async fn send_text(&mut self, text: String) -> Result<(), Report> { + #[cfg(not(feature = "wasm"))] + self.inner + .send(tokio_tungstenite::tungstenite::Message::Text(text.into())) + .await?; + #[cfg(feature = "wasm")] + self.inner + .send(ws_stream_wasm::WsMessage::Text(text)) + .await + .map_err(|e| report!("WS send failed: {e:?}"))?; + Ok(()) + } + + pub async fn next(&mut self) -> Option> { + #[cfg(not(feature = "wasm"))] + { + let msg = self.inner.next().await?; + Some(msg.map_err(Into::into).map(|m| match m { + tokio_tungstenite::tungstenite::Message::Text(t) => WsMessage::Text(t.to_string()), + tokio_tungstenite::tungstenite::Message::Close(_) => WsMessage::Close, + _ => WsMessage::Close, + })) + } + #[cfg(feature = "wasm")] + { + let msg = self.inner.next().await?; + Some(Ok(match msg { + ws_stream_wasm::WsMessage::Text(t) => WsMessage::Text(t), + ws_stream_wasm::WsMessage::Binary(_) => WsMessage::Close, + })) + } + } + + pub async fn close(&mut self) -> Result<(), Report> { + #[cfg(not(feature = "wasm"))] + self.inner.close(None).await?; + #[cfg(feature = "wasm")] + self.meta + .close() + .await + .map_err(|e| report!("WS close failed: {e:?}"))?; + Ok(()) + } +} diff --git a/isideload/src/auth/apple_account.rs b/isideload/src/auth/apple_account.rs index 137d594..983a803 100644 --- a/isideload/src/auth/apple_account.rs +++ b/isideload/src/auth/apple_account.rs @@ -90,11 +90,15 @@ impl AppleAccount { /// - `two_factor_callback`: A callback function that returns the two-factor authentication code /// # Errors /// Returns an error if the login fails - pub async fn login( + pub async fn login( &mut self, password: &str, - two_factor_callback: impl Fn() -> Option, - ) -> Result<(), Report> { + two_factor_callback: F, + ) -> Result<(), Report> + where + F: Fn() -> Fut, + Fut: Future>, + { info!("Logging in to Apple ID: {}", censor_email(&self.email)); if self.debug { warn!("Debug mode enabled: this is a security risk!"); @@ -179,10 +183,11 @@ impl AppleAccount { Ok(pet) } - async fn trusted_device_2fa( - &mut self, - two_factor_callback: impl Fn() -> Option, - ) -> Result<(), Report> { + async fn trusted_device_2fa(&mut self, two_factor_callback: F) -> Result<(), Report> + where + F: Fn() -> Fut, + Fut: Future>, + { debug!("Trusted device 2FA required"); let anisette_data = self @@ -208,8 +213,9 @@ impl AppleAccount { info!("Trusted device 2FA request sent"); - let code = - two_factor_callback().ok_or_else(|| report!("No 2FA code provided, aborting"))?; + let code = two_factor_callback() + .await + .ok_or_else(|| report!("No 2FA code provided, aborting"))?; let res = self .grandslam_client @@ -235,10 +241,11 @@ impl AppleAccount { Ok(()) } - async fn sms_2fa( - &mut self, - two_factor_callback: impl Fn() -> Option, - ) -> Result<(), Report> { + async fn sms_2fa(&mut self, two_factor_callback: F) -> Result<(), Report> + where + F: Fn() -> Fut, + Fut: Future>, + { debug!("SMS 2FA required"); let anisette_data = self @@ -260,8 +267,9 @@ impl AppleAccount { info!("SMS 2FA request sent"); - let code = - two_factor_callback().ok_or_else(|| report!("No 2FA code provided, aborting"))?; + let code = two_factor_callback() + .await + .ok_or_else(|| report!("No 2FA code provided, aborting"))?; let body = serde_json::json!({ "securityCode": { diff --git a/isideload/src/auth/builder.rs b/isideload/src/auth/builder.rs index 0962335..86c35cc 100644 --- a/isideload/src/auth/builder.rs +++ b/isideload/src/auth/builder.rs @@ -70,13 +70,14 @@ impl AppleAccountBuilder { /// - `two_factor_callback`: A callback function that returns the two-factor authentication code /// # Errors /// Returns an error if the reqwest client cannot be built - pub async fn login( + pub async fn login( self, password: &str, two_factor_callback: F, ) -> Result where - F: Fn() -> Option, + F: Fn() -> Fut, + Fut: Future>, { let mut account = self.build().await?; account.login(password, two_factor_callback).await?; diff --git a/isideload/src/auth/grandslam.rs b/isideload/src/auth/grandslam.rs index 1876812..e5dfd6d 100644 --- a/isideload/src/auth/grandslam.rs +++ b/isideload/src/auth/grandslam.rs @@ -1,20 +1,27 @@ +#[cfg(feature = "wasm")] +use super::wasm_middleware::WasmProxyMiddleware; use plist::Dictionary; use plist_macro::plist_to_xml_string; use plist_macro::pretty_print_dictionary; +#[cfg(not(feature = "wasm"))] +use reqwest::Certificate; use reqwest::{ - Certificate, ClientBuilder, + ClientBuilder, header::{HeaderMap, HeaderValue}, }; +#[cfg(feature = "wasm")] +use reqwest_middleware::ClientBuilder as MwClientBuilder; use rootcause::prelude::*; use tracing::debug; use crate::{SideloadError, anisette::AnisetteClientInfo, util::plist::PlistDataExtract}; +#[cfg(not(feature = "wasm"))] const APPLE_ROOT: &[u8] = include_bytes!("./apple_root.der"); const URL_BAG: &str = "https://gsa.apple.com/grandslam/GsService2/lookup"; pub struct GrandSlam { - pub client: reqwest::Client, + pub client: reqwest_middleware::ClientWithMiddleware, pub client_info: AnisetteClientInfo, url_bag: Dictionary, } @@ -37,7 +44,7 @@ impl GrandSlam { /// Fetch the URL bag from GrandSlam and cache it pub async fn fetch_url_bag( - client: &reqwest::Client, + client: &reqwest_middleware::ClientWithMiddleware, base_headers: HeaderMap, ) -> Result { debug!("Fetching URL bag from GrandSlam"); @@ -70,7 +77,7 @@ impl GrandSlam { Ok(url) } - pub fn get(&self, url: &str) -> Result { + pub fn get(&self, url: &str) -> Result { let builder = self .client .get(url) @@ -79,7 +86,7 @@ impl GrandSlam { Ok(builder) } - pub fn get_sms(&self, url: &str) -> Result { + pub fn get_sms(&self, url: &str) -> Result { let builder = self .client .get(url) @@ -88,7 +95,7 @@ impl GrandSlam { Ok(builder) } - pub fn post(&self, url: &str) -> Result { + pub fn post(&self, url: &str) -> Result { let builder = self .client .post(url) @@ -97,7 +104,7 @@ impl GrandSlam { Ok(builder) } - pub fn patch(&self, url: &str) -> Result { + pub fn patch(&self, url: &str) -> Result { let builder = self .client .patch(url) @@ -173,16 +180,29 @@ impl GrandSlam { /// - `debug`: DANGER, If true, accept invalid certificates and enable verbose connection logging /// # Errors /// Returns an error if the reqwest client cannot be built - pub fn build_reqwest_client(debug: bool) -> Result { - let cert = Certificate::from_der(APPLE_ROOT)?; - let client = ClientBuilder::new() - .add_root_certificate(cert) - .http1_title_case_headers() - .danger_accept_invalid_certs(debug) - .connection_verbose(debug) - .build()?; - - Ok(client) + pub fn build_reqwest_client( + debug: bool, + ) -> Result { + #[cfg(not(feature = "wasm"))] + { + let cert = Certificate::from_der(APPLE_ROOT)?; + let client = ClientBuilder::new() + .add_root_certificate(cert) + .http1_title_case_headers() + .danger_accept_invalid_certs(debug) + .connection_verbose(debug) + .build()?; + + Ok(reqwest_middleware::ClientBuilder::new(client).build()) + } + #[cfg(feature = "wasm")] + { + let client = ClientBuilder::new().build()?; + + Ok(MwClientBuilder::new(client) + .with(WasmProxyMiddleware) + .build()) + } } } diff --git a/isideload/src/auth/mod.rs b/isideload/src/auth/mod.rs index 8ef46dc..b04b468 100644 --- a/isideload/src/auth/mod.rs +++ b/isideload/src/auth/mod.rs @@ -1,3 +1,5 @@ pub mod apple_account; pub mod builder; pub mod grandslam; +#[cfg(feature = "wasm")] +pub mod wasm_middleware; diff --git a/isideload/src/auth/wasm_middleware.rs b/isideload/src/auth/wasm_middleware.rs new file mode 100644 index 0000000..f28783e --- /dev/null +++ b/isideload/src/auth/wasm_middleware.rs @@ -0,0 +1,30 @@ +use reqwest_middleware::{Middleware, Next}; + +pub struct WasmProxyMiddleware; + +// You might be wondering, why does this cfg_attr check the target_arch AND the feature when all the others just check the feature? +// For some reason, I could not get rust analyzer to output errors when the arch was set to wasm32-unknown-unknown +// In an effort to make my life not miserable, I wanted isideload to compile as x86 even with the wasm feature enabled +// This one trait however didn't agree with that, so I added the additional check +// The arch check caused problems in other places, so everywhere else just gets the feature check +#[cfg_attr(all(target_arch = "wasm32", feature = "wasm"), async_trait::async_trait(?Send))] +#[cfg_attr( + not(all(target_arch = "wasm32", feature = "wasm")), + async_trait::async_trait +)] +impl Middleware for WasmProxyMiddleware { + async fn handle( + &self, + mut req: reqwest::Request, + extensions: &mut http::Extensions, + next: Next<'_>, + ) -> reqwest_middleware::Result { + let original = req.url().to_string(); + let proxied = format!( + "https://worker.nabdev.workers.dev/?url={}", + urlencoding::encode(&original) + ); + *req.url_mut() = proxied.parse().unwrap(); + next.run(req, extensions).await + } +} diff --git a/isideload/src/dev/app_groups.rs b/isideload/src/dev/app_groups.rs index c17d2a9..dee44c2 100644 --- a/isideload/src/dev/app_groups.rs +++ b/isideload/src/dev/app_groups.rs @@ -17,7 +17,8 @@ pub struct AppGroup { pub application_group: String, } -#[async_trait::async_trait] +#[cfg_attr(feature = "wasm", async_trait::async_trait(?Send))] +#[cfg_attr(not(feature = "wasm"), async_trait::async_trait)] pub trait AppGroupsApi { fn developer_session(&mut self) -> &mut DeveloperSession; diff --git a/isideload/src/dev/app_ids.rs b/isideload/src/dev/app_ids.rs index 099d336..51277c1 100644 --- a/isideload/src/dev/app_ids.rs +++ b/isideload/src/dev/app_ids.rs @@ -51,7 +51,8 @@ pub struct Profile { pub is_free_provisioning_profile: Option, } -#[async_trait::async_trait] +#[cfg_attr(feature = "wasm", async_trait::async_trait(?Send))] +#[cfg_attr(not(feature = "wasm"), async_trait::async_trait)] pub trait AppIdsApi { fn developer_session(&mut self) -> &mut DeveloperSession; diff --git a/isideload/src/dev/certificates.rs b/isideload/src/dev/certificates.rs index cd485a7..a0ba1c6 100644 --- a/isideload/src/dev/certificates.rs +++ b/isideload/src/dev/certificates.rs @@ -71,7 +71,8 @@ impl std::fmt::Debug for DevelopmentCertificate { } } -#[async_trait::async_trait] +#[cfg_attr(feature = "wasm", async_trait::async_trait(?Send))] +#[cfg_attr(not(feature = "wasm"), async_trait::async_trait)] pub trait CertificatesApi { fn developer_session(&mut self) -> &mut DeveloperSession; diff --git a/isideload/src/dev/devices.rs b/isideload/src/dev/devices.rs index 4a5c37d..e096692 100644 --- a/isideload/src/dev/devices.rs +++ b/isideload/src/dev/devices.rs @@ -17,7 +17,8 @@ pub struct DeveloperDevice { pub status: Option, } -#[async_trait::async_trait] +#[cfg_attr(feature = "wasm", async_trait::async_trait(?Send))] +#[cfg_attr(not(feature = "wasm"), async_trait::async_trait)] pub trait DevicesApi { fn developer_session(&mut self) -> &mut DeveloperSession; diff --git a/isideload/src/dev/teams.rs b/isideload/src/dev/teams.rs index 1a4cb66..4c14774 100644 --- a/isideload/src/dev/teams.rs +++ b/isideload/src/dev/teams.rs @@ -14,7 +14,8 @@ pub struct DeveloperTeam { pub status: Option, } -#[async_trait::async_trait] +#[cfg_attr(feature = "wasm", async_trait::async_trait(?Send))] +#[cfg_attr(not(feature = "wasm"), async_trait::async_trait)] pub trait TeamsApi { fn developer_session(&mut self) -> &mut DeveloperSession; diff --git a/isideload/src/lib.rs b/isideload/src/lib.rs index 2cc5e74..1712801 100644 --- a/isideload/src/lib.rs +++ b/isideload/src/lib.rs @@ -55,5 +55,6 @@ pub fn init() -> Result<(), Report> { .context_formatter::(ReqwestErrorFormatter) .install() .context("Failed to install error reporting hooks")?; + Ok(()) } diff --git a/isideload/src/sideload/application.rs b/isideload/src/sideload/application.rs index 7c65883..0365063 100644 --- a/isideload/src/sideload/application.rs +++ b/isideload/src/sideload/application.rs @@ -271,12 +271,20 @@ impl Application { .context("Failed to encode cert as p12")?; let alt_cert_path = target_bundle.bundle_dir.join(cert_file_name); - let mut file = tokio::fs::File::create(&alt_cert_path) - .await - .context(format!("Failed to create {}", cert_file_name))?; - file.write_all(&p12_bytes) - .await - .context(format!("Failed to write {}", cert_file_name))?; + #[cfg(feature = "tokio-mt")] + { + let mut file = tokio::fs::File::create(&alt_cert_path) + .await + .context(format!("Failed to create {}", cert_file_name))?; + file.write_all(&p12_bytes) + .await + .context(format!("Failed to write {}", cert_file_name))?; + } + + #[cfg(not(feature = "tokio-mt"))] + { + unimplemented!("not yet supported") + } } } Ok(()) diff --git a/isideload/src/sideload/cert_identity.rs b/isideload/src/sideload/cert_identity.rs index 0af8d2c..081e554 100644 --- a/isideload/src/sideload/cert_identity.rs +++ b/isideload/src/sideload/cert_identity.rs @@ -1,7 +1,7 @@ -use apple_codesign::{ - SigningSettings, - cryptography::{InMemoryPrivateKey, PrivateKey}, -}; +// use apple_codesign::{ +// SigningSettings, +// cryptography::{InMemoryPrivateKey, PrivateKey}, +// }; use hex::ToHex; use rcgen::{CertificateParams, DistinguishedName, DnType, KeyPair, PKCS_RSA_SHA256}; use rootcause::{option_ext::OptionExt, prelude::*}; @@ -32,7 +32,7 @@ pub struct CertificateIdentity { pub machine_name: String, pub certificate: CapturedX509Certificate, pub private_key: RsaPrivateKey, - pub signing_key: InMemoryPrivateKey, + //pub signing_key: InMemoryPrivateKey, } impl CertificateIdentity { @@ -111,7 +111,7 @@ impl CertificateIdentity { max_certs_behavior: &MaxCertsBehavior, ) -> Result { let pr = Self::retrieve_private_key(apple_email, storage).await?; - let signing_key = Self::build_signing_key(&pr)?; + //let signing_key = Self::build_signing_key(&pr)?; let found = Self::find_matching(&pr, machine_name, developer_session, team).await; if let Ok(Some((cert, x509_cert))) = found { @@ -121,7 +121,7 @@ impl CertificateIdentity { machine_name: cert.machine_name.clone().unwrap_or_default(), certificate: x509_cert, private_key: pr, - signing_key, + //signing_key, }); } @@ -145,7 +145,7 @@ impl CertificateIdentity { machine_name: cert.machine_name.clone().unwrap_or_default(), certificate: x509_cert, private_key: pr, - signing_key, + //signing_key, }) } @@ -304,10 +304,10 @@ impl CertificateIdentity { Ok(params.serialize_request(&subject_key)?.pem()?) } - fn build_signing_key(private_key: &RsaPrivateKey) -> Result { - let pkcs8 = private_key.to_pkcs8_der()?; - Ok(InMemoryPrivateKey::from_pkcs8_der(pkcs8.as_bytes())?) - } + // fn build_signing_key(private_key: &RsaPrivateKey) -> Result { + // let pkcs8 = private_key.to_pkcs8_der()?; + // Ok(InMemoryPrivateKey::from_pkcs8_der(pkcs8.as_bytes())?) + // } async fn revoke_others( developer_session: &mut DeveloperSession, @@ -351,17 +351,17 @@ impl CertificateIdentity { } } - pub fn setup_signing_settings<'a>( - &'a self, - settings: &mut SigningSettings<'a>, - ) -> Result<(), Report> { - settings.set_signing_key( - self.signing_key.as_key_info_signer(), - self.certificate.clone(), - ); - settings.chain_apple_certificates(); - settings.set_team_id_from_signing_certificate(); - - Ok(()) - } + // pub fn setup_signing_settings<'a>( + // &'a self, + // settings: &mut SigningSettings<'a>, + // ) -> Result<(), Report> { + // settings.set_signing_key( + // self.signing_key.as_key_info_signer(), + // self.certificate.clone(), + // ); + // settings.chain_apple_certificates(); + // settings.set_team_id_from_signing_certificate(); + + // Ok(()) + // } } diff --git a/isideload/src/sideload/sideloader.rs b/isideload/src/sideload/sideloader.rs index a1ed42f..e9abfb4 100644 --- a/isideload/src/sideload/sideloader.rs +++ b/isideload/src/sideload/sideloader.rs @@ -162,12 +162,18 @@ impl Sideloader { ext.write_info()?; } + #[cfg(feature = "tokio-mt")] tokio::fs::write( app.bundle.bundle_dir.join("embedded.mobileprovision"), provisioning_profile.encoded_profile.as_ref(), ) .await?; + #[cfg(not(feature = "tokio-mt"))] + { + unimplemented!("not yet supported") + } + sign::sign( &mut app, &cert_identity, diff --git a/isideload/src/sideload/sign.rs b/isideload/src/sideload/sign.rs index 3468405..7f4da4d 100644 --- a/isideload/src/sideload/sign.rs +++ b/isideload/src/sideload/sign.rs @@ -1,4 +1,4 @@ -use apple_codesign::{SigningSettings, UnifiedSigner}; +// use apple_codesign::{SigningSettings, UnifiedSigner}; use plist::Dictionary; use plist_macro::plist_to_xml_string; use rootcause::{option_ext::OptionExt, prelude::*}; @@ -20,50 +20,47 @@ pub fn sign( special: &Option, team: &DeveloperTeam, ) -> Result<(), Report> { - let mut settings = signing_settings(cert_identity)?; - let entitlements: Dictionary = entitlements_from_prov( - provisioning_profile.encoded_profile.as_ref(), - special, - team, - )?; + // let mut settings = signing_settings(cert_identity)?; + // let entitlements: Dictionary = + // entitlements_from_prov(provisioning_profile.encoded_profile.as_ref(), special, team)?; - settings - .set_entitlements_xml( - apple_codesign::SettingsScope::Main, - plist_to_xml_string(&entitlements), - ) - .context("Failed to set entitlements XML")?; - let signer = UnifiedSigner::new(settings); + // settings + // .set_entitlements_xml( + // apple_codesign::SettingsScope::Main, + // plist_to_xml_string(&entitlements), + // ) + // .context("Failed to set entitlements XML")?; + // let signer = UnifiedSigner::new(settings); - for bundle in app.bundle.collect_bundles_sorted() { - info!( - "Signing {}", - bundle - .bundle_dir - .file_name() - .unwrap_or(bundle.bundle_dir.as_os_str()) - .to_string_lossy() - ); - signer - .sign_path_in_place(&bundle.bundle_dir) - .context(format!( - "Failed to sign bundle: {}", - bundle.bundle_dir.display() - ))?; - } + // for bundle in app.bundle.collect_bundles_sorted() { + // info!( + // "Signing {}", + // bundle + // .bundle_dir + // .file_name() + // .unwrap_or(bundle.bundle_dir.as_os_str()) + // .to_string_lossy() + // ); + // signer + // .sign_path_in_place(&bundle.bundle_dir) + // .context(format!( + // "Failed to sign bundle: {}", + // bundle.bundle_dir.display() + // ))?; + // } Ok(()) } -pub fn signing_settings<'a>(cert: &'a CertificateIdentity) -> Result, Report> { - let mut settings = SigningSettings::default(); +// pub fn signing_settings<'a>(cert: &'a CertificateIdentity) -> Result, Report> { +// let mut settings = SigningSettings::default(); - cert.setup_signing_settings(&mut settings)?; - settings.set_for_notarization(false); - settings.set_shallow(true); +// cert.setup_signing_settings(&mut settings)?; +// settings.set_for_notarization(false); +// settings.set_shallow(true); - Ok(settings) -} +// Ok(settings) +// } fn entitlements_from_prov( data: &[u8], From 3055b070a778d08353d14dee1c0f97973be78120 Mon Sep 17 00:00:00 2001 From: nab138 Date: Thu, 21 May 2026 23:33:38 -0400 Subject: [PATCH 03/15] Real wasm support finally --- .vscode/settings.json | 6 +- Cargo.lock | 1385 ++++++++++++++++++++++- examples/minimal/Cargo.toml | 15 +- examples/minimal/src/main.rs | 275 ++--- isideload/Cargo.toml | 8 +- isideload/src/sideload/application.rs | 59 +- isideload/src/sideload/bundle.rs | 54 +- isideload/src/sideload/cert_identity.rs | 50 +- isideload/src/sideload/install.rs | 18 +- isideload/src/sideload/sideloader.rs | 13 +- isideload/src/sideload/sign.rs | 69 +- isideload/src/util/fs_storage.rs | 6 +- 12 files changed, 1637 insertions(+), 321 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 2e62bd7..331a22f 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,3 @@ -{ - "rust-analyzer.cargo.target": "wasm32-unknown-unknown" -} +// { +// "rust-analyzer.cargo.target": "wasm32-unknown-unknown" +// } diff --git a/Cargo.lock b/Cargo.lock index 6c2c6df..054a640 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -78,6 +78,27 @@ dependencies = [ "subtle", ] +[[package]] +name = "ahash" +version = "0.8.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "aho-corasick" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" +dependencies = [ + "memchr", +] + [[package]] name = "android_system_properties" version = "0.1.5" @@ -87,12 +108,68 @@ dependencies = [ "libc", ] +[[package]] +name = "anstream" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000" + +[[package]] +name = "anstyle-parse" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52ce7f38b242319f7cabaa6813055467063ecdc9d355bbb4ce0c68908cd8130e" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" +dependencies = [ + "anstyle", + "once_cell_polyfill", + "windows-sys 0.61.2", +] + [[package]] name = "anyhow" version = "1.0.102" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c" +[[package]] +name = "arrayvec" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" + [[package]] name = "asn1-rs" version = "0.7.2" @@ -105,7 +182,7 @@ dependencies = [ "nom", "num-traits", "rusticata-macros", - "thiserror", + "thiserror 2.0.18", "time", ] @@ -199,7 +276,7 @@ dependencies = [ "crc32fast", "futures-lite", "pin-project", - "thiserror", + "thiserror 2.0.18", "tokio", "tokio-util", ] @@ -271,6 +348,28 @@ version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4512299f36f043ab09a583e57bceb5a5aab7a73db1805848e8fef3c9e8c78b3" +[[package]] +name = "bitvec" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] + +[[package]] +name = "bitvec-nom2" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d988fcc40055ceaa85edc55875a08f8abd29018582647fd82ad6128dba14a5f0" +dependencies = [ + "bitvec", + "nom", +] + [[package]] name = "block-buffer" version = "0.10.4" @@ -325,6 +424,21 @@ version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" +[[package]] +name = "bytesize" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e93abca9e28e0a1b9877922aacb20576e05d4679ffa78c3d6dc22a26a216659" + +[[package]] +name = "bzip2" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3a53fac24f34a81bc9954b5d6cfce0c21e18ec6959f44f56e8e90e4bb7c346c" +dependencies = [ + "libbz2-rs-sys", +] + [[package]] name = "cbc" version = "0.1.2" @@ -350,6 +464,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1dce859f0832a7d088c4f1119888ab94ef4b5d6795d1ce05afb7fe159d79f98" dependencies = [ "find-msvc-tools", + "jobserver", + "libc", "shlex", ] @@ -401,8 +517,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c673075a2e0e5f4a1dde27ce9dee1ea4558c7ffe648f576438a20ca1d2acc4b0" dependencies = [ "iana-time-zone", + "js-sys", "num-traits", "serde", + "wasm-bindgen", "windows-link", ] @@ -428,12 +546,64 @@ dependencies = [ "inout 0.2.2", ] +[[package]] +name = "clap" +version = "4.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ddb117e43bbf7dacf0a4190fef4d345b9bad68dfc649cb349e7d17d28428e51" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "714a53001bf66416adb0e2ef5ac857140e7dc3a0c48fb28b2f10762fc4b5069f" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_derive" +version = "4.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2ce8604710f6733aa641a2b3731eaa1e8b3d9973d5e3565da11800813f997a9" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "clap_lex" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9" + [[package]] name = "cmov" version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f88a43d011fc4a6876cb7344703e297c71dda42494fee094d5f7c76bf13f746" +[[package]] +name = "cms" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b77c319abfd5219629c45c34c89ba945ed3c5e49fcde9d16b6c3885f118a730" +dependencies = [ + "const-oid 0.9.6", + "der 0.7.10", + "spki 0.7.3", + "x509-cert 0.2.5", +] + [[package]] name = "cms" version = "0.3.0-pre.1" @@ -443,9 +613,15 @@ dependencies = [ "const-oid 0.10.2", "der 0.8.0", "spki 0.8.0", - "x509-cert", + "x509-cert 0.3.0-rc.4", ] +[[package]] +name = "colorchoice" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570" + [[package]] name = "combine" version = "4.6.7" @@ -473,6 +649,19 @@ version = "0.4.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc14f565cf027a105f7a44ccf9e5b424348421a1d8952a8fc9d499d313107789" +[[package]] +name = "console" +version = "0.15.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "054ccb5b10f9f2cbf51eb355ca1d05c2d279ce1804688d0db74b4733a5aeafd8" +dependencies = [ + "encode_unicode", + "libc", + "once_cell", + "unicode-width", + "windows-sys 0.59.0", +] + [[package]] name = "const-oid" version = "0.9.6" @@ -485,6 +674,15 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a6ef517f0926dd24a1582492c791b6a4818a4d94e789a334894aa15b0d12f55c" +[[package]] +name = "const_panic" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e262cdaac42494e3ae34c43969f9cdeb7da178bdb4b66fa6a1ea2edb4c8ae652" +dependencies = [ + "typewit", +] + [[package]] name = "core-foundation" version = "0.9.4" @@ -544,6 +742,31 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "crossbeam-deque" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" + [[package]] name = "crypto-bigint" version = "0.5.5" @@ -692,6 +915,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" dependencies = [ "const-oid 0.9.6", + "der_derive 0.7.3", + "flagset", "pem-rfc7468 0.7.0", "zeroize", ] @@ -703,7 +928,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71fd89660b2dc699704064e59e9dba0147b903e85319429e131620d022be411b" dependencies = [ "const-oid 0.10.2", - "der_derive", + "der_derive 0.8.0", "flagset", "pem-rfc7468 1.0.0", "zeroize", @@ -723,6 +948,17 @@ dependencies = [ "rusticata-macros", ] +[[package]] +name = "der_derive" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8034092389675178f570469e6c3b0465d3d30b4505c294a6550db47f3c17ad18" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "der_derive" version = "0.8.0" @@ -743,6 +979,15 @@ dependencies = [ "powerfmt", ] +[[package]] +name = "des" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffdd80ce8ce993de27e9f063a444a4d53ce8e8db4c1f00cc03af5ad5a9867a1e" +dependencies = [ + "cipher 0.4.4", +] + [[package]] name = "des" version = "0.9.0" @@ -752,6 +997,25 @@ dependencies = [ "cipher 0.5.2", ] +[[package]] +name = "dialoguer" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "658bce805d770f407bc62102fca7c2c64ceef2fbcb2b8bd19d2765ce093980de" +dependencies = [ + "console", + "shell-words", + "tempfile", + "thiserror 1.0.69", + "zeroize", +] + +[[package]] +name = "difference" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" + [[package]] name = "digest" version = "0.10.7" @@ -776,6 +1040,27 @@ dependencies = [ "ctutils", ] +[[package]] +name = "dirs" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" +dependencies = [ + "dirs-sys", +] + +[[package]] +name = "dirs-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" +dependencies = [ + "libc", + "option-ext", + "redox_users", + "windows-sys 0.48.0", +] + [[package]] name = "displaydoc" version = "0.2.5" @@ -826,6 +1111,12 @@ dependencies = [ "zeroize", ] +[[package]] +name = "either" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91622ff5e7162018101f2fea40d6ebf4a78bbe5a49736a2020649edf9693679e" + [[package]] name = "elliptic-curve" version = "0.13.8" @@ -847,6 +1138,12 @@ dependencies = [ "zeroize", ] +[[package]] +name = "encode_unicode" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" + [[package]] name = "encoding_rs" version = "0.8.35" @@ -856,6 +1153,29 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "env_filter" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32e90c2accc4b07a8456ea0debdc2e7587bdd890680d71173a15d4ae604f6eef" +dependencies = [ + "log", + "regex", +] + +[[package]] +name = "env_logger" +version = "0.11.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0621c04f2196ac3f488dd583365b9c09be011a4ab8b9f37248ffcc8f6198b56a" +dependencies = [ + "anstream", + "anstyle", + "env_filter", + "jiff", + "log", +] + [[package]] name = "equivalent" version = "1.0.2" @@ -894,6 +1214,16 @@ version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" +[[package]] +name = "filetime" +version = "0.2.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c287a33c7f0a620c38e641e7f60827713987b3c0f26e8ddc9462cc69cf75759" +dependencies = [ + "cfg-if", + "libc", +] + [[package]] name = "find-msvc-tools" version = "0.1.9" @@ -953,6 +1283,12 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + [[package]] name = "futures" version = "0.3.32" @@ -1125,6 +1461,23 @@ dependencies = [ "polyval 0.7.1", ] +[[package]] +name = "glob" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" + +[[package]] +name = "goblin" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daa0a64d21a7eb230583b4c5f4e23b7e4e57974f96620f42a7e75e08ae66d745" +dependencies = [ + "log", + "plain", + "scroll", +] + [[package]] name = "group" version = "0.13.0" @@ -1155,6 +1508,15 @@ dependencies = [ "tracing", ] +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash", +] + [[package]] name = "hashbrown" version = "0.15.5" @@ -1486,7 +1848,7 @@ dependencies = [ "sha1 0.10.6", "sha2 0.10.9", "siphasher", - "thiserror", + "thiserror 2.0.18", "tokio", "tokio-rustls", "tracing", @@ -1569,9 +1931,24 @@ version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2" +[[package]] +name = "is_executable" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baabb8b4867b26294d818bf3f651a454b6901431711abb96e296245888d6e8c4" +dependencies = [ + "windows-sys 0.60.2", +] + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" + [[package]] name = "isideload" -version = "0.2.22" +version = "0.3.0" dependencies = [ "aes 0.9.0", "aes-gcm 0.11.0-rc.3", @@ -1586,10 +1963,12 @@ dependencies = [ "hmac 0.13.0", "http", "idevice", + "isideload-apple-codesign", "isideload-p12-keystore", + "isideload-vfs", "isideload-x509-certificate", "keyring", - "pbkdf2", + "pbkdf2 0.13.0", "plist", "plist-macro", "rand 0.10.1", @@ -1605,7 +1984,7 @@ dependencies = [ "sha1 0.11.0", "sha2 0.11.0", "srp", - "thiserror", + "thiserror 2.0.18", "tokio", "tokio-tungstenite", "tracing", @@ -1617,47 +1996,249 @@ dependencies = [ ] [[package]] -name = "isideload-p12-keystore" -version = "0.3.0-rc4" +name = "isideload-apple-bundles" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "169d9344eb672235ee5e1f311809d7dec0b3a0448ce5138d53d0f19c2924d6f9" +checksum = "8ab51a22a4fa276ed5bc6c8b601c461a2c6316544018c8ae3b0cb38a1bb88f6d" dependencies = [ - "cbc 0.2.1", - "cms", - "der 0.8.0", - "des", - "hex", - "hmac 0.13.0", - "pkcs12", - "pkcs5 0.8.0", - "pkcs8 0.11.0", - "rand 0.10.1", - "rc2", - "sha1 0.11.0", - "sha2 0.11.0", - "thiserror", - "x509-parser", + "anyhow", + "isideload-simple-file-manifest", + "isideload-vfs", + "isideload-walkdir", + "plist", ] [[package]] -name = "isideload-x509-certificate" -version = "0.26.0" +name = "isideload-apple-codesign" +version = "0.29.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f85f3d655536bce5bf609cd70283f851e221371eb5724aaa03783a9e804a2f" +checksum = "b629cbd926bdf7a98ab30410064d0c2e3578425a8f37dcefd1d35b0147bd170d" dependencies = [ + "anyhow", + "base64 0.22.1", "bcder", + "bitflags", "bytes", "chrono", + "clap", "der 0.7.10", + "dialoguer", + "difference", + "digest 0.10.7", + "dirs", + "elliptic-curve", + "env_logger", + "filetime", "getrandom 0.2.17", "getrandom 0.4.2", + "glob", + "goblin", "hex", - "pem", + "isideload-apple-bundles", + "isideload-apple-flat-package", + "isideload-apple-xar", + "isideload-cryptographic-message-syntax", + "isideload-simple-file-manifest", + "isideload-vfs", + "isideload-walkdir", + "isideload-x509-certificate", + "log", + "md-5", + "num-traits", + "object", + "oid-registry", + "once_cell", + "p12", + "p12-keystore", + "p256", + "pem", + "pkcs1 0.7.5", + "pkcs8 0.10.2", + "plist", + "rand 0.8.6", + "rasn", + "rayon", + "regex", "ring", + "rsa 0.9.10", + "scroll", + "security-framework 2.11.1", + "security-framework-sys", + "semver", + "serde", + "serde_json", + "serde_yaml", + "sha2 0.10.9", "signature 2.2.0", "spki 0.7.3", - "thiserror", + "subtle", + "tempfile", + "thiserror 2.0.18", + "tokio", + "uuid", + "widestring", + "windows-sys 0.59.0", + "xml-rs", + "yasna 0.5.2", "zeroize", + "zip", + "zip_structs", +] + +[[package]] +name = "isideload-apple-flat-package" +version = "0.20.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26dfce2d65a6ff764ed00071c929330587740ac49d8c6de52426734c20d54a5" +dependencies = [ + "flate2", + "isideload-apple-xar", + "isideload-cpio-archive", + "scroll", + "serde", + "serde-xml-rs", + "thiserror 2.0.18", +] + +[[package]] +name = "isideload-apple-xar" +version = "0.20.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc80d53b5d1d4e148b76f652eadf39400c6ace129e20abbde6bb95a40c07e8f" +dependencies = [ + "base64 0.22.1", + "bcder", + "bzip2", + "chrono", + "digest 0.10.7", + "flate2", + "getrandom 0.2.17", + "getrandom 0.4.2", + "isideload-cryptographic-message-syntax", + "isideload-vfs", + "isideload-x509-certificate", + "liblzma", + "log", + "md-5", + "rand 0.8.6", + "scroll", + "serde", + "serde-xml-rs", + "sha1 0.10.6", + "sha2 0.10.9", + "signature 2.2.0", + "thiserror 2.0.18", + "xml-rs", +] + +[[package]] +name = "isideload-cpio-archive" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82b8714e81b190be903e733fb1b611c73f4aa4041b26396f7609ae4c81bcae9f" +dependencies = [ + "chrono", + "is_executable", + "isideload-simple-file-manifest", + "isideload-vfs", + "thiserror 2.0.18", +] + +[[package]] +name = "isideload-cryptographic-message-syntax" +version = "0.31.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcde9eb8ab560e20896e48f1f6a9e62c910db422a274ff665f1b580f873a1552" +dependencies = [ + "bcder", + "bytes", + "chrono", + "getrandom 0.2.17", + "getrandom 0.4.2", + "hex", + "isideload-x509-certificate", + "pem", + "ring", + "signature 2.2.0", +] + +[[package]] +name = "isideload-p12-keystore" +version = "0.3.0-rc4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "169d9344eb672235ee5e1f311809d7dec0b3a0448ce5138d53d0f19c2924d6f9" +dependencies = [ + "cbc 0.2.1", + "cms 0.3.0-pre.1", + "der 0.8.0", + "des 0.9.0", + "hex", + "hmac 0.13.0", + "pkcs12 0.2.0-pre.0", + "pkcs5 0.8.0", + "pkcs8 0.11.0", + "rand 0.10.1", + "rc2 0.9.0", + "sha1 0.11.0", + "sha2 0.11.0", + "thiserror 2.0.18", + "x509-parser", +] + +[[package]] +name = "isideload-simple-file-manifest" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dcdb6ba256f4af6fe7fe9347ae9cb55c5c1643dfbeaf1925c52f811d7a81da" +dependencies = [ + "isideload-vfs", +] + +[[package]] +name = "isideload-vfs" +version = "0.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1133e156a6beed9d5e14a2b9618d52f8c2c6786326f4efbd73c7aecfcabab4c" + +[[package]] +name = "isideload-walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81e3e04a5dc89180d12b6357f253f7bc96eebcb6ac2d9a04c637981e97b3b061" +dependencies = [ + "isideload-vfs", + "same-file", + "winapi-util", +] + +[[package]] +name = "isideload-x509-certificate" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12f85f3d655536bce5bf609cd70283f851e221371eb5724aaa03783a9e804a2f" +dependencies = [ + "bcder", + "bytes", + "chrono", + "der 0.7.10", + "getrandom 0.2.17", + "getrandom 0.4.2", + "hex", + "pem", + "ring", + "signature 2.2.0", + "spki 0.7.3", + "thiserror 2.0.18", + "zeroize", +] + +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", ] [[package]] @@ -1666,6 +2247,30 @@ version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" +[[package]] +name = "jiff" +version = "0.2.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f00b5dbd620d61dfdcb6007c9c1f6054ebd75319f163d886a9055cec1155073d" +dependencies = [ + "jiff-static", + "log", + "portable-atomic", + "portable-atomic-util", + "serde_core", +] + +[[package]] +name = "jiff-static" +version = "0.2.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e000de030ff8022ea1da3f466fbb0f3a809f5e51ed31f6dd931c35181ad8e6d7" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "jni" version = "0.22.4" @@ -1678,7 +2283,7 @@ dependencies = [ "jni-sys", "log", "simd_cesu8", - "thiserror", + "thiserror 2.0.18", "walkdir", "windows-link", ] @@ -1715,6 +2320,16 @@ dependencies = [ "syn", ] +[[package]] +name = "jobserver" +version = "0.1.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" +dependencies = [ + "getrandom 0.3.4", + "libc", +] + [[package]] name = "js-sys" version = "0.3.98" @@ -1743,6 +2358,26 @@ dependencies = [ "zeroize", ] +[[package]] +name = "konst" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97feab15b395d1860944abe6a8dd8ed9f8eadfae01750fada8427abda531d887" +dependencies = [ + "const_panic", + "konst_kernel", + "typewit", +] + +[[package]] +name = "konst_kernel" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4b1eb7788f3824c629b1116a7a9060d6e898c358ebff59070093d51103dcc3c" +dependencies = [ + "typewit", +] + [[package]] name = "lazy_static" version = "1.5.0" @@ -1758,6 +2393,12 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" +[[package]] +name = "libbz2-rs-sys" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34b357333733e8260735ba5894eb928c02ecc69c78715f01a8019e7fa7f2db4c" + [[package]] name = "libc" version = "0.2.186" @@ -1773,12 +2414,41 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "liblzma" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6033b77c21d1f56deeae8014eb9fbe7bdf1765185a6c508b5ca82eeaed7f899" +dependencies = [ + "liblzma-sys", +] + +[[package]] +name = "liblzma-sys" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a60851d15cd8c5346eca4ab8babff585be2ae4bc8097c067291d3ffe2add3b6" +dependencies = [ + "cc", + "libc", + "pkg-config", +] + [[package]] name = "libm" version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" +[[package]] +name = "libredox" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e02f3bb43d335493c96bf3fd3a321600bf6bd07ed34bc64118e9293bdffea46c" +dependencies = [ + "libc", +] + [[package]] name = "linux-keyutils" version = "0.2.5" @@ -1841,6 +2511,16 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "minimal" version = "0.1.0" +dependencies = [ + "idevice", + "isideload", + "plist", + "plist-macro", + "rustls", + "tokio", + "tracing", + "tracing-subscriber", +] [[package]] name = "minimal-lexical" @@ -1896,6 +2576,15 @@ dependencies = [ "minimal-lexical", ] +[[package]] +name = "nu-ansi-term" +version = "0.50.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" +dependencies = [ + "windows-sys 0.61.2", +] + [[package]] name = "num-bigint" version = "0.4.6" @@ -1958,6 +2647,20 @@ dependencies = [ "libm", ] +[[package]] +name = "object" +version = "0.36.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" +dependencies = [ + "crc32fast", + "flate2", + "hashbrown 0.15.5", + "indexmap", + "memchr", + "ruzstd", +] + [[package]] name = "oid-registry" version = "0.8.1" @@ -1973,6 +2676,12 @@ version = "1.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" +[[package]] +name = "once_cell_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" + [[package]] name = "opaque-debug" version = "0.3.1" @@ -2022,6 +2731,52 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + +[[package]] +name = "p12" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4873306de53fe82e7e484df31e1e947d61514b6ea2ed6cd7b45d63006fd9224" +dependencies = [ + "cbc 0.1.2", + "cipher 0.4.4", + "des 0.8.1", + "getrandom 0.2.17", + "hmac 0.12.1", + "lazy_static", + "rc2 0.8.1", + "sha1 0.10.6", + "yasna 0.5.2", +] + +[[package]] +name = "p12-keystore" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffb9bf5222606eb712d3bb30e01bc9420545b00859970897e70c682353a034f2" +dependencies = [ + "base64 0.22.1", + "cbc 0.1.2", + "cms 0.2.3", + "der 0.7.10", + "des 0.8.1", + "hex", + "hmac 0.12.1", + "pkcs12 0.1.0", + "pkcs5 0.7.1", + "rand 0.10.1", + "rc2 0.8.1", + "sha1 0.10.6", + "sha2 0.10.9", + "thiserror 2.0.18", + "x509-parser", +] + [[package]] name = "p256" version = "0.13.2" @@ -2081,6 +2836,16 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" +[[package]] +name = "pbkdf2" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" +dependencies = [ + "digest 0.10.7", + "hmac 0.12.1", +] + [[package]] name = "pbkdf2" version = "0.13.0" @@ -2188,18 +2953,33 @@ dependencies = [ "spki 0.8.0", ] +[[package]] +name = "pkcs12" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "695b3df3d3cc1015f12d70235e35b6b79befc5fa7a9b95b951eab1dd07c9efc2" +dependencies = [ + "cms 0.2.3", + "const-oid 0.9.6", + "der 0.7.10", + "digest 0.10.7", + "spki 0.7.3", + "x509-cert 0.2.5", + "zeroize", +] + [[package]] name = "pkcs12" version = "0.2.0-pre.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8059bd79345d1d1c125656025814704bab5cdd204b1cefd5fab59b0fdd7476d2" dependencies = [ - "cms", + "cms 0.3.0-pre.1", "const-oid 0.10.2", "der 0.8.0", "digest 0.11.3", "spki 0.8.0", - "x509-cert", + "x509-cert 0.3.0-rc.4", "zeroize", ] @@ -2209,7 +2989,12 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e847e2c91a18bfa887dd028ec33f2fe6f25db77db3619024764914affe8b69a6" dependencies = [ + "aes 0.8.4", + "cbc 0.1.2", "der 0.7.10", + "pbkdf2 0.12.2", + "scrypt 0.11.0", + "sha2 0.10.9", "spki 0.7.3", ] @@ -2222,8 +3007,8 @@ dependencies = [ "aes 0.9.0", "cbc 0.2.1", "der 0.8.0", - "pbkdf2", - "scrypt", + "pbkdf2 0.13.0", + "scrypt 0.12.0", "sha2 0.11.0", "spki 0.8.0", ] @@ -2255,6 +3040,12 @@ version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "19f132c84eca552bf34cab8ec81f1c1dcc229b811638f9d283dceabe58c5569e" +[[package]] +name = "plain" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" + [[package]] name = "plist" version = "1.9.0" @@ -2311,6 +3102,21 @@ dependencies = [ "universal-hash 0.6.1", ] +[[package]] +name = "portable-atomic" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49" + +[[package]] +name = "portable-atomic-util" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2a106d1259c23fac8e543272398ae0e3c0b8d33c88ed73d0cc71b0f1d902618" +dependencies = [ + "portable-atomic", +] + [[package]] name = "potential_utf" version = "0.1.5" @@ -2393,12 +3199,19 @@ version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" +[[package]] +name = "radium" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" + [[package]] name = "rand" version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5ca0ecfa931c29007047d1bc58e623ab12e5590e8c7cc53200d5202b69266d8a" dependencies = [ + "libc", "rand_chacha 0.3.1", "rand_core 0.6.4", ] @@ -2468,6 +3281,74 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69" +[[package]] +name = "rasn" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e442690f86da40561d5548e7ffb4a18af90d1c1b3536090de847ca2d5a3a6426" +dependencies = [ + "arrayvec", + "bitvec", + "bitvec-nom2", + "bytes", + "chrono", + "either", + "hashbrown 0.14.5", + "konst", + "nom", + "num-bigint", + "num-integer", + "num-traits", + "once_cell", + "rasn-derive", + "serde_json", + "snafu", +] + +[[package]] +name = "rasn-derive" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96b0d374c7e4e985e6bc97ca7e7ad1d9642a8415db2017777d6e383002edaab2" +dependencies = [ + "either", + "itertools", + "proc-macro2", + "quote", + "rayon", + "syn", + "uuid", +] + +[[package]] +name = "rayon" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb39b166781f92d482534ef4b4b1b2568f42613b53e5b6c160e24cfbfa30926d" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "rc2" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62c64daa8e9438b84aaae55010a93f396f8e60e3911590fcba770d04643fc1dd" +dependencies = [ + "cipher 0.4.4", +] + [[package]] name = "rc2" version = "0.9.0" @@ -2488,7 +3369,7 @@ dependencies = [ "rustls-pki-types", "time", "x509-parser", - "yasna", + "yasna 0.6.0", ] [[package]] @@ -2497,9 +3378,49 @@ version = "0.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" dependencies = [ - "bitflags", + "bitflags", +] + +[[package]] +name = "redox_users" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" +dependencies = [ + "getrandom 0.2.17", + "libredox", + "thiserror 1.0.69", +] + +[[package]] +name = "regex" +version = "1.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", ] +[[package]] +name = "regex-syntax" +version = "0.8.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" + [[package]] name = "reqwest" version = "0.13.3" @@ -2552,7 +3473,7 @@ dependencies = [ "async-trait", "http", "reqwest", - "thiserror", + "thiserror 2.0.18", "tower-service", ] @@ -2799,6 +3720,30 @@ version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" +[[package]] +name = "ruzstd" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fad02996bfc73da3e301efe90b1837be9ed8f4a462b6ed410aa35d00381de89f" +dependencies = [ + "twox-hash", +] + +[[package]] +name = "ryu" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" + +[[package]] +name = "salsa20" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97a22f5af31f73a954c10289c93e8a50cc23d971e80ee446f1f6f7137a088213" +dependencies = [ + "cipher 0.4.4", +] + [[package]] name = "salsa20" version = "0.11.0" @@ -2833,6 +3778,37 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" +[[package]] +name = "scroll" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ab8598aa408498679922eff7fa985c25d58a90771bd6be794434c5277eab1a6" +dependencies = [ + "scroll_derive", +] + +[[package]] +name = "scroll_derive" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1783eabc414609e28a5ba76aee5ddd52199f7107a0b24c2e9746a1ecc34a683d" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "scrypt" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0516a385866c09368f0b5bcd1caff3366aace790fcd46e2bb032697bb172fd1f" +dependencies = [ + "pbkdf2 0.12.2", + "salsa20 0.10.2", + "sha2 0.10.9", +] + [[package]] name = "scrypt" version = "0.12.0" @@ -2840,8 +3816,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d87af57419b594aa23fa95f09f0e06d80d84ba01c26148c43844cad6ff4485f0" dependencies = [ "cfg-if", - "pbkdf2", - "salsa20", + "pbkdf2 0.13.0", + "salsa20 0.11.0", "sha2 0.11.0", ] @@ -2917,6 +3893,18 @@ dependencies = [ "serde_derive", ] +[[package]] +name = "serde-xml-rs" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb3aa78ecda1ebc9ec9847d5d3aba7d618823446a049ba2491940506da6e2782" +dependencies = [ + "log", + "serde", + "thiserror 1.0.69", + "xml-rs", +] + [[package]] name = "serde_core" version = "1.0.228" @@ -2950,6 +3938,19 @@ dependencies = [ "zmij", ] +[[package]] +name = "serde_yaml" +version = "0.9.34+deprecated" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" +dependencies = [ + "indexmap", + "itoa", + "ryu", + "serde", + "unsafe-libyaml", +] + [[package]] name = "serdect" version = "0.4.3" @@ -3004,6 +4005,21 @@ dependencies = [ "digest 0.11.3", ] +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "shell-words" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc6fe69c597f9c37bfeeeeeb33da3530379845f10be461a66d16d03eca2ded77" + [[package]] name = "shlex" version = "1.3.0" @@ -3070,6 +4086,27 @@ version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" +[[package]] +name = "snafu" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e84b3f4eacbf3a1ce05eac6763b4d629d60cbc94d632e4092c54ade71f1e1a2" +dependencies = [ + "snafu-derive", +] + +[[package]] +name = "snafu-derive" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1c97747dbf44bb1ca44a561ece23508e99cb592e862f22222dcf42f51d1e451" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "socket2" version = "0.6.3" @@ -3124,6 +4161,18 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + [[package]] name = "subtle" version = "2.6.1" @@ -3182,6 +4231,12 @@ dependencies = [ "libc", ] +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + [[package]] name = "tempfile" version = "3.27.0" @@ -3195,13 +4250,33 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + [[package]] name = "thiserror" version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" dependencies = [ - "thiserror-impl", + "thiserror-impl 2.0.18", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -3215,6 +4290,15 @@ dependencies = [ "syn", ] +[[package]] +name = "thread_local" +version = "1.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" +dependencies = [ + "cfg-if", +] + [[package]] name = "time" version = "0.3.47" @@ -3267,9 +4351,21 @@ dependencies = [ "mio", "pin-project-lite", "socket2", + "tokio-macros", "windows-sys 0.61.2", ] +[[package]] +name = "tokio-macros" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "385a6cb71ab9ab790c5fe8d67f1645e6c450a7ce006a33de03daa956cf70a496" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "tokio-native-tls" version = "0.3.1" @@ -3399,6 +4495,32 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" dependencies = [ "once_cell", + "valuable", +] + +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7f578e5945fb242538965c2d0b04418d38ec25c79d160cd279bf0731c8d319" +dependencies = [ + "nu-ansi-term", + "sharded-slab", + "smallvec", + "thread_local", + "tracing-core", + "tracing-log", ] [[package]] @@ -3428,7 +4550,17 @@ dependencies = [ "rustls", "rustls-pki-types", "sha1 0.10.6", - "thiserror", + "thiserror 2.0.18", +] + +[[package]] +name = "twox-hash" +version = "1.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" +dependencies = [ + "cfg-if", + "static_assertions", ] [[package]] @@ -3443,12 +4575,33 @@ version = "1.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40ce102ab67701b8526c123c1bab5cbe42d7040ccfd0f64af1a385808d2f43de" +[[package]] +name = "typewit" +version = "1.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "214ca0b2191785cbc06209b9ca1861e048e39b5ba33574b3cedd58363d5bb5f6" +dependencies = [ + "typewit_proc_macros", +] + +[[package]] +name = "typewit_proc_macros" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e36a83ea2b3c704935a01b4642946aadd445cea40b10935e3f8bd8052b8193d6" + [[package]] name = "unicode-ident" version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" +[[package]] +name = "unicode-width" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" + [[package]] name = "unicode-xid" version = "0.2.6" @@ -3475,6 +4628,12 @@ dependencies = [ "ctutils", ] +[[package]] +name = "unsafe-libyaml" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" + [[package]] name = "untrusted" version = "0.9.0" @@ -3505,6 +4664,12 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + [[package]] name = "uuid" version = "1.23.1" @@ -3518,6 +4683,12 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "valuable" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" + [[package]] name = "vcpkg" version = "0.2.15" @@ -3722,6 +4893,12 @@ dependencies = [ "rustls-pki-types", ] +[[package]] +name = "widestring" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72069c3113ab32ab29e5584db3c6ec55d416895e60715417b5b883a357c3e471" + [[package]] name = "winapi-util" version = "0.1.11" @@ -3801,6 +4978,15 @@ dependencies = [ "windows-link", ] +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + [[package]] name = "windows-sys" version = "0.52.0" @@ -3810,6 +4996,15 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + [[package]] name = "windows-sys" version = "0.60.2" @@ -3828,6 +5023,21 @@ dependencies = [ "windows-link", ] +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + [[package]] name = "windows-targets" version = "0.52.6" @@ -3861,6 +5071,12 @@ dependencies = [ "windows_x86_64_msvc 0.53.1", ] +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" @@ -3873,6 +5089,12 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + [[package]] name = "windows_aarch64_msvc" version = "0.52.6" @@ -3885,6 +5107,12 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + [[package]] name = "windows_i686_gnu" version = "0.52.6" @@ -3909,6 +5137,12 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + [[package]] name = "windows_i686_msvc" version = "0.52.6" @@ -3921,6 +5155,12 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + [[package]] name = "windows_x86_64_gnu" version = "0.52.6" @@ -3933,6 +5173,12 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" @@ -3945,6 +5191,12 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + [[package]] name = "windows_x86_64_msvc" version = "0.52.6" @@ -4070,12 +5322,21 @@ dependencies = [ "pharos", "rustc_version", "send_wrapper", - "thiserror", + "thiserror 2.0.18", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", ] +[[package]] +name = "wyz" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] + [[package]] name = "x25519-dalek" version = "2.0.1" @@ -4088,6 +5349,17 @@ dependencies = [ "zeroize", ] +[[package]] +name = "x509-cert" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1301e935010a701ae5f8655edc0ad17c44bad3ac5ce8c39185f75453b720ae94" +dependencies = [ + "const-oid 0.9.6", + "der 0.7.10", + "spki 0.7.3", +] + [[package]] name = "x509-cert" version = "0.3.0-rc.4" @@ -4113,10 +5385,22 @@ dependencies = [ "oid-registry", "ring", "rusticata-macros", - "thiserror", + "thiserror 2.0.18", "time", ] +[[package]] +name = "xml-rs" +version = "0.8.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ae8337f8a065cfc972643663ea4279e04e7256de865aa66fe25cec5fb912d3f" + +[[package]] +name = "yasna" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" + [[package]] name = "yasna" version = "0.6.0" @@ -4258,6 +5542,17 @@ dependencies = [ "zopfli", ] +[[package]] +name = "zip_structs" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce824a6bfffe8942820fa36d24973b7c83a40896749a42e33de0abdd11750ee5" +dependencies = [ + "byteorder", + "bytesize", + "thiserror 1.0.69", +] + [[package]] name = "zlib-rs" version = "0.6.3" diff --git a/examples/minimal/Cargo.toml b/examples/minimal/Cargo.toml index d861c81..28bc722 100644 --- a/examples/minimal/Cargo.toml +++ b/examples/minimal/Cargo.toml @@ -4,10 +4,11 @@ version = "0.1.0" edition = "2024" [dependencies] -# isideload = { path = "../../isideload" } -# plist = "1.8.0" -# plist-macro = "0.1.3" -# tokio = { version = "1.40.0", features = ["rt-multi-thread", "macros"] } -# tracing = "0.1.44" -# tracing-subscriber = "0.3.22" -# idevice = { version = "0.1.61", default-features = false, features = ["usbmuxd", "ring"] } \ No newline at end of file +isideload = { path = "../../isideload" } +plist = "1.8.0" +plist-macro = "0.1.3" +tokio = { version = "1.40.0", features = ["rt-multi-thread", "macros"] } +tracing = "0.1.44" +tracing-subscriber = "0.3.22" +idevice = { version = "0.1.61", default-features = false, features = ["usbmuxd", "ring"] } +rustls = { version = "0.23", default-features = false, features = ["ring"] } \ No newline at end of file diff --git a/examples/minimal/src/main.rs b/examples/minimal/src/main.rs index 2170baa..135d97f 100644 --- a/examples/minimal/src/main.rs +++ b/examples/minimal/src/main.rs @@ -1,136 +1,139 @@ -// use std::{env, path::PathBuf}; - -// use idevice::usbmuxd::{UsbmuxdAddr, UsbmuxdConnection}; -// use isideload::{ -// anisette::remote_v3::RemoteV3AnisetteProvider, -// auth::apple_account::AppleAccount, -// dev::{ -// certificates::DevelopmentCertificate, developer_session::DeveloperSession, -// teams::DeveloperTeam, -// }, -// sideload::{SideloaderBuilder, TeamSelection, builder::MaxCertsBehavior}, -// util::keyring_storage::KeyringStorage, -// }; - -// use tracing::Level; -// use tracing_subscriber::FmtSubscriber; - -// #[tokio::main] -// async fn main() { -// isideload::init().expect("Failed to initialize error reporting"); -// let subscriber = FmtSubscriber::builder() -// .with_max_level(Level::INFO) -// .finish(); -// tracing::subscriber::set_global_default(subscriber).expect("setting default subscriber failed"); - -// let args: Vec = env::args().collect(); - -// let apple_id = args -// .get(1) -// .expect("Please provide the Apple ID to use for installation"); -// let apple_password = args.get(2).expect("Please provide the Apple ID password"); -// let app_path = PathBuf::from( -// args.get(3) -// .expect("Please provide the path to the app to install"), -// ); - -// let get_2fa_code = || { -// let mut code = String::new(); -// println!("Enter 2FA code:"); -// std::io::stdin().read_line(&mut code).unwrap(); -// Some(code.trim().to_string()) -// }; - -// let account = AppleAccount::builder(apple_id) -// .anisette_provider( -// RemoteV3AnisetteProvider::default() -// .unwrap() -// .set_serial_number("2".to_string()), -// ) -// .login(apple_password, get_2fa_code) -// .await; - -// let mut account = account.unwrap(); - -// let dev_session = DeveloperSession::from_account(&mut account) -// .await -// .expect("Failed to create developer session"); - -// let usbmuxd = UsbmuxdConnection::default().await; -// if usbmuxd.is_err() { -// panic!("Failed to connect to usbmuxd: {:?}", usbmuxd.err()); -// } -// let mut usbmuxd = usbmuxd.unwrap(); - -// let devs = usbmuxd.get_devices().await.unwrap(); -// if devs.is_empty() { -// panic!("No devices found"); -// } - -// let provider = devs -// .first() -// .unwrap() -// .to_provider(UsbmuxdAddr::from_env_var().unwrap(), "isideload-demo"); - -// let team_selection_prompt = |teams: &Vec| { -// println!("Please select a team:"); -// for (index, team) in teams.iter().enumerate() { -// println!( -// "{}: {} ({})", -// index + 1, -// team.name.as_deref().unwrap_or(""), -// team.team_id -// ); -// } -// let mut input = String::new(); -// std::io::stdin().read_line(&mut input).unwrap(); -// let selection = input.trim().parse::().ok()?; -// if selection == 0 || selection > teams.len() { -// return None; -// } -// Some(teams[selection - 1].team_id.clone()) -// }; - -// let cert_selection_prompt = |certs: &Vec| { -// println!("Maximum number of certificates reached. Please select certificates to revoke:"); -// for (index, cert) in certs.iter().enumerate() { -// println!( -// "({}) {}: {}", -// index + 1, -// cert.name.as_deref().unwrap_or(""), -// cert.machine_name.as_deref().unwrap_or(""), -// ); -// } -// println!("Enter the numbers of the certificates to revoke, separated by commas:"); -// let mut input = String::new(); -// std::io::stdin().read_line(&mut input).unwrap(); -// let selections: Vec = input -// .trim() -// .split(',') -// .filter_map(|s| s.trim().parse::().ok()) -// .filter(|&n| n > 0 && n <= certs.len()) -// .collect(); -// if selections.is_empty() { -// return None; -// } -// Some( -// selections -// .into_iter() -// .map(|n| certs[n - 1].serial_number.clone().unwrap_or_default()) -// .collect::>(), -// ) -// }; - -// let mut sideloader = SideloaderBuilder::new(dev_session, apple_id.to_string()) -// .team_selection(TeamSelection::PromptOnce(team_selection_prompt)) -// .max_certs_behavior(MaxCertsBehavior::Prompt(Box::new(cert_selection_prompt))) -// .storage(Box::new(KeyringStorage::new("minimal".to_string()))) -// .machine_name("isideload-minimal".to_string()) -// .build(); - -// let result = sideloader.install_app(&provider, app_path, true).await; -// match result { -// Ok(_) => println!("App installed successfully"), -// Err(e) => panic!("{}", e), -// } -// } +use std::{env, path::PathBuf}; + +use idevice::usbmuxd::{UsbmuxdAddr, UsbmuxdConnection}; +use isideload::{ + anisette::remote_v3::RemoteV3AnisetteProvider, + auth::apple_account::AppleAccount, + dev::{ + certificates::DevelopmentCertificate, developer_session::DeveloperSession, + teams::DeveloperTeam, + }, + sideload::{SideloaderBuilder, TeamSelection, builder::MaxCertsBehavior}, + util::keyring_storage::KeyringStorage, +}; + +use tracing::Level; +use tracing_subscriber::FmtSubscriber; + +#[tokio::main] +async fn main() { + rustls::crypto::ring::default_provider() + .install_default() + .expect("Failed to install rustls crypto provider"); + isideload::init().expect("Failed to initialize error reporting"); + let subscriber = FmtSubscriber::builder() + .with_max_level(Level::INFO) + .finish(); + tracing::subscriber::set_global_default(subscriber).expect("setting default subscriber failed"); + + let args: Vec = env::args().collect(); + + let apple_id = args + .get(1) + .expect("Please provide the Apple ID to use for installation"); + let apple_password = args.get(2).expect("Please provide the Apple ID password"); + let app_path = PathBuf::from( + args.get(3) + .expect("Please provide the path to the app to install"), + ); + + let get_2fa_code = async || { + let mut code = String::new(); + println!("Enter 2FA code:"); + std::io::stdin().read_line(&mut code).unwrap(); + Some(code.trim().to_string()) + }; + + let account = AppleAccount::builder(apple_id) + .anisette_provider( + RemoteV3AnisetteProvider::default() + .unwrap() + .set_serial_number("2".to_string()), + ) + .login(apple_password, get_2fa_code) + .await; + + let mut account = account.unwrap(); + + let dev_session = DeveloperSession::from_account(&mut account) + .await + .expect("Failed to create developer session"); + + let usbmuxd = UsbmuxdConnection::default().await; + if usbmuxd.is_err() { + panic!("Failed to connect to usbmuxd: {:?}", usbmuxd.err()); + } + let mut usbmuxd = usbmuxd.unwrap(); + + let devs = usbmuxd.get_devices().await.unwrap(); + if devs.is_empty() { + panic!("No devices found"); + } + + let provider = devs + .first() + .unwrap() + .to_provider(UsbmuxdAddr::from_env_var().unwrap(), "isideload-demo"); + + let team_selection_prompt = |teams: &Vec| { + println!("Please select a team:"); + for (index, team) in teams.iter().enumerate() { + println!( + "{}: {} ({})", + index + 1, + team.name.as_deref().unwrap_or(""), + team.team_id + ); + } + let mut input = String::new(); + std::io::stdin().read_line(&mut input).unwrap(); + let selection = input.trim().parse::().ok()?; + if selection == 0 || selection > teams.len() { + return None; + } + Some(teams[selection - 1].team_id.clone()) + }; + + let cert_selection_prompt = |certs: &Vec| { + println!("Maximum number of certificates reached. Please select certificates to revoke:"); + for (index, cert) in certs.iter().enumerate() { + println!( + "({}) {}: {}", + index + 1, + cert.name.as_deref().unwrap_or(""), + cert.machine_name.as_deref().unwrap_or(""), + ); + } + println!("Enter the numbers of the certificates to revoke, separated by commas:"); + let mut input = String::new(); + std::io::stdin().read_line(&mut input).unwrap(); + let selections: Vec = input + .trim() + .split(',') + .filter_map(|s| s.trim().parse::().ok()) + .filter(|&n| n > 0 && n <= certs.len()) + .collect(); + if selections.is_empty() { + return None; + } + Some( + selections + .into_iter() + .map(|n| certs[n - 1].serial_number.clone().unwrap_or_default()) + .collect::>(), + ) + }; + + let mut sideloader = SideloaderBuilder::new(dev_session, apple_id.to_string()) + .team_selection(TeamSelection::PromptOnce(team_selection_prompt)) + .max_certs_behavior(MaxCertsBehavior::Prompt(Box::new(cert_selection_prompt))) + .storage(Box::new(KeyringStorage::new("minimal".to_string()))) + .machine_name("isideload-minimal".to_string()) + .build(); + + let result = sideloader.install_app(&provider, app_path, true).await; + match result { + Ok(_) => println!("App installed successfully"), + Err(e) => panic!("{}", e), + } +} diff --git a/isideload/Cargo.toml b/isideload/Cargo.toml index 93334a5..6f7fc89 100644 --- a/isideload/Cargo.toml +++ b/isideload/Cargo.toml @@ -3,7 +3,7 @@ name = "isideload" description = "Sideload iOS/iPadOS applications" license = "MIT" authors = ["Nicholas Sharp "] -version = "0.2.22" +version = "0.3.0" edition = "2024" repository = "https://github.com/nab138/isideload" documentation = "https://docs.rs/isideload" @@ -13,7 +13,7 @@ readme = "../README.md" [features] default = ["install", "keyring-storage", "tokio-mt"] # default = ["wasm"] -tokio-mt = ["tokio/rt-multi-thread", "tokio/fs", "dep:tokio-tungstenite"] +tokio-mt = ["tokio/rt-multi-thread", "dep:tokio-tungstenite"] install = ["dep:idevice"] keyring-storage = ["dep:keyring"] wasm = ["idevice/wasm", "dep:getrandom_02", "dep:getrandom_04", "uuid/js", "dep:ws_stream_wasm", "dep:urlencoding"] @@ -53,7 +53,8 @@ x509-certificate = { version = "0.26.0", package = "isideload-x509-certificate" rcgen = { version = "0.14.7", default-features = false, features = ["ring", "pem"] } p12-keystore = { version = "0.3.0-rc4", package = "isideload-p12-keystore" } zip = { version = "8.3", default-features = false, features = ["deflate"] } -# apple-codesign = { version = "0.29.7", package = "isideload-apple-codesign", path = "../../isideload-apple-platform-rs/apple-codesign"} +apple-codesign = { version = "0.29.8", package = "isideload-apple-codesign" } #, path = "../../isideload-apple-platform-rs/apple-codesign"} +isideload-vfs = { version = "0.0.1" } #, path = "../../isideload-apple-platform-rs/isideload-vfs" } sha1 = "0.11.0" rustls = { version = "0.23", default-features = false, features = ["ring", "tls12", "std"] } reqwest-middleware = "0.5.1" @@ -63,6 +64,7 @@ futures = "0.3.32" ws_stream_wasm = { version = "0.7.5", optional = true} web-time = "1" + # There is a bug in rustls-platform-verifier that causes an invalid certificate error with apple's root cert. # It has been fixed already but I am waiting for a new release before I can update the dependency. # Using native-tls avoids the issue. diff --git a/isideload/src/sideload/application.rs b/isideload/src/sideload/application.rs index 0365063..ccfd181 100644 --- a/isideload/src/sideload/application.rs +++ b/isideload/src/sideload/application.rs @@ -7,11 +7,11 @@ use crate::dev::developer_session::DeveloperSession; use crate::dev::teams::DeveloperTeam; use crate::sideload::bundle::Bundle; use crate::sideload::cert_identity::CertificateIdentity; +use isideload_vfs::fs::File; use rootcause::option_ext::OptionExt; use rootcause::prelude::*; -use std::fs::File; +use std::io::Write; use std::path::PathBuf; -use tokio::io::AsyncWriteExt; use tracing::info; use zip::ZipArchive; @@ -22,7 +22,7 @@ pub struct Application { impl Application { pub fn new(path: PathBuf) -> Result { - if !path.exists() { + if !isideload_vfs::fs::metadata(&path).is_ok() { bail!(SideloadError::InvalidBundle( "Application path does not exist".to_string(), )); @@ -31,8 +31,8 @@ impl Application { let mut bundle_path = path.clone(); //let mut temp_path = PathBuf::new(); - if path.is_file() { - let temp_dir = std::env::temp_dir(); + if isideload_vfs::fs::metadata(&bundle_path)?.is_file() { + let temp_dir = isideload_vfs::fs::temp_dir(); let temp_path = temp_dir.join( path.file_name() .ok_or_report()? @@ -40,22 +40,24 @@ impl Application { .to_string() + "_extracted", ); - if temp_path.exists() { - std::fs::remove_dir_all(&temp_path) + if isideload_vfs::fs::metadata(&temp_path).is_ok() { + isideload_vfs::fs::remove_dir_all(&temp_path) .context("Failed to remove existing temporary directory")?; } - std::fs::create_dir_all(&temp_path).context("Failed to create temporary directory")?; + isideload_vfs::fs::create_dir_all(&temp_path) + .context("Failed to create temporary directory")?; let file = File::open(&path).context("Failed to open application archive")?; let mut archive = ZipArchive::new(file).context("Failed to open application archive")?; + archive .extract(&temp_path) .context("Failed to extract application archive")?; let payload_folder = temp_path.join("Payload"); - if payload_folder.exists() && payload_folder.is_dir() { - let app_dirs: Vec<_> = std::fs::read_dir(&payload_folder) + if isideload_vfs::fs::metadata(&payload_folder).is_ok() && payload_folder.is_dir() { + let app_dirs: Vec<_> = isideload_vfs::fs::read_dir(&payload_folder) .context("Failed to read Payload directory")? .filter_map(Result::ok) .filter(|entry| entry.file_type().map(|ft| ft.is_dir()).unwrap_or(false)) @@ -73,9 +75,22 @@ impl Application { )); } } else { - bail!(SideloadError::InvalidBundle( - "No Payload directory found in the application archive".to_string(), - )); + // gather the directory contents as a string for debugging + let mut contents = String::new(); + if isideload_vfs::fs::metadata(&temp_path).is_ok() && temp_path.is_dir() { + let entries = isideload_vfs::fs::read_dir(&temp_path) + .context("Failed to read temporary directory for error reporting")?; + for entry in entries { + if let Ok(entry) = entry { + contents + .push_str(&format!("{}\n", entry.file_name().to_string_lossy())); + } + } + } + bail!(SideloadError::InvalidBundle(format!( + "No Payload directory found in the application archive, instead: {}", + contents + ),)); } } let bundle = Bundle::new(bundle_path)?; @@ -271,20 +286,10 @@ impl Application { .context("Failed to encode cert as p12")?; let alt_cert_path = target_bundle.bundle_dir.join(cert_file_name); - #[cfg(feature = "tokio-mt")] - { - let mut file = tokio::fs::File::create(&alt_cert_path) - .await - .context(format!("Failed to create {}", cert_file_name))?; - file.write_all(&p12_bytes) - .await - .context(format!("Failed to write {}", cert_file_name))?; - } - - #[cfg(not(feature = "tokio-mt"))] - { - unimplemented!("not yet supported") - } + let mut file = isideload_vfs::fs::File::create(&alt_cert_path) + .context(format!("Failed to create {}", cert_file_name))?; + file.write_all(&p12_bytes) + .context(format!("Failed to write {}", cert_file_name))?; } } Ok(()) diff --git a/isideload/src/sideload/bundle.rs b/isideload/src/sideload/bundle.rs index fdee936..67a947d 100644 --- a/isideload/src/sideload/bundle.rs +++ b/isideload/src/sideload/bundle.rs @@ -1,10 +1,11 @@ // This file was made using https://github.com/Dadoum/Sideloader as a reference. // I'm planning on redoing this later to better handle entitlements, extensions, etc, but it will do for now -use plist::{Dictionary, Value}; +use isideload_vfs::fs::File; +use plist::{Dictionary, Value, to_writer_binary}; use rootcause::prelude::*; use std::{ - fs, + io::BufWriter, path::{Path, PathBuf}, }; @@ -32,13 +33,13 @@ impl Bundle { let info_plist_path = bundle_path.join("Info.plist"); assert_bundle( - info_plist_path.exists(), + isideload_vfs::fs::metadata(&info_plist_path).is_ok(), &format!("No Info.plist here: {}", info_plist_path.display()), )?; - let plist_data = fs::read(&info_plist_path).context(SideloadError::InvalidBundle( - "Failed to read Info.plist".to_string(), - ))?; + let plist_data = isideload_vfs::fs::read(&info_plist_path).context( + SideloadError::InvalidBundle("Failed to read Info.plist".to_string()), + )?; let app_info = plist::from_bytes(&plist_data).context(SideloadError::InvalidBundle( "Failed to parse Info.plist".to_string(), @@ -46,15 +47,15 @@ impl Bundle { // Load app extensions from PlugIns directory let plug_ins_dir = bundle_path.join("PlugIns"); - let app_extensions = if plug_ins_dir.exists() { - fs::read_dir(&plug_ins_dir) + let app_extensions = if isideload_vfs::fs::metadata(&plug_ins_dir).is_ok() { + isideload_vfs::fs::read_dir(&plug_ins_dir) .context(SideloadError::InvalidBundle( "Failed to read PlugIns directory".to_string(), ))? .filter_map(|entry| entry.ok()) .filter(|entry| { entry.file_type().map(|ft| ft.is_dir()).unwrap_or(false) - && entry.path().join("Info.plist").exists() + && isideload_vfs::fs::metadata(&entry.path().join("Info.plist")).is_ok() }) .filter_map(|entry| Bundle::new(entry.path()).ok()) .collect() @@ -64,15 +65,15 @@ impl Bundle { // Load frameworks from Frameworks directory let frameworks_dir = bundle_path.join("Frameworks"); - let frameworks = if frameworks_dir.exists() { - fs::read_dir(&frameworks_dir) + let frameworks = if isideload_vfs::fs::metadata(&frameworks_dir).is_ok() { + isideload_vfs::fs::read_dir(&frameworks_dir) .context(SideloadError::InvalidBundle( "Failed to read Frameworks directory".to_string(), ))? .filter_map(|entry| entry.ok()) .filter(|entry| { entry.file_type().map(|ft| ft.is_dir()).unwrap_or(false) - && entry.path().join("Info.plist").exists() + && isideload_vfs::fs::metadata(&entry.path().join("Info.plist")).is_ok() }) .filter_map(|entry| Bundle::new(entry.path()).ok()) .collect() @@ -129,9 +130,19 @@ impl Bundle { pub fn write_info(&self) -> Result<(), Report> { let info_plist_path = self.bundle_dir.join("Info.plist"); - plist::to_file_binary(&info_plist_path, &self.app_info).context( - SideloadError::InvalidBundle("Failed to write Info.plist".to_string()), + // plist::to_file_binary(&info_plist_path, &self.app_info).context( + // SideloadError::InvalidBundle("Failed to write Info.plist".to_string()), + // )?; + let mut file = File::create(&info_plist_path).context(SideloadError::InvalidBundle( + "Failed to write Info.plist".to_string(), + ))?; + to_writer_binary(BufWriter::new(&mut file), &self.app_info).context( + SideloadError::InvalidBundle("Failed to create Info.plist writer".to_string()), )?; + + file.sync_all().context(SideloadError::InvalidBundle( + "Failed to sync Info.plist".to_string(), + ))?; Ok(()) } @@ -196,10 +207,9 @@ fn find_dylibs(dir: &Path, bundle_root: &Path) -> Result, Report> { bundle_root: &Path, libraries: &mut Vec, ) -> Result<(), Report> { - let entries = fs::read_dir(dir).context(SideloadError::InvalidBundle(format!( - "Failed to read directory {}", - dir.display() - )))?; + let entries = isideload_vfs::fs::read_dir(dir).context(SideloadError::InvalidBundle( + format!("Failed to read directory {}", dir.display()), + ))?; for entry in entries { let entry = entry.context(SideloadError::InvalidBundle( @@ -207,9 +217,11 @@ fn find_dylibs(dir: &Path, bundle_root: &Path) -> Result, Report> { ))?; let path = entry.path(); - let file_type = entry.file_type().context(SideloadError::InvalidBundle( - "Failed to get file type".to_string(), - ))?; + let file_type = isideload_vfs::fs::metadata(&path) + .map(|m| m.file_type()) + .context(SideloadError::InvalidBundle( + "Failed to get file type".to_string(), + ))?; if file_type.is_file() { if let Some(name) = path.file_name().and_then(|n| n.to_str()) diff --git a/isideload/src/sideload/cert_identity.rs b/isideload/src/sideload/cert_identity.rs index 081e554..0af8d2c 100644 --- a/isideload/src/sideload/cert_identity.rs +++ b/isideload/src/sideload/cert_identity.rs @@ -1,7 +1,7 @@ -// use apple_codesign::{ -// SigningSettings, -// cryptography::{InMemoryPrivateKey, PrivateKey}, -// }; +use apple_codesign::{ + SigningSettings, + cryptography::{InMemoryPrivateKey, PrivateKey}, +}; use hex::ToHex; use rcgen::{CertificateParams, DistinguishedName, DnType, KeyPair, PKCS_RSA_SHA256}; use rootcause::{option_ext::OptionExt, prelude::*}; @@ -32,7 +32,7 @@ pub struct CertificateIdentity { pub machine_name: String, pub certificate: CapturedX509Certificate, pub private_key: RsaPrivateKey, - //pub signing_key: InMemoryPrivateKey, + pub signing_key: InMemoryPrivateKey, } impl CertificateIdentity { @@ -111,7 +111,7 @@ impl CertificateIdentity { max_certs_behavior: &MaxCertsBehavior, ) -> Result { let pr = Self::retrieve_private_key(apple_email, storage).await?; - //let signing_key = Self::build_signing_key(&pr)?; + let signing_key = Self::build_signing_key(&pr)?; let found = Self::find_matching(&pr, machine_name, developer_session, team).await; if let Ok(Some((cert, x509_cert))) = found { @@ -121,7 +121,7 @@ impl CertificateIdentity { machine_name: cert.machine_name.clone().unwrap_or_default(), certificate: x509_cert, private_key: pr, - //signing_key, + signing_key, }); } @@ -145,7 +145,7 @@ impl CertificateIdentity { machine_name: cert.machine_name.clone().unwrap_or_default(), certificate: x509_cert, private_key: pr, - //signing_key, + signing_key, }) } @@ -304,10 +304,10 @@ impl CertificateIdentity { Ok(params.serialize_request(&subject_key)?.pem()?) } - // fn build_signing_key(private_key: &RsaPrivateKey) -> Result { - // let pkcs8 = private_key.to_pkcs8_der()?; - // Ok(InMemoryPrivateKey::from_pkcs8_der(pkcs8.as_bytes())?) - // } + fn build_signing_key(private_key: &RsaPrivateKey) -> Result { + let pkcs8 = private_key.to_pkcs8_der()?; + Ok(InMemoryPrivateKey::from_pkcs8_der(pkcs8.as_bytes())?) + } async fn revoke_others( developer_session: &mut DeveloperSession, @@ -351,17 +351,17 @@ impl CertificateIdentity { } } - // pub fn setup_signing_settings<'a>( - // &'a self, - // settings: &mut SigningSettings<'a>, - // ) -> Result<(), Report> { - // settings.set_signing_key( - // self.signing_key.as_key_info_signer(), - // self.certificate.clone(), - // ); - // settings.chain_apple_certificates(); - // settings.set_team_id_from_signing_certificate(); - - // Ok(()) - // } + pub fn setup_signing_settings<'a>( + &'a self, + settings: &mut SigningSettings<'a>, + ) -> Result<(), Report> { + settings.set_signing_key( + self.signing_key.as_key_info_signer(), + self.certificate.clone(), + ); + settings.chain_apple_certificates(); + settings.set_team_id_from_signing_certificate(); + + Ok(()) + } } diff --git a/isideload/src/sideload/install.rs b/isideload/src/sideload/install.rs index 8937322..3b303e2 100644 --- a/isideload/src/sideload/install.rs +++ b/isideload/src/sideload/install.rs @@ -100,15 +100,16 @@ fn afc_upload_dir<'a>( afc_path: &'a str, ) -> Pin> + Send + 'a>> { Box::pin(async move { - let entries = std::fs::read_dir(path)?; + let entries = isideload_vfs::fs::read_dir(path)?; afc_client .mk_dir(afc_path) .await .map_err(Error::IdeviceError)?; + for entry in entries { let entry = entry?; let path = entry.path(); - if path.is_dir() { + if isideload_vfs::fs::metadata(&path)?.is_dir() { let new_afc_path = format!( "{}/{}", afc_path, @@ -127,11 +128,14 @@ fn afc_upload_dir<'a>( ) .await .map_err(Error::IdeviceError)?; - let bytes = std::fs::read(&path)?; - file_handle - .write_entire(&bytes) - .await - .map_err(Error::IdeviceError)?; + + let bytes = isideload_vfs::fs::read(&path)?; + for chunk in bytes.chunks(8 * 1024) { + file_handle + .write_entire(chunk) + .await + .map_err(Error::IdeviceError)?; + } file_handle.close().await.map_err(Error::IdeviceError)?; } } diff --git a/isideload/src/sideload/sideloader.rs b/isideload/src/sideload/sideloader.rs index e9abfb4..56bfcf1 100644 --- a/isideload/src/sideload/sideloader.rs +++ b/isideload/src/sideload/sideloader.rs @@ -162,17 +162,10 @@ impl Sideloader { ext.write_info()?; } - #[cfg(feature = "tokio-mt")] - tokio::fs::write( + isideload_vfs::fs::write( app.bundle.bundle_dir.join("embedded.mobileprovision"), provisioning_profile.encoded_profile.as_ref(), - ) - .await?; - - #[cfg(not(feature = "tokio-mt"))] - { - unimplemented!("not yet supported") - } + )?; sign::sign( &mut app, @@ -217,7 +210,7 @@ impl Sideloader { .context("Failed to install app on device")?; if self.delete_app_after_install - && let Err(e) = tokio::fs::remove_dir_all(signed_app_path).await + && let Err(e) = isideload_vfs::fs::remove_dir_all(signed_app_path) { tracing::warn!("Failed to remove temporary signed app file: {}", e); } diff --git a/isideload/src/sideload/sign.rs b/isideload/src/sideload/sign.rs index 7f4da4d..c44f636 100644 --- a/isideload/src/sideload/sign.rs +++ b/isideload/src/sideload/sign.rs @@ -1,4 +1,4 @@ -// use apple_codesign::{SigningSettings, UnifiedSigner}; +use apple_codesign::{SigningSettings, UnifiedSigner}; use plist::Dictionary; use plist_macro::plist_to_xml_string; use rootcause::{option_ext::OptionExt, prelude::*}; @@ -20,47 +20,48 @@ pub fn sign( special: &Option, team: &DeveloperTeam, ) -> Result<(), Report> { - // let mut settings = signing_settings(cert_identity)?; - // let entitlements: Dictionary = - // entitlements_from_prov(provisioning_profile.encoded_profile.as_ref(), special, team)?; + let mut settings = signing_settings(cert_identity)?; + let entitlements: Dictionary = + entitlements_from_prov(provisioning_profile.encoded_profile.as_ref(), special, team)?; - // settings - // .set_entitlements_xml( - // apple_codesign::SettingsScope::Main, - // plist_to_xml_string(&entitlements), - // ) - // .context("Failed to set entitlements XML")?; - // let signer = UnifiedSigner::new(settings); + settings + .set_entitlements_xml( + apple_codesign::SettingsScope::Main, + plist_to_xml_string(&entitlements), + ) + .context("Failed to set entitlements XML")?; + let signer = UnifiedSigner::new(settings); - // for bundle in app.bundle.collect_bundles_sorted() { - // info!( - // "Signing {}", - // bundle - // .bundle_dir - // .file_name() - // .unwrap_or(bundle.bundle_dir.as_os_str()) - // .to_string_lossy() - // ); - // signer - // .sign_path_in_place(&bundle.bundle_dir) - // .context(format!( - // "Failed to sign bundle: {}", - // bundle.bundle_dir.display() - // ))?; - // } + for bundle in app.bundle.collect_bundles_sorted() { + info!( + "Signing {}", + bundle + .bundle_dir + .file_name() + .unwrap_or(bundle.bundle_dir.as_os_str()) + .to_string_lossy() + ); + + signer + .sign_path_in_place(&bundle.bundle_dir) + .context(format!( + "Failed to sign bundle: {}", + bundle.bundle_dir.display() + ))?; + } Ok(()) } -// pub fn signing_settings<'a>(cert: &'a CertificateIdentity) -> Result, Report> { -// let mut settings = SigningSettings::default(); +pub fn signing_settings<'a>(cert: &'a CertificateIdentity) -> Result, Report> { + let mut settings = SigningSettings::default(); -// cert.setup_signing_settings(&mut settings)?; -// settings.set_for_notarization(false); -// settings.set_shallow(true); + cert.setup_signing_settings(&mut settings)?; + settings.set_for_notarization(false); + settings.set_shallow(true); -// Ok(settings) -// } + Ok(settings) +} fn entitlements_from_prov( data: &[u8], diff --git a/isideload/src/util/fs_storage.rs b/isideload/src/util/fs_storage.rs index 4ccb959..4fada20 100644 --- a/isideload/src/util/fs_storage.rs +++ b/isideload/src/util/fs_storage.rs @@ -24,15 +24,15 @@ impl SideloadingStorage for FsStorage { fn store_data(&self, key: &str, data: &[u8]) -> Result<(), Report> { let path = self.path.join(key); let parent = path.parent().unwrap_or(Path::new(".")); - std::fs::create_dir_all(parent).context("Failed to create storage directory")?; - std::fs::write(&path, data).context("Failed to write data to file")?; + isideload_vfs::fs::create_dir_all(parent).context("Failed to create storage directory")?; + isideload_vfs::fs::write(&path, data).context("Failed to write data to file")?; Ok(()) } fn retrieve_data(&self, key: &str) -> Result>, Report> { let path = self.path.join(key); - match std::fs::read(&path) { + match isideload_vfs::fs::read(&path) { Ok(data) => Ok(Some(data)), Err(e) if e.kind() == std::io::ErrorKind::NotFound => Ok(None), Err(e) => Err(report!(e).context("Failed to read data from file").into()), From 6f6a34de17f8a1280b01b4e4455764bc32c386b1 Mon Sep 17 00:00:00 2001 From: nab138 Date: Mon, 25 May 2026 12:54:07 -0400 Subject: [PATCH 04/15] Add about to sign callback --- Cargo.lock | 2 +- isideload/Cargo.toml | 2 +- isideload/src/sideload/sideloader.rs | 13 ++++++++++++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 054a640..5f923ca 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1948,7 +1948,7 @@ checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" [[package]] name = "isideload" -version = "0.3.0" +version = "0.3.1" dependencies = [ "aes 0.9.0", "aes-gcm 0.11.0-rc.3", diff --git a/isideload/Cargo.toml b/isideload/Cargo.toml index 6f7fc89..ed28434 100644 --- a/isideload/Cargo.toml +++ b/isideload/Cargo.toml @@ -3,7 +3,7 @@ name = "isideload" description = "Sideload iOS/iPadOS applications" license = "MIT" authors = ["Nicholas Sharp "] -version = "0.3.0" +version = "0.3.1" edition = "2024" repository = "https://github.com/nab138/isideload" documentation = "https://docs.rs/isideload" diff --git a/isideload/src/sideload/sideloader.rs b/isideload/src/sideload/sideloader.rs index 56bfcf1..b4aeb89 100644 --- a/isideload/src/sideload/sideloader.rs +++ b/isideload/src/sideload/sideloader.rs @@ -68,6 +68,7 @@ impl Sideloader { team: Option, // this will be replaced with proper entitlement handling later increased_memory_limit: bool, + about_to_sign_callback: Option, ) -> Result<(PathBuf, Option), Report> { let team = match team { Some(t) => t, @@ -167,6 +168,10 @@ impl Sideloader { provisioning_profile.encoded_profile.as_ref(), )?; + if let Some(callback) = about_to_sign_callback { + callback(); + } + sign::sign( &mut app, &cert_identity, @@ -189,6 +194,7 @@ impl Sideloader { app_path: PathBuf, // this is gross but will be replaced with proper entitlement handling later increased_memory_limit: bool, + about_to_sign_callback: Option, ) -> Result, Report> { let device_info = IdeviceInfo::from_device(device_provider).await?; @@ -198,7 +204,12 @@ impl Sideloader { .await?; let (signed_app_path, special_app) = self - .sign_app(app_path, Some(team), increased_memory_limit) + .sign_app( + app_path, + Some(team), + increased_memory_limit, + about_to_sign_callback, + ) .await?; info!("Transferring App..."); From 22c06e3928fc6d186a08a977abcc9da6e5350e28 Mon Sep 17 00:00:00 2001 From: nab138 Date: Mon, 25 May 2026 13:02:00 -0400 Subject: [PATCH 05/15] Add progress callback --- Cargo.lock | 2 +- isideload/Cargo.toml | 2 +- isideload/src/sideload/sideloader.rs | 23 ++++++++++++++++++----- isideload/src/sideload/sign.rs | 8 +++++++- 4 files changed, 27 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5f923ca..620174c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1948,7 +1948,7 @@ checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" [[package]] name = "isideload" -version = "0.3.1" +version = "0.3.2" dependencies = [ "aes 0.9.0", "aes-gcm 0.11.0-rc.3", diff --git a/isideload/Cargo.toml b/isideload/Cargo.toml index ed28434..a2fbb9d 100644 --- a/isideload/Cargo.toml +++ b/isideload/Cargo.toml @@ -3,7 +3,7 @@ name = "isideload" description = "Sideload iOS/iPadOS applications" license = "MIT" authors = ["Nicholas Sharp "] -version = "0.3.1" +version = "0.3.2" edition = "2024" repository = "https://github.com/nab138/isideload" documentation = "https://docs.rs/isideload" diff --git a/isideload/src/sideload/sideloader.rs b/isideload/src/sideload/sideloader.rs index b4aeb89..9bf106b 100644 --- a/isideload/src/sideload/sideloader.rs +++ b/isideload/src/sideload/sideloader.rs @@ -68,7 +68,7 @@ impl Sideloader { team: Option, // this will be replaced with proper entitlement handling later increased_memory_limit: bool, - about_to_sign_callback: Option, + progress_callback: Option, ) -> Result<(PathBuf, Option), Report> { let team = match team { Some(t) => t, @@ -85,6 +85,10 @@ impl Sideloader { .await .context("Failed to retrieve certificate identity")?; + if let Some(callback) = &progress_callback { + callback(0.15); + } + let mut app = Application::new(app_path)?; let special = app.get_special_app(); @@ -142,6 +146,10 @@ impl Sideloader { } } + if let Some(callback) = &progress_callback { + callback(0.3); + } + info!("App IDs configured"); app.apply_special_app_behavior(&special, &group_identifier, &cert_identity) @@ -153,6 +161,10 @@ impl Sideloader { .download_team_provisioning_profile(&team, &main_app_id, None) .await?; + if let Some(callback) = &progress_callback { + callback(0.4); + } + info!("Acquired provisioning profile"); app.bundle.write_info()?; @@ -168,8 +180,8 @@ impl Sideloader { provisioning_profile.encoded_profile.as_ref(), )?; - if let Some(callback) = about_to_sign_callback { - callback(); + if let Some(callback) = &progress_callback { + callback(0.5); } sign::sign( @@ -178,6 +190,7 @@ impl Sideloader { &provisioning_profile, &special, &team, + progress_callback, ) .context("Failed to sign app")?; @@ -194,7 +207,7 @@ impl Sideloader { app_path: PathBuf, // this is gross but will be replaced with proper entitlement handling later increased_memory_limit: bool, - about_to_sign_callback: Option, + progress_callback: Option, ) -> Result, Report> { let device_info = IdeviceInfo::from_device(device_provider).await?; @@ -208,7 +221,7 @@ impl Sideloader { app_path, Some(team), increased_memory_limit, - about_to_sign_callback, + progress_callback, ) .await?; diff --git a/isideload/src/sideload/sign.rs b/isideload/src/sideload/sign.rs index c44f636..99979e7 100644 --- a/isideload/src/sideload/sign.rs +++ b/isideload/src/sideload/sign.rs @@ -19,6 +19,7 @@ pub fn sign( provisioning_profile: &Profile, special: &Option, team: &DeveloperTeam, + progress_callback: Option, ) -> Result<(), Report> { let mut settings = signing_settings(cert_identity)?; let entitlements: Dictionary = @@ -32,7 +33,12 @@ pub fn sign( .context("Failed to set entitlements XML")?; let signer = UnifiedSigner::new(settings); - for bundle in app.bundle.collect_bundles_sorted() { + let sorted_bundles = app.bundle.collect_bundles_sorted(); + + for (index, bundle) in sorted_bundles.iter().enumerate() { + if let Some(callback) = &progress_callback { + callback(0.5 + 0.5 * (index as f32 / sorted_bundles.len() as f32)); + } info!( "Signing {}", bundle From 6a900ef22380e382d7e5c5d87c3b24de1851fbed Mon Sep 17 00:00:00 2001 From: nab138 Date: Mon, 25 May 2026 13:46:18 -0400 Subject: [PATCH 06/15] async progress callback --- isideload/src/sideload/sideloader.rs | 20 ++++++++++++++------ isideload/src/sideload/sign.rs | 11 ++++++++--- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/isideload/src/sideload/sideloader.rs b/isideload/src/sideload/sideloader.rs index 9bf106b..ef94466 100644 --- a/isideload/src/sideload/sideloader.rs +++ b/isideload/src/sideload/sideloader.rs @@ -62,14 +62,18 @@ impl Sideloader { } /// Sign the app at the provided path and return the path to the signed app bundle (in a temp dir). To sign and install, see [`Self::install_app`]. - pub async fn sign_app( + pub async fn sign_app( &mut self, app_path: PathBuf, team: Option, // this will be replaced with proper entitlement handling later increased_memory_limit: bool, - progress_callback: Option, - ) -> Result<(PathBuf, Option), Report> { + progress_callback: Option, + ) -> Result<(PathBuf, Option), Report> + where + F: Fn(f32) -> Fut, + Fut: Future, + { let team = match team { Some(t) => t, None => self.get_team().await?, @@ -201,14 +205,18 @@ impl Sideloader { #[cfg(feature = "install")] /// Sign and install an app to a device. - pub async fn install_app( + pub async fn install_app( &mut self, device_provider: &impl IdeviceProvider, app_path: PathBuf, // this is gross but will be replaced with proper entitlement handling later increased_memory_limit: bool, - progress_callback: Option, - ) -> Result, Report> { + progress_callback: Option, + ) -> Result, Report> + where + F: Fn(f32) -> Fut, + Fut: Future, + { let device_info = IdeviceInfo::from_device(device_provider).await?; let team = self.get_team().await?; diff --git a/isideload/src/sideload/sign.rs b/isideload/src/sideload/sign.rs index 99979e7..e4597ba 100644 --- a/isideload/src/sideload/sign.rs +++ b/isideload/src/sideload/sign.rs @@ -13,14 +13,19 @@ use crate::{ util::plist::PlistDataExtract, }; -pub fn sign( +pub fn sign( app: &mut Application, cert_identity: &CertificateIdentity, provisioning_profile: &Profile, special: &Option, team: &DeveloperTeam, - progress_callback: Option, -) -> Result<(), Report> { + // make progress callback async + progress_callback: Option, +) -> Result<(), Report> +where + F: Fn(f32) -> Fut, + Fut: Future, +{ let mut settings = signing_settings(cert_identity)?; let entitlements: Dictionary = entitlements_from_prov(provisioning_profile.encoded_profile.as_ref(), special, team)?; From 8f961509411a96587ed022c89de581b6324c0e72 Mon Sep 17 00:00:00 2001 From: nab138 Date: Mon, 25 May 2026 13:46:33 -0400 Subject: [PATCH 07/15] Bump version --- Cargo.lock | 2 +- isideload/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 620174c..6eb0a61 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1948,7 +1948,7 @@ checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" [[package]] name = "isideload" -version = "0.3.2" +version = "0.3.3" dependencies = [ "aes 0.9.0", "aes-gcm 0.11.0-rc.3", diff --git a/isideload/Cargo.toml b/isideload/Cargo.toml index a2fbb9d..90b4e61 100644 --- a/isideload/Cargo.toml +++ b/isideload/Cargo.toml @@ -3,7 +3,7 @@ name = "isideload" description = "Sideload iOS/iPadOS applications" license = "MIT" authors = ["Nicholas Sharp "] -version = "0.3.2" +version = "0.3.3" edition = "2024" repository = "https://github.com/nab138/isideload" documentation = "https://docs.rs/isideload" From fd54fc41ffbed714fee2b8edcacdc13c139854ba Mon Sep 17 00:00:00 2001 From: nab138 Date: Mon, 25 May 2026 13:48:57 -0400 Subject: [PATCH 08/15] oops wrong signature --- Cargo.lock | 2 +- isideload/Cargo.toml | 2 +- isideload/src/sideload/sideloader.rs | 4 ++-- isideload/src/sideload/sign.rs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6eb0a61..0d85012 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1948,7 +1948,7 @@ checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" [[package]] name = "isideload" -version = "0.3.3" +version = "0.3.4" dependencies = [ "aes 0.9.0", "aes-gcm 0.11.0-rc.3", diff --git a/isideload/Cargo.toml b/isideload/Cargo.toml index 90b4e61..8b4dc5d 100644 --- a/isideload/Cargo.toml +++ b/isideload/Cargo.toml @@ -3,7 +3,7 @@ name = "isideload" description = "Sideload iOS/iPadOS applications" license = "MIT" authors = ["Nicholas Sharp "] -version = "0.3.3" +version = "0.3.4" edition = "2024" repository = "https://github.com/nab138/isideload" documentation = "https://docs.rs/isideload" diff --git a/isideload/src/sideload/sideloader.rs b/isideload/src/sideload/sideloader.rs index ef94466..4e0a13e 100644 --- a/isideload/src/sideload/sideloader.rs +++ b/isideload/src/sideload/sideloader.rs @@ -72,7 +72,7 @@ impl Sideloader { ) -> Result<(PathBuf, Option), Report> where F: Fn(f32) -> Fut, - Fut: Future, + Fut: Future, { let team = match team { Some(t) => t, @@ -215,7 +215,7 @@ impl Sideloader { ) -> Result, Report> where F: Fn(f32) -> Fut, - Fut: Future, + Fut: Future, { let device_info = IdeviceInfo::from_device(device_provider).await?; diff --git a/isideload/src/sideload/sign.rs b/isideload/src/sideload/sign.rs index e4597ba..bd89b16 100644 --- a/isideload/src/sideload/sign.rs +++ b/isideload/src/sideload/sign.rs @@ -24,7 +24,7 @@ pub fn sign( ) -> Result<(), Report> where F: Fn(f32) -> Fut, - Fut: Future, + Fut: Future, { let mut settings = signing_settings(cert_identity)?; let entitlements: Dictionary = From 07a506cff8512bf53b5e6f61e5a7c04a5ad0c8c5 Mon Sep 17 00:00:00 2001 From: nab138 Date: Mon, 25 May 2026 13:52:52 -0400 Subject: [PATCH 09/15] actually await the progress callback --- Cargo.lock | 2 +- isideload/Cargo.toml | 2 +- isideload/src/sideload/sign.rs | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0d85012..3f6b5b8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1948,7 +1948,7 @@ checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" [[package]] name = "isideload" -version = "0.3.4" +version = "0.3.5" dependencies = [ "aes 0.9.0", "aes-gcm 0.11.0-rc.3", diff --git a/isideload/Cargo.toml b/isideload/Cargo.toml index 8b4dc5d..6e54c8b 100644 --- a/isideload/Cargo.toml +++ b/isideload/Cargo.toml @@ -3,7 +3,7 @@ name = "isideload" description = "Sideload iOS/iPadOS applications" license = "MIT" authors = ["Nicholas Sharp "] -version = "0.3.4" +version = "0.3.5" edition = "2024" repository = "https://github.com/nab138/isideload" documentation = "https://docs.rs/isideload" diff --git a/isideload/src/sideload/sign.rs b/isideload/src/sideload/sign.rs index bd89b16..8bbe2af 100644 --- a/isideload/src/sideload/sign.rs +++ b/isideload/src/sideload/sign.rs @@ -13,13 +13,12 @@ use crate::{ util::plist::PlistDataExtract, }; -pub fn sign( +pub async fn sign( app: &mut Application, cert_identity: &CertificateIdentity, provisioning_profile: &Profile, special: &Option, team: &DeveloperTeam, - // make progress callback async progress_callback: Option, ) -> Result<(), Report> where @@ -42,7 +41,7 @@ where for (index, bundle) in sorted_bundles.iter().enumerate() { if let Some(callback) = &progress_callback { - callback(0.5 + 0.5 * (index as f32 / sorted_bundles.len() as f32)); + callback(0.5 + 0.5 * (index as f32 / sorted_bundles.len() as f32)).await; } info!( "Signing {}", From f399393d081b7149fcf026bcb0cb9202084f99db Mon Sep 17 00:00:00 2001 From: nab138 Date: Mon, 25 May 2026 13:53:55 -0400 Subject: [PATCH 10/15] await signing too --- isideload/src/sideload/sideloader.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/isideload/src/sideload/sideloader.rs b/isideload/src/sideload/sideloader.rs index 4e0a13e..ab06a1d 100644 --- a/isideload/src/sideload/sideloader.rs +++ b/isideload/src/sideload/sideloader.rs @@ -196,6 +196,7 @@ impl Sideloader { &team, progress_callback, ) + .await .context("Failed to sign app")?; info!("App signed!"); From 626b637d0845ed145fed72524e5d7440ef9545b8 Mon Sep 17 00:00:00 2001 From: nab138 Date: Mon, 25 May 2026 14:02:01 -0400 Subject: [PATCH 11/15] tweak progress values --- Cargo.lock | 2 +- isideload/Cargo.toml | 2 +- isideload/src/sideload/sideloader.rs | 8 ++++---- isideload/src/sideload/sign.rs | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3f6b5b8..1731f03 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1948,7 +1948,7 @@ checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" [[package]] name = "isideload" -version = "0.3.5" +version = "0.3.6" dependencies = [ "aes 0.9.0", "aes-gcm 0.11.0-rc.3", diff --git a/isideload/Cargo.toml b/isideload/Cargo.toml index 6e54c8b..26a5a12 100644 --- a/isideload/Cargo.toml +++ b/isideload/Cargo.toml @@ -3,7 +3,7 @@ name = "isideload" description = "Sideload iOS/iPadOS applications" license = "MIT" authors = ["Nicholas Sharp "] -version = "0.3.5" +version = "0.3.6" edition = "2024" repository = "https://github.com/nab138/isideload" documentation = "https://docs.rs/isideload" diff --git a/isideload/src/sideload/sideloader.rs b/isideload/src/sideload/sideloader.rs index ab06a1d..28accfe 100644 --- a/isideload/src/sideload/sideloader.rs +++ b/isideload/src/sideload/sideloader.rs @@ -90,7 +90,7 @@ impl Sideloader { .context("Failed to retrieve certificate identity")?; if let Some(callback) = &progress_callback { - callback(0.15); + callback(0.1).await; } let mut app = Application::new(app_path)?; @@ -151,7 +151,7 @@ impl Sideloader { } if let Some(callback) = &progress_callback { - callback(0.3); + callback(0.15).await; } info!("App IDs configured"); @@ -166,7 +166,7 @@ impl Sideloader { .await?; if let Some(callback) = &progress_callback { - callback(0.4); + callback(0.2).await; } info!("Acquired provisioning profile"); @@ -185,7 +185,7 @@ impl Sideloader { )?; if let Some(callback) = &progress_callback { - callback(0.5); + callback(0.3).await; } sign::sign( diff --git a/isideload/src/sideload/sign.rs b/isideload/src/sideload/sign.rs index 8bbe2af..c3062b7 100644 --- a/isideload/src/sideload/sign.rs +++ b/isideload/src/sideload/sign.rs @@ -41,7 +41,7 @@ where for (index, bundle) in sorted_bundles.iter().enumerate() { if let Some(callback) = &progress_callback { - callback(0.5 + 0.5 * (index as f32 / sorted_bundles.len() as f32)).await; + callback(0.3 + 0.7 * (index as f32 / sorted_bundles.len() as f32)).await; } info!( "Signing {}", From c43b422fced67128d22d22d2e133a9fb350024a0 Mon Sep 17 00:00:00 2001 From: nab138 Date: Wed, 27 May 2026 11:10:02 -0400 Subject: [PATCH 12/15] Update apple-codesign --- Cargo.lock | 14 +++++++------- isideload/Cargo.toml | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1731f03..92b4602 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1948,7 +1948,7 @@ checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" [[package]] name = "isideload" -version = "0.3.6" +version = "0.3.7" dependencies = [ "aes 0.9.0", "aes-gcm 0.11.0-rc.3", @@ -2010,9 +2010,9 @@ dependencies = [ [[package]] name = "isideload-apple-codesign" -version = "0.29.8" +version = "0.29.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b629cbd926bdf7a98ab30410064d0c2e3578425a8f37dcefd1d35b0147bd170d" +checksum = "347ff9b4190540f00f7e7cabe65c6dcc8ba97ad01d301643c75f775235c54c9f" dependencies = [ "anyhow", "base64 0.22.1", @@ -2187,9 +2187,9 @@ dependencies = [ [[package]] name = "isideload-simple-file-manifest" -version = "0.11.1" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8dcdb6ba256f4af6fe7fe9347ae9cb55c5c1643dfbeaf1925c52f811d7a81da" +checksum = "57a3e0a8090d8f14e38c7d08b68ca4b9200d87c72b6909131800c6db36a683c5" dependencies = [ "isideload-vfs", ] @@ -2202,9 +2202,9 @@ checksum = "a1133e156a6beed9d5e14a2b9618d52f8c2c6786326f4efbd73c7aecfcabab4c" [[package]] name = "isideload-walkdir" -version = "2.5.0" +version = "2.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81e3e04a5dc89180d12b6357f253f7bc96eebcb6ac2d9a04c637981e97b3b061" +checksum = "7ad4075baa7089e82acee9dac0356db0a1c08a03d69b38c70c5a1ce790f9b6e8" dependencies = [ "isideload-vfs", "same-file", diff --git a/isideload/Cargo.toml b/isideload/Cargo.toml index 26a5a12..9c3d8cd 100644 --- a/isideload/Cargo.toml +++ b/isideload/Cargo.toml @@ -3,7 +3,7 @@ name = "isideload" description = "Sideload iOS/iPadOS applications" license = "MIT" authors = ["Nicholas Sharp "] -version = "0.3.6" +version = "0.3.7" edition = "2024" repository = "https://github.com/nab138/isideload" documentation = "https://docs.rs/isideload" @@ -53,7 +53,7 @@ x509-certificate = { version = "0.26.0", package = "isideload-x509-certificate" rcgen = { version = "0.14.7", default-features = false, features = ["ring", "pem"] } p12-keystore = { version = "0.3.0-rc4", package = "isideload-p12-keystore" } zip = { version = "8.3", default-features = false, features = ["deflate"] } -apple-codesign = { version = "0.29.8", package = "isideload-apple-codesign" } #, path = "../../isideload-apple-platform-rs/apple-codesign"} +apple-codesign = { version = "0.29.9", package = "isideload-apple-codesign" } #, path = "../../isideload-apple-platform-rs/apple-codesign"} isideload-vfs = { version = "0.0.1" } #, path = "../../isideload-apple-platform-rs/isideload-vfs" } sha1 = "0.11.0" rustls = { version = "0.23", default-features = false, features = ["ring", "tls12", "std"] } From 8c3ee54550fc51da482282fc0f84cf95dfe0d345 Mon Sep 17 00:00:00 2001 From: nab138 Date: Wed, 27 May 2026 22:15:27 -0400 Subject: [PATCH 13/15] Update apple-codesign --- Cargo.lock | 30 +++++++++++++++--------------- isideload/Cargo.toml | 6 +++--- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 92b4602..94190e4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1948,7 +1948,7 @@ checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" [[package]] name = "isideload" -version = "0.3.7" +version = "0.3.8" dependencies = [ "aes 0.9.0", "aes-gcm 0.11.0-rc.3", @@ -1997,9 +1997,9 @@ dependencies = [ [[package]] name = "isideload-apple-bundles" -version = "0.21.1" +version = "0.21.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ab51a22a4fa276ed5bc6c8b601c461a2c6316544018c8ae3b0cb38a1bb88f6d" +checksum = "285e2bb63164fdcbc79472037acf78adb7e6d7675733f1b3851ff9cfeb82fa47" dependencies = [ "anyhow", "isideload-simple-file-manifest", @@ -2010,9 +2010,9 @@ dependencies = [ [[package]] name = "isideload-apple-codesign" -version = "0.29.9" +version = "0.29.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "347ff9b4190540f00f7e7cabe65c6dcc8ba97ad01d301643c75f775235c54c9f" +checksum = "b10cddfa6beb3de51cf1baa2357ff26bb24e78b477e154e166f0f45dd97ddfb6" dependencies = [ "anyhow", "base64 0.22.1", @@ -2087,9 +2087,9 @@ dependencies = [ [[package]] name = "isideload-apple-flat-package" -version = "0.20.4" +version = "0.20.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26dfce2d65a6ff764ed00071c929330587740ac49d8c6de52426734c20d54a5" +checksum = "435ff123ac777fe7695d69fecd3739755d8dca97c0bd55ea0889b9870f7bac1c" dependencies = [ "flate2", "isideload-apple-xar", @@ -2102,9 +2102,9 @@ dependencies = [ [[package]] name = "isideload-apple-xar" -version = "0.20.4" +version = "0.20.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc80d53b5d1d4e148b76f652eadf39400c6ace129e20abbde6bb95a40c07e8f" +checksum = "d7500d73280fe3c7e55b7050f21d0bc252179e70599e1ec3c773837cd76b2e89" dependencies = [ "base64 0.22.1", "bcder", @@ -2133,9 +2133,9 @@ dependencies = [ [[package]] name = "isideload-cpio-archive" -version = "0.10.1" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82b8714e81b190be903e733fb1b611c73f4aa4041b26396f7609ae4c81bcae9f" +checksum = "09393e5b7801a99cb7843fe6d092a473a5bc21c4e37cea60d11567d9a90bb09b" dependencies = [ "chrono", "is_executable", @@ -2146,9 +2146,9 @@ dependencies = [ [[package]] name = "isideload-cryptographic-message-syntax" -version = "0.31.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcde9eb8ab560e20896e48f1f6a9e62c910db422a274ff665f1b580f873a1552" +checksum = "934440f53a9cf7347b250b47255d93cd59fb00d0f5c18d290416d9d42ea40c6f" dependencies = [ "bcder", "bytes", @@ -2213,9 +2213,9 @@ dependencies = [ [[package]] name = "isideload-x509-certificate" -version = "0.26.0" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f85f3d655536bce5bf609cd70283f851e221371eb5724aaa03783a9e804a2f" +checksum = "c4b4f85267f67c7b282782b65a9602b55d0f1680f6c2170ffb1e8dc9994202fa" dependencies = [ "bcder", "bytes", diff --git a/isideload/Cargo.toml b/isideload/Cargo.toml index 9c3d8cd..cf4322f 100644 --- a/isideload/Cargo.toml +++ b/isideload/Cargo.toml @@ -3,7 +3,7 @@ name = "isideload" description = "Sideload iOS/iPadOS applications" license = "MIT" authors = ["Nicholas Sharp "] -version = "0.3.7" +version = "0.3.8" edition = "2024" repository = "https://github.com/nab138/isideload" documentation = "https://docs.rs/isideload" @@ -49,11 +49,11 @@ aes-gcm = "0.11.0-rc.3" rsa = { version = "0.10.0-rc.17" } tokio = { version = "1.49" } keyring = { version = "3.6.3", features = ["apple-native", "linux-native-sync-persistent", "windows-native"], optional = true } -x509-certificate = { version = "0.26.0", package = "isideload-x509-certificate" } +x509-certificate = { version = "0.26.1", package = "isideload-x509-certificate" } #, path = "../../cryptography-rs/x509-certificate" } rcgen = { version = "0.14.7", default-features = false, features = ["ring", "pem"] } p12-keystore = { version = "0.3.0-rc4", package = "isideload-p12-keystore" } zip = { version = "8.3", default-features = false, features = ["deflate"] } -apple-codesign = { version = "0.29.9", package = "isideload-apple-codesign" } #, path = "../../isideload-apple-platform-rs/apple-codesign"} +apple-codesign = { version = "0.29.10", package = "isideload-apple-codesign" }#, path = "../../isideload-apple-platform-rs/apple-codesign"} isideload-vfs = { version = "0.0.1" } #, path = "../../isideload-apple-platform-rs/isideload-vfs" } sha1 = "0.11.0" rustls = { version = "0.23", default-features = false, features = ["ring", "tls12", "std"] } From c6d8a1eea7468521a7368523074d02dfaf86c199 Mon Sep 17 00:00:00 2001 From: nab138 Date: Wed, 27 May 2026 22:51:22 -0400 Subject: [PATCH 14/15] Smoother progress updates for installation --- Cargo.lock | 2 +- isideload/Cargo.toml | 2 +- isideload/src/sideload/install.rs | 60 +++++++++++++++++++++++++++---- 3 files changed, 55 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 94190e4..4a49e7c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1948,7 +1948,7 @@ checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" [[package]] name = "isideload" -version = "0.3.8" +version = "0.3.9" dependencies = [ "aes 0.9.0", "aes-gcm 0.11.0-rc.3", diff --git a/isideload/Cargo.toml b/isideload/Cargo.toml index cf4322f..257fa9e 100644 --- a/isideload/Cargo.toml +++ b/isideload/Cargo.toml @@ -3,7 +3,7 @@ name = "isideload" description = "Sideload iOS/iPadOS applications" license = "MIT" authors = ["Nicholas Sharp "] -version = "0.3.8" +version = "0.3.9" edition = "2024" repository = "https://github.com/nab138/isideload" documentation = "https://docs.rs/isideload" diff --git a/isideload/src/sideload/install.rs b/isideload/src/sideload/install.rs index 3b303e2..d505a11 100644 --- a/isideload/src/sideload/install.rs +++ b/isideload/src/sideload/install.rs @@ -18,7 +18,7 @@ use std::{future::Future, path::Path}; pub async fn install_app( provider: &impl IdeviceProvider, app_path: &Path, - progress_callback: impl Fn(u64), + progress_callback: impl Fn(u64) + Send + Sync, ) -> Result<(), Report> { let mut afc_client = AfcClient::connect(provider) .await @@ -28,7 +28,20 @@ pub async fn install_app( "PublicStaging/{}", app_path.file_name().ok_or_report()?.to_string_lossy() ); - afc_upload_dir(&mut afc_client, app_path, &dir).await?; + let total_size = get_dir_size(app_path).unwrap_or(1) as f64; + let mut uploaded = 0; + let cb = |progress: f64| { + progress_callback((progress * 70.0) as u64); + }; + afc_upload_dir( + &mut afc_client, + app_path, + &dir, + &cb, + &mut uploaded, + total_size, + ) + .await?; let mut instproxy_client = InstallationProxyClient::connect(provider) .await @@ -43,7 +56,7 @@ pub async fn install_app( dir, Some(plist::Value::Dictionary(options)), async |(percentage, _)| { - progress_callback(percentage); + progress_callback((70.0 + 0.3 * percentage as f64) as u64); }, (), ) @@ -59,7 +72,7 @@ pub async fn install_app_rsd( provider: &mut impl RsdProvider, handshake: &mut RsdHandshake, app_path: &Path, - progress_callback: impl Fn(u64), + progress_callback: impl Fn(u64) + Send + Sync, ) -> Result<(), Report> { let mut afc_client = AfcClient::connect_rsd(provider, handshake) .await @@ -69,7 +82,20 @@ pub async fn install_app_rsd( "PublicStaging/{}", app_path.file_name().ok_or_report()?.to_string_lossy() ); - afc_upload_dir(&mut afc_client, app_path, &dir).await?; + let total_size = get_dir_size(app_path).unwrap_or(1) as f64; + let mut uploaded = 0; + let cb = |pct: f64| { + progress_callback((pct * 70.0) as u64); + }; + afc_upload_dir( + &mut afc_client, + app_path, + &dir, + &cb, + &mut uploaded, + total_size, + ) + .await?; let mut instproxy_client = InstallationProxyClient::connect_rsd(provider, handshake) .await @@ -84,7 +110,7 @@ pub async fn install_app_rsd( dir, Some(plist::Value::Dictionary(options)), async |(percentage, _)| { - progress_callback(percentage); + progress_callback((70.0 + 0.3 * percentage as f64) as u64); }, (), ) @@ -94,10 +120,28 @@ pub async fn install_app_rsd( Ok(()) } +fn get_dir_size(path: &Path) -> Result { + let mut size = 0; + for entry in isideload_vfs::fs::read_dir(path)? { + let entry = entry?; + let path = entry.path(); + let meta = isideload_vfs::fs::metadata(&path)?; + if meta.is_dir() { + size += get_dir_size(&path)?; + } else { + size += meta.len(); + } + } + Ok(size) +} + fn afc_upload_dir<'a>( afc_client: &'a mut AfcClient, path: &'a Path, afc_path: &'a str, + cb: &'a (dyn Fn(f64) + Send + Sync), + uploaded: &'a mut u64, + total: f64, ) -> Pin> + Send + 'a>> { Box::pin(async move { let entries = isideload_vfs::fs::read_dir(path)?; @@ -115,7 +159,7 @@ fn afc_upload_dir<'a>( afc_path, path.file_name().ok_or_report()?.to_string_lossy() ); - afc_upload_dir(afc_client, &path, &new_afc_path).await?; + afc_upload_dir(afc_client, &path, &new_afc_path, cb, uploaded, total).await?; } else { let mut file_handle = afc_client .open( @@ -135,6 +179,8 @@ fn afc_upload_dir<'a>( .write_entire(chunk) .await .map_err(Error::IdeviceError)?; + *uploaded += chunk.len() as u64; + cb(*uploaded as f64 / total); } file_handle.close().await.map_err(Error::IdeviceError)?; } From 3a2e6f304c61036ca3772271aea6e2a387760072 Mon Sep 17 00:00:00 2001 From: nab138 Date: Fri, 29 May 2026 08:53:36 -0400 Subject: [PATCH 15/15] Allow specifying custom proxy url --- Cargo.lock | 6 +-- isideload/Cargo.toml | 8 ++-- isideload/src/anisette/remote_v3/mod.rs | 35 ++++++++------ isideload/src/anisette/remote_v3/websocket.rs | 24 ++++++---- isideload/src/auth/apple_account.rs | 3 +- isideload/src/auth/builder.rs | 9 +++- isideload/src/auth/grandslam.rs | 47 ++++++++++--------- .../{wasm_middleware.rs => middleware.rs} | 15 ++++-- isideload/src/auth/mod.rs | 3 +- 9 files changed, 89 insertions(+), 61 deletions(-) rename isideload/src/auth/{wasm_middleware.rs => middleware.rs} (82%) diff --git a/Cargo.lock b/Cargo.lock index 4a49e7c..89c118c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1948,7 +1948,7 @@ checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" [[package]] name = "isideload" -version = "0.3.9" +version = "0.3.10" dependencies = [ "aes 0.9.0", "aes-gcm 0.11.0-rc.3", @@ -2010,9 +2010,9 @@ dependencies = [ [[package]] name = "isideload-apple-codesign" -version = "0.29.10" +version = "0.29.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b10cddfa6beb3de51cf1baa2357ff26bb24e78b477e154e166f0f45dd97ddfb6" +checksum = "aad04d98b94687253eebe7f7dd25e05e229eee8ccf2b0dcf256149db172e27ef" dependencies = [ "anyhow", "base64 0.22.1", diff --git a/isideload/Cargo.toml b/isideload/Cargo.toml index 257fa9e..e69c8e2 100644 --- a/isideload/Cargo.toml +++ b/isideload/Cargo.toml @@ -3,7 +3,7 @@ name = "isideload" description = "Sideload iOS/iPadOS applications" license = "MIT" authors = ["Nicholas Sharp "] -version = "0.3.9" +version = "0.3.10" edition = "2024" repository = "https://github.com/nab138/isideload" documentation = "https://docs.rs/isideload" @@ -16,7 +16,7 @@ default = ["install", "keyring-storage", "tokio-mt"] tokio-mt = ["tokio/rt-multi-thread", "dep:tokio-tungstenite"] install = ["dep:idevice"] keyring-storage = ["dep:keyring"] -wasm = ["idevice/wasm", "dep:getrandom_02", "dep:getrandom_04", "uuid/js", "dep:ws_stream_wasm", "dep:urlencoding"] +wasm = ["idevice/wasm", "dep:getrandom_02", "dep:getrandom_04", "uuid/js", "dep:ws_stream_wasm"] fs-storage = [] # Unfortunately, dependencies are kinda a mess rn, since this requires a beta version of the srp crate. @@ -53,13 +53,13 @@ x509-certificate = { version = "0.26.1", package = "isideload-x509-certificate" rcgen = { version = "0.14.7", default-features = false, features = ["ring", "pem"] } p12-keystore = { version = "0.3.0-rc4", package = "isideload-p12-keystore" } zip = { version = "8.3", default-features = false, features = ["deflate"] } -apple-codesign = { version = "0.29.10", package = "isideload-apple-codesign" }#, path = "../../isideload-apple-platform-rs/apple-codesign"} +apple-codesign = { version = "0.29.11", package = "isideload-apple-codesign" }#, path = "../../isideload-apple-platform-rs/apple-codesign"} isideload-vfs = { version = "0.0.1" } #, path = "../../isideload-apple-platform-rs/isideload-vfs" } sha1 = "0.11.0" rustls = { version = "0.23", default-features = false, features = ["ring", "tls12", "std"] } reqwest-middleware = "0.5.1" http = "1.4.0" -urlencoding = { version = "2.1.3", optional = true } +urlencoding = { version = "2.1.3" } futures = "0.3.32" ws_stream_wasm = { version = "0.7.5", optional = true} web-time = "1" diff --git a/isideload/src/anisette/remote_v3/mod.rs b/isideload/src/anisette/remote_v3/mod.rs index c663db0..31b559d 100644 --- a/isideload/src/anisette/remote_v3/mod.rs +++ b/isideload/src/anisette/remote_v3/mod.rs @@ -10,7 +10,6 @@ use reqwest::{ ClientBuilder, header::{CONTENT_TYPE, HeaderMap, HeaderValue}, }; -#[cfg(feature = "wasm")] use reqwest_middleware::ClientBuilder as MwClientBuilder; use rootcause::option_ext::OptionExt; use rootcause::prelude::*; @@ -33,6 +32,7 @@ pub struct RemoteV3AnisetteProvider { serial_number: String, client_info: Option, client: reqwest_middleware::ClientWithMiddleware, + websocket_proxy: Option, } impl RemoteV3AnisetteProvider { @@ -53,26 +53,32 @@ impl RemoteV3AnisetteProvider { storage, serial_number, client_info: None, - client: Self::build_reqwest_client()?, + client: Self::build_reqwest_client(None)?, + websocket_proxy: None, }) } - fn build_reqwest_client() -> Result { - #[cfg(not(feature = "wasm"))] - { - let client = ClientBuilder::new().build()?; + pub fn set_websocket_proxy(mut self, websocket_proxy: Option) -> Result { + self.websocket_proxy = websocket_proxy; + self.client = Self::build_reqwest_client(self.websocket_proxy.clone())?; + Ok(self) + } - Ok(reqwest_middleware::ClientBuilder::new(client).build()) - } - #[cfg(feature = "wasm")] - { - use crate::auth::wasm_middleware::WasmProxyMiddleware; + fn build_reqwest_client( + websocket_proxy: Option, + ) -> Result { + if let Some(websocket_proxy) = websocket_proxy { + use crate::auth::middleware::WasmProxyMiddleware; let client = ClientBuilder::new().build()?; Ok(MwClientBuilder::new(client) - .with(WasmProxyMiddleware) + .with(WasmProxyMiddleware::new(websocket_proxy)) .build()) + } else { + let client = ClientBuilder::new().build()?; + + Ok(MwClientBuilder::new(client).build()) } } @@ -212,7 +218,7 @@ impl RemoteV3AnisetteProvider { let state = self.state.as_mut().ok_or_report()?; if !state.is_provisioned() { info!("Provisioning required..."); - Self::provision(state, gs, &self.url) + Self::provision(state, gs, &self.url, self.websocket_proxy.as_deref()) .await .context("Failed to provision")?; } @@ -254,6 +260,7 @@ impl RemoteV3AnisetteProvider { state: &mut AnisetteState, gs: Arc, url: &str, + proxy_url: Option<&str>, ) -> Result<(), Report> { let start_provisioning = gs.get_url("midStartProvisioning")?; let end_provisioning = gs.get_url("midFinishProvisioning")?; @@ -274,7 +281,7 @@ impl RemoteV3AnisetteProvider { // .context("Failed to connect to provisioning socket")? // .context("Failed to connect to provisioning socket")?; - let mut ws = AppWebSocket::connect(&websocket_url) + let mut ws = AppWebSocket::connect(&websocket_url, proxy_url.as_deref()) .await .context("Failed to connect to provisioning socket")?; diff --git a/isideload/src/anisette/remote_v3/websocket.rs b/isideload/src/anisette/remote_v3/websocket.rs index e371723..2d1cded 100644 --- a/isideload/src/anisette/remote_v3/websocket.rs +++ b/isideload/src/anisette/remote_v3/websocket.rs @@ -18,14 +18,26 @@ pub struct AppWebSocket { } impl AppWebSocket { - pub async fn connect(url: &str) -> Result { + pub async fn connect(url: &str, proxy_url: Option<&str>) -> Result { + let target_url = if proxy_url.is_some() { + let proxied = format!( + "{}{}", + proxy_url.unwrap(), + urlencoding::encode(url) + ) + .replace("https://", "wss://"); + proxied + } else { + url.to_string() + }; + #[cfg(not(feature = "wasm"))] { use tokio::time::{Duration, timeout}; let (stream, _) = timeout( Duration::from_secs(30), - tokio_tungstenite::connect_async(url), + tokio_tungstenite::connect_async(&target_url), ) .await? .context( @@ -35,13 +47,7 @@ impl AppWebSocket { } #[cfg(feature = "wasm")] { - let proxied = format!( - "https://worker.nabdev.workers.dev/?url={}", - urlencoding::encode(url) - ) - .replace("https://", "wss://"); - - let (meta, stream) = ws_stream_wasm::WsMeta::connect(&proxied, None) + let (meta, stream) = ws_stream_wasm::WsMeta::connect(&target_url, None) .await .map_err(|e| report!("WS connect failed: {e:?}"))?; Ok(Self { diff --git a/isideload/src/auth/apple_account.rs b/isideload/src/auth/apple_account.rs index 983a803..4115b85 100644 --- a/isideload/src/auth/apple_account.rs +++ b/isideload/src/auth/apple_account.rs @@ -62,6 +62,7 @@ impl AppleAccount { email: &str, anisette_generator: AnisetteDataGenerator, debug: bool, + proxy_url: Option, ) -> Result { if debug { warn!("Debug mode enabled: this is a security risk!"); @@ -72,7 +73,7 @@ impl AppleAccount { .await .context("Failed to get anisette client info")?; - let grandslam_client = GrandSlam::new(client_info, debug).await?; + let grandslam_client = GrandSlam::new(client_info, debug, proxy_url.clone()).await?; Ok(AppleAccount { email: email.to_string(), diff --git a/isideload/src/auth/builder.rs b/isideload/src/auth/builder.rs index 86c35cc..17311a1 100644 --- a/isideload/src/auth/builder.rs +++ b/isideload/src/auth/builder.rs @@ -12,6 +12,7 @@ pub struct AppleAccountBuilder { email: String, debug: Option, anisette_generator: Option, + proxy_url: Option, } impl AppleAccountBuilder { @@ -24,6 +25,7 @@ impl AppleAccountBuilder { email: email.to_string(), debug: None, anisette_generator: None, + proxy_url: None, } } @@ -36,6 +38,11 @@ impl AppleAccountBuilder { self } + pub fn proxy_url(mut self, proxy_url: String) -> Self { + self.proxy_url = Some(proxy_url); + self + } + pub fn anisette_provider( mut self, anisette_provider: impl AnisetteProvider + Send + Sync + 'static, @@ -60,7 +67,7 @@ impl AppleAccountBuilder { } }; - AppleAccount::new(&self.email, anisette_generator, debug).await + AppleAccount::new(&self.email, anisette_generator, debug, self.proxy_url).await } /// Build the AppleAccount and log in diff --git a/isideload/src/auth/grandslam.rs b/isideload/src/auth/grandslam.rs index e5dfd6d..e58e4dd 100644 --- a/isideload/src/auth/grandslam.rs +++ b/isideload/src/auth/grandslam.rs @@ -1,5 +1,4 @@ -#[cfg(feature = "wasm")] -use super::wasm_middleware::WasmProxyMiddleware; +use super::middleware::WasmProxyMiddleware; use plist::Dictionary; use plist_macro::plist_to_xml_string; use plist_macro::pretty_print_dictionary; @@ -9,7 +8,6 @@ use reqwest::{ ClientBuilder, header::{HeaderMap, HeaderValue}, }; -#[cfg(feature = "wasm")] use reqwest_middleware::ClientBuilder as MwClientBuilder; use rootcause::prelude::*; use tracing::debug; @@ -31,8 +29,13 @@ impl GrandSlam { /// /// # Arguments /// - `client`: The reqwest client to use for requests - pub async fn new(client_info: AnisetteClientInfo, debug: bool) -> Result { - let client = Self::build_reqwest_client(debug).context("Failed to build HTTP client")?; + pub async fn new( + client_info: AnisetteClientInfo, + debug: bool, + proxy_url: Option, + ) -> Result { + let client = + Self::build_reqwest_client(debug, proxy_url).context("Failed to build HTTP client")?; let base_headers = Self::base_headers(&client_info, false)?; let url_bag = Self::fetch_url_bag(&client, base_headers).await?; Ok(Self { @@ -182,27 +185,27 @@ impl GrandSlam { /// Returns an error if the reqwest client cannot be built pub fn build_reqwest_client( debug: bool, + proxy_url: Option, ) -> Result { #[cfg(not(feature = "wasm"))] - { - let cert = Certificate::from_der(APPLE_ROOT)?; - let client = ClientBuilder::new() - .add_root_certificate(cert) - .http1_title_case_headers() - .danger_accept_invalid_certs(debug) - .connection_verbose(debug) - .build()?; - - Ok(reqwest_middleware::ClientBuilder::new(client).build()) - } + let cert = Certificate::from_der(APPLE_ROOT)?; + #[cfg(not(feature = "wasm"))] + let client = ClientBuilder::new() + .add_root_certificate(cert) + .http1_title_case_headers() + .danger_accept_invalid_certs(debug) + .connection_verbose(debug) + .build()?; #[cfg(feature = "wasm")] - { - let client = ClientBuilder::new().build()?; + let client = ClientBuilder::new().build()?; - Ok(MwClientBuilder::new(client) - .with(WasmProxyMiddleware) - .build()) - } + let builder = MwClientBuilder::new(client); + let builder = if let Some(proxy_url) = proxy_url { + builder.with(WasmProxyMiddleware::new(proxy_url)) + } else { + builder + }; + Ok(builder.build()) } } diff --git a/isideload/src/auth/wasm_middleware.rs b/isideload/src/auth/middleware.rs similarity index 82% rename from isideload/src/auth/wasm_middleware.rs rename to isideload/src/auth/middleware.rs index f28783e..e98d31f 100644 --- a/isideload/src/auth/wasm_middleware.rs +++ b/isideload/src/auth/middleware.rs @@ -1,6 +1,14 @@ use reqwest_middleware::{Middleware, Next}; -pub struct WasmProxyMiddleware; +pub struct WasmProxyMiddleware { + proxy_url: String, +} + +impl WasmProxyMiddleware { + pub fn new(proxy_url: String) -> Self { + Self { proxy_url } + } +} // You might be wondering, why does this cfg_attr check the target_arch AND the feature when all the others just check the feature? // For some reason, I could not get rust analyzer to output errors when the arch was set to wasm32-unknown-unknown @@ -20,10 +28,7 @@ impl Middleware for WasmProxyMiddleware { next: Next<'_>, ) -> reqwest_middleware::Result { let original = req.url().to_string(); - let proxied = format!( - "https://worker.nabdev.workers.dev/?url={}", - urlencoding::encode(&original) - ); + let proxied = format!("{}{}", self.proxy_url, urlencoding::encode(&original)); *req.url_mut() = proxied.parse().unwrap(); next.run(req, extensions).await } diff --git a/isideload/src/auth/mod.rs b/isideload/src/auth/mod.rs index b04b468..8b7f2c6 100644 --- a/isideload/src/auth/mod.rs +++ b/isideload/src/auth/mod.rs @@ -1,5 +1,4 @@ pub mod apple_account; pub mod builder; pub mod grandslam; -#[cfg(feature = "wasm")] -pub mod wasm_middleware; +pub mod middleware;