diff --git a/.gitignore b/.gitignore index 766d876e8..616604555 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,5 @@ .DS_Store .idea -system-images/binfmt/binfmt.tar -system-images/compat/compat.tar -system-images/util/util.tar /*.img /*.img.gz /*.img.xz diff --git a/Makefile b/Makefile index 7ddeb7d82..52ca35980 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,5 @@ +ls-files = $(shell git ls-files --cached --others --exclude-standard $1) + PLATFORM_FILE := $(shell ./check-platform.sh) ENVIRONMENT_FILE := $(shell ./check-environment.sh) GIT_HASH_FILE := $(shell ./check-git-hash.sh) @@ -9,22 +11,19 @@ IMAGE_TYPE=$(shell if [ "$(PLATFORM)" = raspberrypi ]; then echo img; else echo WEB_UIS := web/dist/raw/ui/index.html web/dist/raw/setup-wizard/index.html web/dist/raw/install-wizard/index.html COMPRESSED_WEB_UIS := web/dist/static/ui/index.html web/dist/static/setup-wizard/index.html web/dist/static/install-wizard/index.html FIRMWARE_ROMS := ./firmware/$(PLATFORM) $(shell jq --raw-output '.[] | select(.platform[] | contains("$(PLATFORM)")) | "./firmware/$(PLATFORM)/" + .id + ".rom.gz"' build/lib/firmware.json) -BUILD_SRC := $(shell git ls-files build) build/lib/depends build/lib/conflicts $(FIRMWARE_ROMS) -DEBIAN_SRC := $(shell git ls-files debian/) -IMAGE_RECIPE_SRC := $(shell git ls-files image-recipe/) +BUILD_SRC := $(call ls-files, build) build/lib/depends build/lib/conflicts $(FIRMWARE_ROMS) +DEBIAN_SRC := $(call ls-files, debian/) +IMAGE_RECIPE_SRC := $(call ls-files, image-recipe/) STARTD_SRC := core/startos/startd.service $(BUILD_SRC) -COMPAT_SRC := $(shell git ls-files system-images/compat/) -UTILS_SRC := $(shell git ls-files system-images/utils/) -BINFMT_SRC := $(shell git ls-files system-images/binfmt/) -CORE_SRC := $(shell git ls-files core) $(shell git ls-files --recurse-submodules patch-db) $(GIT_HASH_FILE) -WEB_SHARED_SRC := $(shell git ls-files web/projects/shared) $(shell git ls-files web/projects/marketplace) $(shell ls -p web/ | grep -v / | sed 's/^/web\//g') web/node_modules/.package-lock.json web/config.json patch-db/client/dist/index.js sdk/baseDist/package.json web/patchdb-ui-seed.json sdk/dist/package.json -WEB_UI_SRC := $(shell git ls-files web/projects/ui) -WEB_SETUP_WIZARD_SRC := $(shell git ls-files web/projects/setup-wizard) -WEB_INSTALL_WIZARD_SRC := $(shell git ls-files web/projects/install-wizard) +CORE_SRC := $(call ls-files, core) $(shell git ls-files --recurse-submodules patch-db) $(GIT_HASH_FILE) +WEB_SHARED_SRC := $(call ls-files, web/projects/shared) $(call ls-files, web/projects/marketplace) $(shell ls -p web/ | grep -v / | sed 's/^/web\//g') web/node_modules/.package-lock.json web/config.json patch-db/client/dist/index.js sdk/baseDist/package.json web/patchdb-ui-seed.json sdk/dist/package.json +WEB_UI_SRC := $(call ls-files, web/projects/ui) +WEB_SETUP_WIZARD_SRC := $(call ls-files, web/projects/setup-wizard) +WEB_INSTALL_WIZARD_SRC := $(call ls-files, web/projects/install-wizard) PATCH_DB_CLIENT_SRC := $(shell git ls-files --recurse-submodules patch-db/client) GZIP_BIN := $(shell which pigz || which gzip) TAR_BIN := $(shell which gtar || which tar) -COMPILED_TARGETS := core/target/$(ARCH)-unknown-linux-musl/release/startbox core/target/$(ARCH)-unknown-linux-musl/release/containerbox system-images/compat/docker-images/$(ARCH).tar system-images/utils/docker-images/$(ARCH).tar system-images/binfmt/docker-images/$(ARCH).tar container-runtime/rootfs.$(ARCH).squashfs +COMPILED_TARGETS := core/target/$(ARCH)-unknown-linux-musl/release/startbox core/target/$(ARCH)-unknown-linux-musl/release/containerbox container-runtime/rootfs.$(ARCH).squashfs ALL_TARGETS := $(STARTD_SRC) $(ENVIRONMENT_FILE) $(GIT_HASH_FILE) $(VERSION_FILE) $(COMPILED_TARGETS) cargo-deps/$(ARCH)-unknown-linux-musl/release/startos-backup-fs $(shell if [ "$(PLATFORM)" = "raspberrypi" ]; then echo cargo-deps/aarch64-unknown-linux-musl/release/pi-beep; fi) $(shell /bin/bash -c 'if [[ "${ENVIRONMENT}" =~ (^|-)unstable($$|-) ]]; then echo cargo-deps/$(ARCH)-unknown-linux-musl/release/tokio-console; fi') $(PLATFORM_FILE) REBUILD_TYPES = 1 @@ -59,8 +58,6 @@ touch: metadata: $(VERSION_FILE) $(PLATFORM_FILE) $(ENVIRONMENT_FILE) $(GIT_HASH_FILE) clean: - rm -f system-images/**/*.tar - rm -rf system-images/compat/target rm -rf core/target rm -rf core/startos/bindings rm -rf web/.angular @@ -95,10 +92,10 @@ test: | test-core test-sdk test-container-runtime test-core: $(CORE_SRC) $(ENVIRONMENT_FILE) ./core/run-tests.sh -test-sdk: $(shell git ls-files sdk) sdk/base/lib/osBindings/index.ts +test-sdk: $(call ls-files, sdk) sdk/base/lib/osBindings/index.ts cd sdk && make test -test-container-runtime: container-runtime/node_modules/.package-lock.json $(shell git ls-files container-runtime/src) container-runtime/package.json container-runtime/tsconfig.json +test-container-runtime: container-runtime/node_modules/.package-lock.json $(call ls-files, container-runtime/src) container-runtime/package.json container-runtime/tsconfig.json cd container-runtime && npm test cli: @@ -151,10 +148,6 @@ install: $(ALL_TARGETS) $(call cp,GIT_HASH.txt,$(DESTDIR)/usr/lib/startos/GIT_HASH.txt) $(call cp,VERSION.txt,$(DESTDIR)/usr/lib/startos/VERSION.txt) - $(call mkdir,$(DESTDIR)/usr/lib/startos/system-images) - $(call cp,system-images/compat/docker-images/$(ARCH).tar,$(DESTDIR)/usr/lib/startos/system-images/compat.tar) - $(call cp,system-images/utils/docker-images/$(ARCH).tar,$(DESTDIR)/usr/lib/startos/system-images/utils.tar) - $(call cp,firmware/$(PLATFORM),$(DESTDIR)/usr/lib/startos/firmware) update-overlay: $(ALL_TARGETS) @@ -237,20 +230,20 @@ sdk/base/lib/osBindings/index.ts: $(shell if [ "$(REBUILD_TYPES)" -ne 0 ]; then rsync -ac --delete core/startos/bindings/ sdk/base/lib/osBindings/ touch sdk/base/lib/osBindings/index.ts -core/startos/bindings/index.ts: $(shell git ls-files core) $(ENVIRONMENT_FILE) +core/startos/bindings/index.ts: $(call ls-files, core) $(ENVIRONMENT_FILE) rm -rf core/startos/bindings ./core/build-ts.sh ls core/startos/bindings/*.ts | sed 's/core\/startos\/bindings\/\([^.]*\)\.ts/export { \1 } from ".\/\1";/g' | grep -v '"./index"' | tee core/startos/bindings/index.ts npm --prefix sdk exec -- prettier --config ./sdk/base/package.json -w ./core/startos/bindings/*.ts touch core/startos/bindings/index.ts -sdk/dist/package.json sdk/baseDist/package.json: $(shell git ls-files sdk) sdk/base/lib/osBindings/index.ts +sdk/dist/package.json sdk/baseDist/package.json: $(call ls-files, sdk) sdk/base/lib/osBindings/index.ts (cd sdk && make bundle) touch sdk/dist/package.json touch sdk/baseDist/package.json # TODO: make container-runtime its own makefile? -container-runtime/dist/index.js: container-runtime/node_modules/.package-lock.json $(shell git ls-files container-runtime/src) container-runtime/package.json container-runtime/tsconfig.json +container-runtime/dist/index.js: container-runtime/node_modules/.package-lock.json $(call ls-files, container-runtime/src) container-runtime/package.json container-runtime/tsconfig.json npm --prefix container-runtime run build container-runtime/dist/node_modules/.package-lock.json container-runtime/dist/package.json container-runtime/dist/package-lock.json: container-runtime/package.json container-runtime/package-lock.json sdk/dist/package.json container-runtime/install-dist-deps.sh @@ -266,15 +259,6 @@ build/lib/depends build/lib/conflicts: build/dpkg-deps/* $(FIRMWARE_ROMS): build/lib/firmware.json download-firmware.sh $(PLATFORM_FILE) ./download-firmware.sh $(PLATFORM) -system-images/compat/docker-images/$(ARCH).tar: $(COMPAT_SRC) - cd system-images/compat && make docker-images/$(ARCH).tar && touch docker-images/$(ARCH).tar - -system-images/utils/docker-images/$(ARCH).tar: $(UTILS_SRC) - cd system-images/utils && make docker-images/$(ARCH).tar && touch docker-images/$(ARCH).tar - -system-images/binfmt/docker-images/$(ARCH).tar: $(BINFMT_SRC) - cd system-images/binfmt && make docker-images/$(ARCH).tar && touch docker-images/$(ARCH).tar - core/target/$(ARCH)-unknown-linux-musl/release/startbox: $(CORE_SRC) $(COMPRESSED_WEB_UIS) web/patchdb-ui-seed.json $(ENVIRONMENT_FILE) ARCH=$(ARCH) ./core/build-startbox.sh touch core/target/$(ARCH)-unknown-linux-musl/release/startbox diff --git a/core/Cargo.lock b/core/Cargo.lock index 71063b3da..a8a05f3e1 100644 --- a/core/Cargo.lock +++ b/core/Cargo.lock @@ -32,7 +32,7 @@ dependencies = [ "cfg-if", "cipher 0.3.0", "cpufeatures", - "ctr", + "ctr 0.8.0", "opaque-debug", ] @@ -45,6 +45,7 @@ dependencies = [ "cfg-if", "cipher 0.4.4", "cpufeatures", + "zeroize", ] [[package]] @@ -101,6 +102,52 @@ version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" +[[package]] +name = "amplify" +version = "4.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f7fb4ac7c881e54a8e7015e399b6112a2a5bc958b6c89ac510840ff20273b31" +dependencies = [ + "amplify_derive", + "amplify_num", + "ascii", + "getrandom 0.2.16", + "getrandom 0.3.3", + "wasm-bindgen", +] + +[[package]] +name = "amplify_derive" +version = "4.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a6309e6b8d89b36b9f959b7a8fa093583b94922a0f6438a24fb08936de4d428" +dependencies = [ + "amplify_syn", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "amplify_num" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99bcb75a2982047f733547042fc3968c0f460dfcf7d90b90dea3b2744580e9ad" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "amplify_syn" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7736fb8d473c0d83098b5bac44df6a561e20470375cd8bcae30516dc889fd62a" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "android-tzdata" version = "0.1.1" @@ -116,6 +163,12 @@ dependencies = [ "libc", ] +[[package]] +name = "anes" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" + [[package]] name = "ansi-width" version = "0.1.0" @@ -127,9 +180,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.19" +version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "301af1932e46185686725e0fad2f8f2aa7da69dd70bf6ecc44d6b703844a3933" +checksum = "3ae563653d1938f79b1ab1b5e668c87c76a9930414574a6583a7b7e11a8e6192" dependencies = [ "anstyle", "anstyle-parse", @@ -157,29 +210,29 @@ dependencies = [ [[package]] name = "anstyle-query" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8bdeb6047d8983be085bab0ba1472e6dc604e7041dbf6fcd5e71523014fae9" +checksum = "9e231f6134f61b71076a3eab506c379d4f36122f2af15a9ff04415ea4c3339e2" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] name = "anstyle-wincon" -version = "3.0.9" +version = "3.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "403f75924867bb1033c59fbf0797484329750cfbe3c4325cd33127941fabc882" +checksum = "3e0633414522a32ffaac8ac6cc8f748e090c5717661fddeea04219e2344f5f2a" dependencies = [ "anstyle", "once_cell_polyfill", - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] name = "anyhow" -version = "1.0.98" +version = "1.0.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" +checksum = "b0674a1ddeecb70197781e945de4b3b8ffb61fa939a5597bcf48503737663100" [[package]] name = "arbitrary" @@ -214,6 +267,68 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" +[[package]] +name = "arti-client" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "375c3b0681ca73c8678dc2e879f01964121955dc8e45f3b334ed0f7e7cefec48" +dependencies = [ + "anyhow", + "async-trait", + "cfg-if", + "derive-deftly 1.2.0", + "derive_builder_fork_arti", + "derive_more", + "dyn-clone", + "educe", + "fs-mistrust", + "futures", + "hostname-validator", + "humantime", + "humantime-serde", + "libc", + "once_cell", + "postage", + "rand 0.9.2", + "safelog", + "serde", + "thiserror 2.0.14", + "time", + "tor-async-utils", + "tor-basic-utils", + "tor-chanmgr", + "tor-circmgr", + "tor-config", + "tor-config-path", + "tor-dirmgr", + "tor-error", + "tor-geoip", + "tor-guardmgr", + "tor-hsclient", + "tor-hscrypto", + "tor-hsservice", + "tor-keymgr", + "tor-linkspec", + "tor-llcrypto", + "tor-memquota", + "tor-netdir", + "tor-netdoc", + "tor-persist", + "tor-proto", + "tor-protover", + "tor-ptmgr", + "tor-rpcbase", + "tor-rtcompat", + "tracing", + "void", +] + +[[package]] +name = "ascii" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d92bec98840b8f03a5ff5413de5293bfcd8bf96467cf5452609f939ec6f5de16" + [[package]] name = "ascii-canvas" version = "3.0.0" @@ -229,7 +344,7 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5493c3bedbacf7fd7382c6346bbd66687d12bbaad3a89a2d2c303ee6cf20b048" dependencies = [ - "asn1-rs-derive", + "asn1-rs-derive 0.5.1", "asn1-rs-impl", "displaydoc", "nom 7.1.3", @@ -239,6 +354,21 @@ dependencies = [ "time", ] +[[package]] +name = "asn1-rs" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56624a96882bb8c26d61312ae18cb45868e5a9992ea73c58e45c3101e56a1e60" +dependencies = [ + "asn1-rs-derive 0.6.0", + "asn1-rs-impl", + "displaydoc", + "nom 7.1.3", + "num-traits", + "rusticata-macros", + "thiserror 2.0.14", +] + [[package]] name = "asn1-rs-derive" version = "0.5.1" @@ -251,6 +381,18 @@ dependencies = [ "synstructure", ] +[[package]] +name = "asn1-rs-derive" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3109e49b1e4909e9db6515a30c633684d68cdeaa252f215214cb4fa1a5bfee2c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", + "synstructure", +] + [[package]] name = "asn1-rs-impl" version = "0.2.0" @@ -262,6 +404,12 @@ dependencies = [ "syn 2.0.104", ] +[[package]] +name = "assert_matches" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" + [[package]] name = "async-acme" version = "0.6.0" @@ -275,7 +423,7 @@ dependencies = [ "pem", "rcgen", "ring", - "rustls 0.23.29", + "rustls 0.23.31", "rustls-pemfile 2.2.0", "serde", "serde_json", @@ -290,7 +438,7 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "435a87a52755b8f27fcf321ac4f04b2802e337c8c4872923137471ec39c37532" dependencies = [ - "event-listener 5.4.0", + "event-listener 5.4.1", "event-listener-strategy", "futures-core", "pin-project-lite", @@ -321,16 +469,20 @@ dependencies = [ [[package]] name = "async-compression" -version = "0.4.27" +version = "0.4.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddb939d66e4ae03cee6091612804ba446b12878410cfa17f785f4dd67d4014e8" +checksum = "06575e6a9673580f52661c92107baabffbf41e2141373441cbcdc47cb733003c" dependencies = [ "brotli", "flate2", "futures-core", + "futures-io", "memchr", "pin-project-lite", "tokio", + "xz2", + "zstd", + "zstd-safe", ] [[package]] @@ -347,6 +499,21 @@ dependencies = [ "slab", ] +[[package]] +name = "async-global-executor" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05b1b633a2115cd122d73b955eadd9916c18c8f510ec9cd1686404c60ad1c29c" +dependencies = [ + "async-channel 2.5.0", + "async-executor", + "async-io", + "async-lock", + "blocking", + "futures-lite", + "once_cell", +] + [[package]] name = "async-io" version = "2.5.0" @@ -367,15 +534,27 @@ dependencies = [ [[package]] name = "async-lock" -version = "3.4.0" +version = "3.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18" +checksum = "5fd03604047cee9b6ce9de9f70c6cd540a0520c813cbd49bae61f33ab80ed1dc" dependencies = [ - "event-listener 5.4.0", + "event-listener 5.4.1", "event-listener-strategy", "pin-project-lite", ] +[[package]] +name = "async-native-tls" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9343dc5acf07e79ff82d0c37899f079db3534d99f189a1837c8e549c99405bec" +dependencies = [ + "futures-util", + "native-tls", + "thiserror 1.0.69", + "url", +] + [[package]] name = "async-process" version = "2.4.0" @@ -389,7 +568,7 @@ dependencies = [ "async-task", "blocking", "cfg-if", - "event-listener 5.4.0", + "event-listener 5.4.1", "futures-lite", "rustix 1.0.8", ] @@ -423,6 +602,33 @@ dependencies = [ "windows-sys 0.60.2", ] +[[package]] +name = "async-std" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "730294c1c08c2e0f85759590518f6333f0d5a0a766a27d519c1b244c3dfd8a24" +dependencies = [ + "async-channel 1.9.0", + "async-global-executor", + "async-io", + "async-lock", + "async-process", + "crossbeam-utils", + "futures-channel", + "futures-core", + "futures-io", + "futures-lite", + "gloo-timers", + "kv-log-macro", + "log", + "memchr", + "once_cell", + "pin-project-lite", + "pin-utils", + "slab", + "wasm-bindgen-futures", +] + [[package]] name = "async-stream" version = "0.3.6" @@ -462,6 +668,35 @@ dependencies = [ "syn 2.0.104", ] +[[package]] +name = "async_executors" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a982d2f86de6137cc05c9db9a915a19886c97911f9790d04f174cede74be01a5" +dependencies = [ + "async-std", + "blanket", + "futures-core", + "futures-task", + "futures-util", + "pin-project", + "rustc_version", + "tokio", +] + +[[package]] +name = "asynchronous-codec" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a860072022177f903e59730004fb5dc13db9275b79bb2aef7ba8ce831956c233" +dependencies = [ + "bytes", + "futures-sink", + "futures-util", + "memchr", + "pin-project-lite", +] + [[package]] name = "atoi" version = "2.0.0" @@ -471,6 +706,21 @@ dependencies = [ "num-traits", ] +[[package]] +name = "atomic" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c59bdb34bc650a32731b31bd8f0829cc15d24a708ee31559e0bb34f2bc320cba" + +[[package]] +name = "atomic" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a89cbf775b137e9b968e67227ef7f775587cde3fd31b0d8599dbd0f598a48340" +dependencies = [ + "bytemuck", +] + [[package]] name = "atomic-waker" version = "1.1.2" @@ -620,7 +870,7 @@ dependencies = [ "flate2", "lz4_flex", "solana-nohash-hasher", - "thiserror 2.0.12", + "thiserror 2.0.14", "tracing", "xxhash-rust", "xz2", @@ -660,12 +910,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" -[[package]] -name = "base32" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23ce669cd6c8588f79e15cf450314f9638f967fc5770ff1c7c1deb0925ea7cfa" - [[package]] name = "base32" version = "0.5.1" @@ -794,9 +1038,6 @@ name = "bitflags" version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" -dependencies = [ - "serde", -] [[package]] name = "bitmaps" @@ -828,6 +1069,15 @@ dependencies = [ "wyz 0.5.1", ] +[[package]] +name = "blake2" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" +dependencies = [ + "digest 0.10.7", +] + [[package]] name = "blake2b_simd" version = "1.0.3" @@ -854,6 +1104,17 @@ dependencies = [ "rayon-core", ] +[[package]] +name = "blanket" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0b121a9fe0df916e362fb3271088d071159cdf11db0e4182d02152850756eff" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + [[package]] name = "block-buffer" version = "0.9.0" @@ -886,10 +1147,16 @@ dependencies = [ ] [[package]] -name = "brotli" -version = "8.0.1" +name = "bounded-vec-deque" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9991eea70ea4f293524138648e41ee89b0b2b12ddef3b255effa43c8056e0e0d" +checksum = "2225b558afc76c596898f5f1b3fc35cfce0eb1b13635cbd7d1b2a7177dc10ccd" + +[[package]] +name = "brotli" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc97b8f16f944bba54f0433f07e30be199b6dc2bd25937444bbad560bcea29bd" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -898,14 +1165,25 @@ dependencies = [ [[package]] name = "brotli-decompressor" -version = "5.0.0" +version = "4.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "874bb8112abecc98cbd6d81ea4fa7e94fb9449648c93cc89aa40c81c24d7de03" +checksum = "a334ef7c9e23abf0ce748e8cd309037da93e606ad52eb372e4ce327a0dcfbdfd" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", ] +[[package]] +name = "bstr" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "234113d19d0d7d613b40e86fb654acf958910802bcceab913a4f9e7cda03b1a4" +dependencies = [ + "memchr", + "regex-automata 0.4.9", + "serde", +] + [[package]] name = "bumpalo" version = "3.19.0" @@ -913,10 +1191,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" [[package]] -name = "bytemuck" -version = "1.23.1" +name = "by_address" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c76a5792e44e4abe34d3abf15636779261d45a7450612059293d1d2cfc63422" +checksum = "64fa3c856b712db6612c019f14756e64e4bcea13337a6b33b696333a9eaa2d06" + +[[package]] +name = "bytemuck" +version = "1.23.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3995eaeebcdf32f91f980d360f78732ddc061097ab4e39991ae7a6ace9194677" [[package]] name = "byteorder" @@ -962,10 +1246,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "981520c98f422fcc584dc1a95c334e6953900b9106bc47a9839b81790009eb21" [[package]] -name = "cc" -version = "1.2.30" +name = "caret" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "deec109607ca693028562ed836a5f1c4b8bd77755c4e132fc5ce11b0b6211ae7" +checksum = "061dc3258f029feaf9ff02b43c6af5ea67a7dfaed5d2aef36204c812e614ef9c" + +[[package]] +name = "cast" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" + +[[package]] +name = "cc" +version = "1.2.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2352e5597e9c544d5e6d9c95190d5d27738ade584fa8db0a16e130e5c2b5296e" dependencies = [ "jobserver", "libc", @@ -1061,6 +1357,7 @@ checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" dependencies = [ "crypto-common", "inout", + "zeroize", ] [[package]] @@ -1076,9 +1373,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.41" +version = "4.5.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be92d32e80243a54711e5d7ce823c35c41c9d929dc4ab58e1276f625841aadf9" +checksum = "1fc0e74a703892159f5ae7d3aac52c8e6c392f5ae5f359c70b5881d60aaac318" dependencies = [ "clap_builder", "clap_derive", @@ -1086,9 +1383,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.41" +version = "4.5.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "707eab41e9622f9139419d573eca0900137718000c517d47da73045f54331c3d" +checksum = "b3e7f4214277f3c7aa526a59dd3fbe306a370daee1f8b7b8c987069cd8e888a8" dependencies = [ "anstream", "anstyle", @@ -1098,9 +1395,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.41" +version = "4.5.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef4f52386a59ca4c860f7393bcf8abd8dfd91ecccc0f774635ff68e92eeef491" +checksum = "14cb31bb0a7d536caef2639baa7fad459e15c3144efefa6dbd1c84562c4739f6" dependencies = [ "heck 0.5.0", "proc-macro2", @@ -1123,6 +1420,17 @@ dependencies = [ "cc", ] +[[package]] +name = "coarsetime" +version = "0.1.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91849686042de1b41cd81490edc83afbcb0abe5a9b6f2c4114f23ce8cca1bcf4" +dependencies = [ + "libc", + "wasix", + "wasm-bindgen", +] + [[package]] name = "color-eyre" version = "0.6.5" @@ -1258,12 +1566,6 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" -[[package]] -name = "convert_case" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" - [[package]] name = "convert_case" version = "0.6.0" @@ -1293,6 +1595,15 @@ dependencies = [ "version_check", ] +[[package]] +name = "cookie-factory" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9885fa71e26b8ab7855e2ec7cae6e9b380edff76cd052e07c683a0319d51b3a2" +dependencies = [ + "futures", +] + [[package]] name = "cookie_store" version = "0.21.1" @@ -1301,7 +1612,7 @@ checksum = "2eac901828f88a5241ee0600950ab981148a18f2f756900ffba1b125ca6a3ef9" dependencies = [ "cookie", "document-features", - "idna 1.0.3", + "idna", "log", "publicsuffix", "serde", @@ -1360,6 +1671,58 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "criterion" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2b12d017a929603d80db1831cd3a24082f8137ce19c69e6447f54f5fc8d692f" +dependencies = [ + "anes", + "cast", + "ciborium", + "clap", + "criterion-plot", + "is-terminal", + "itertools 0.10.5", + "num-traits", + "once_cell", + "oorandom", + "plotters", + "rayon", + "regex", + "serde", + "serde_derive", + "serde_json", + "tinytemplate", + "walkdir", +] + +[[package]] +name = "criterion-cycles-per-byte" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1029452fa751c93f8834962dd74807d69f0a6c7624d5b06625b393aeb6a14fc2" +dependencies = [ + "cfg-if", + "criterion", +] + +[[package]] +name = "criterion-plot" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b50826342786a51a89e2da3a28f1c32b06e387201bc2d19791f622c673706b1" +dependencies = [ + "cast", + "itertools 0.10.5", +] + +[[package]] +name = "critical-section" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "790eea4361631c5e7d22598ecd5723ff611904e3344ce8720784c93e3d83d40b" + [[package]] name = "crossbeam-channel" version = "0.5.15" @@ -1411,7 +1774,7 @@ checksum = "d8b9f2e4c67f833b660cdb0a3523065869fb35570177239812ed4c905aeff87b" dependencies = [ "bitflags 2.9.1", "crossterm_winapi", - "derive_more 2.0.1", + "derive_more", "document-features", "futures-core", "mio", @@ -1489,6 +1852,15 @@ dependencies = [ "cipher 0.3.0", ] +[[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 = "curve25519-dalek" version = "3.2.0" @@ -1529,14 +1901,38 @@ dependencies = [ "syn 2.0.104", ] +[[package]] +name = "darling" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" +dependencies = [ + "darling_core 0.14.4", + "darling_macro 0.14.4", +] + [[package]] name = "darling" version = "0.20.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee" dependencies = [ - "darling_core", - "darling_macro", + "darling_core 0.20.11", + "darling_macro 0.20.11", +] + +[[package]] +name = "darling_core" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim 0.10.0", + "syn 1.0.109", ] [[package]] @@ -1553,13 +1949,24 @@ dependencies = [ "syn 2.0.104", ] +[[package]] +name = "darling_macro" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" +dependencies = [ + "darling_core 0.14.4", + "quote", + "syn 1.0.109", +] + [[package]] name = "darling_macro" version = "0.20.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" dependencies = [ - "darling_core", + "darling_core 0.20.11", "quote", "syn 2.0.104", ] @@ -1594,7 +2001,7 @@ version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "58cb0719583cbe4e81fb40434ace2f0d22ccc3e39a74bb3796c22b451b4f139d" dependencies = [ - "darling", + "darling 0.20.11", "proc-macro-crate", "proc-macro2", "quote", @@ -1619,7 +2026,7 @@ version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5cd0a5c643689626bec213c4d8bd4d96acc8ffdb4ad4bb6bc16abf27d5f4b553" dependencies = [ - "asn1-rs", + "asn1-rs 0.6.2", "displaydoc", "nom 7.1.3", "num-bigint", @@ -1627,6 +2034,20 @@ dependencies = [ "rusticata-macros", ] +[[package]] +name = "der-parser" +version = "10.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07da5016415d5a3c4dd39b11ed26f915f52fc4e0dc197d87908bc916e51bc1a6" +dependencies = [ + "asn1-rs 0.7.1", + "cookie-factory", + "displaydoc", + "nom 7.1.3", + "num-traits", + "rusticata-macros", +] + [[package]] name = "der_derive" version = "0.7.3" @@ -1648,6 +2069,62 @@ dependencies = [ "serde", ] +[[package]] +name = "derive-deftly" +version = "0.14.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8ea84d0109517cc2253d4a679bdda1e8989e9bd86987e9e4f75ffdda0095fd1" +dependencies = [ + "derive-deftly-macros 0.14.6", + "heck 0.5.0", +] + +[[package]] +name = "derive-deftly" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "957bb73a3a9c0bbcac67e129b81954661b3cfcb9e28873d8441f91b54852e77a" +dependencies = [ + "derive-deftly-macros 1.2.0", + "heck 0.5.0", +] + +[[package]] +name = "derive-deftly-macros" +version = "0.14.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "357422a457ccb850dc8f1c1680e0670079560feaad6c2e247e3f345c4fab8a3f" +dependencies = [ + "heck 0.5.0", + "indexmap 2.10.0", + "itertools 0.14.0", + "proc-macro-crate", + "proc-macro2", + "quote", + "sha3", + "strum", + "syn 2.0.104", + "void", +] + +[[package]] +name = "derive-deftly-macros" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ea41269bd490d251b9eca50ccb43117e641cc68b129849757c15ece88fe0574" +dependencies = [ + "heck 0.5.0", + "indexmap 2.10.0", + "itertools 0.14.0", + "proc-macro-crate", + "proc-macro2", + "quote", + "sha3", + "strum", + "syn 2.0.104", + "void", +] + [[package]] name = "derive_arbitrary" version = "1.4.1" @@ -1660,16 +2137,34 @@ dependencies = [ ] [[package]] -name = "derive_more" -version = "0.99.20" +name = "derive_builder_core_fork_arti" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6edb4b64a43d977b8e99788fe3a04d483834fba1215a7e02caa415b626497f7f" +checksum = "24c1b715c79be6328caa9a5e1a387a196ea503740f0722ec3dd8f67a9e72314d" dependencies = [ - "convert_case 0.4.0", + "darling 0.14.4", "proc-macro2", "quote", - "rustc_version", - "syn 2.0.104", + "syn 1.0.109", +] + +[[package]] +name = "derive_builder_fork_arti" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3eae24d595f4d0ecc90a9a5a6d11c2bd8dafe2375ec4a1ec63250e5ade7d228" +dependencies = [ + "derive_builder_macro_fork_arti", +] + +[[package]] +name = "derive_builder_macro_fork_arti" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69887769a2489cd946bf782eb2b1bb2cb7bc88551440c94a765d4f040c08ebf3" +dependencies = [ + "derive_builder_core_fork_arti", + "syn 1.0.109", ] [[package]] @@ -1691,6 +2186,7 @@ dependencies = [ "proc-macro2", "quote", "syn 2.0.104", + "unicode-xid", ] [[package]] @@ -1714,6 +2210,24 @@ dependencies = [ "subtle", ] +[[package]] +name = "directories" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16f5094c54661b38d03bd7e50df373292118db60b585c08a411c6d840017fe7d" +dependencies = [ + "dirs-sys", +] + +[[package]] +name = "dirs" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e" +dependencies = [ + "dirs-sys", +] + [[package]] name = "dirs-next" version = "2.0.0" @@ -1724,6 +2238,18 @@ dependencies = [ "dirs-sys-next", ] +[[package]] +name = "dirs-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab" +dependencies = [ + "libc", + "option-ext", + "redox_users 0.5.2", + "windows-sys 0.60.2", +] + [[package]] name = "dirs-sys-next" version = "0.1.2" @@ -1731,7 +2257,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" dependencies = [ "libc", - "redox_users", + "redox_users 0.4.6", "winapi", ] @@ -1752,6 +2278,18 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69dde51e8fef5e12c1d65e0929b03d66e4c0c18282bc30ed2ca050ad6f44dd82" +[[package]] +name = "dns-lookup" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91adf1f5ae09290d87cca8f4f0a8e49bcc30672993eb8aa11a5c9d8872d16a98" +dependencies = [ + "cfg-if", + "libc", + "socket2 0.6.0", + "windows-sys 0.60.2", +] + [[package]] name = "document-features" version = "0.2.11" @@ -1768,13 +2306,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" [[package]] -name = "drain" -version = "0.1.2" +name = "downcast-rs" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d105028bd2b5dfcb33318fd79a445001ead36004dd8dffef1bdd7e493d8bc1e" -dependencies = [ - "tokio", -] +checksum = "ea8a8b81cacc08888170eef4d13b775126db426d0b348bee9d18c2c1eaf123cf" [[package]] name = "dunce" @@ -1784,9 +2319,36 @@ checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" [[package]] name = "dyn-clone" -version = "1.0.19" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c7a8fb8a9fbf66c1f703fe16184d10ca0ee9d23be5b4436400408ba54a95005" +checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" + +[[package]] +name = "dynasm" +version = "3.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f7d4c414c94bc830797115b8e5f434d58e7e80cb42ba88508c14bc6ea270625" +dependencies = [ + "bitflags 2.9.1", + "byteorder", + "lazy_static", + "proc-macro-error2", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "dynasmrt" +version = "3.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "602f7458a3859195fb840e6e0cce5f4330dd9dfbfece0edaf31fe427af346f55" +dependencies = [ + "byteorder", + "dynasm", + "fnv", + "memmap2", +] [[package]] name = "ecdsa" @@ -1844,6 +2406,7 @@ checksum = "70e796c081cee67dc755e1a36a0a172b897fab85fc3f6bc48307991f64e4eca9" dependencies = [ "curve25519-dalek 4.1.3", "ed25519 2.2.3", + "merlin", "rand_core 0.6.4", "serde", "sha2 0.10.9", @@ -1852,6 +2415,18 @@ dependencies = [ "zeroize", ] +[[package]] +name = "educe" +version = "0.4.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f0042ff8246a363dbe77d2ceedb073339e85a804b9a47636c6e016a9a32c05f" +dependencies = [ + "enum-ordinalize", + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "either" version = "1.15.0" @@ -1941,6 +2516,19 @@ dependencies = [ "syn 2.0.104", ] +[[package]] +name = "enum-ordinalize" +version = "3.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bf1fa3f06bbff1ea5b1a9c7b14aa992a39657db60a2759457328d7e058f49ee" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn 2.0.104", +] + [[package]] name = "enumflags2" version = "0.7.12" @@ -1968,6 +2556,29 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" +[[package]] +name = "equix" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89178c5241f5cc0c8f2b5ac5008f3c7a32caad341b1ec747a6e1e51d2e877110" +dependencies = [ + "arrayvec 0.7.6", + "hashx", + "num-traits", + "thiserror 2.0.14", + "visibility", +] + +[[package]] +name = "erased-serde" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e004d887f51fcb9fef17317a2f3525c887d8aa3f4f50fed920816a688284a5b7" +dependencies = [ + "serde", + "typeid", +] + [[package]] name = "errno" version = "0.2.8" @@ -2018,9 +2629,9 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "event-listener" -version = "5.4.0" +version = "5.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3492acde4c3fc54c845eaab3eed8bd00c7a7d881f78bfc801e43a93dec1331ae" +checksum = "e13b66accf52311f30a0db42147dadea9850cb48cd070028831ae5f5d4b856ab" dependencies = [ "concurrent-queue 2.5.0", "parking", @@ -2033,7 +2644,7 @@ version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8be9f3dfaaffdae2972880079a491a1a8bb7cbed0b8dd7a347f668b4150a3b93" dependencies = [ - "event-listener 5.4.0", + "event-listener 5.4.1", "pin-project-lite", ] @@ -2065,6 +2676,18 @@ dependencies = [ "once_cell", ] +[[package]] +name = "fallible-iterator" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649" + +[[package]] +name = "fallible-streaming-iterator" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a" + [[package]] name = "fastrand" version = "2.3.0" @@ -2096,6 +2719,19 @@ 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 0.6.1", + "serde", + "toml", + "uncased", + "version_check", +] + [[package]] name = "filetime" version = "0.2.25" @@ -2108,6 +2744,12 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "fixed-capacity-vec" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b31a14f5ee08ed1a40e1252b35af18bed062e3f39b69aab34decde36bc43e40" + [[package]] name = "fixedbitset" version = "0.4.2" @@ -2126,15 +2768,10 @@ dependencies = [ ] [[package]] -name = "flume" -version = "0.11.1" +name = "fluid-let" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0e4dd2a88388a1f4ccc7c9ce104604dab68d9f408dc34cd45823d5a9069095" -dependencies = [ - "futures-core", - "futures-sink", - "spin", -] +checksum = "749cff877dc1af878a0b31a41dd221a753634401ea0ef2f87b62d3171522485a" [[package]] name = "fnv" @@ -2181,12 +2818,58 @@ dependencies = [ "itertools 0.8.2", ] +[[package]] +name = "fs-mistrust" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "198b8f9ab4cff63b5c91e9e64edd4e6b43cd7fe7a52519a03c6c32ea0acfa557" +dependencies = [ + "derive_builder_fork_arti", + "dirs", + "libc", + "pwd-grp", + "serde", + "thiserror 2.0.14", + "walkdir", +] + [[package]] name = "fs_extra" version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" +[[package]] +name = "fslock" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04412b8935272e3a9bae6f48c7bfff74c2911f60525404edfdd28e49884c3bfb" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "fslock-arti-fork" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b21bd626aaab7b904b20bef6d9e06298914a0c8d9fb8b010483766b2e532791" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "fslock-guard" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed387b899db1671a47eaf17e7e6d7008577262c09319cb8e19601371192b526f" +dependencies = [ + "fslock-arti-fork", + "thiserror 2.0.14", + "winapi", +] + [[package]] name = "funty" version = "1.1.0" @@ -2214,6 +2897,27 @@ dependencies = [ "futures-util", ] +[[package]] +name = "futures-await-test" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae0d3d05bce73a572ba581e4f4a7f20164c18150169c3a67f406aada3e48c7e8" +dependencies = [ + "futures-await-test-macro", + "futures-executor", +] + +[[package]] +name = "futures-await-test-macro" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f150175e6832600500334550e00e4dc563a0b32f58a9d1ad407f6473378c839" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "futures-channel" version = "0.3.31" @@ -2260,9 +2964,9 @@ checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-lite" -version = "2.6.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5edaec856126859abb19ed65f39e90fea3a9574b9707f13539acf4abf7eb532" +checksum = "f78e10609fe0e0b3f4157ffab1876319b5b0db102a2c60dc4626306dc46b44ad" dependencies = [ "fastrand", "futures-core", @@ -2293,6 +2997,17 @@ dependencies = [ "rustls-pki-types", ] +[[package]] +name = "futures-rustls" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f2f12607f92c69b12ed746fabf9ca4f5c482cba46679c1a75b874ed7c26adb" +dependencies = [ + "futures-io", + "rustls 0.23.31", + "rustls-pki-types", +] + [[package]] name = "futures-sink" version = "0.3.31" @@ -2341,7 +3056,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75cec8bb4d3d32542cfcb9517f78366b52c17931e30d7ee1682c13686c19cee7" dependencies = [ "futures", - "futures-rustls", + "futures-rustls 0.25.1", "hyper", "log", "serde", @@ -2381,8 +3096,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" dependencies = [ "cfg-if", + "js-sys", "libc", "wasi 0.11.1+wasi-snapshot-preview1", + "wasm-bindgen", ] [[package]] @@ -2407,9 +3124,27 @@ checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "glob" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" +checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" + +[[package]] +name = "glob-match" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9985c9503b412198aa4197559e9a318524ebc4519c229bfa05a535828c950b9d" + +[[package]] +name = "gloo-timers" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbb143cf96099802033e0d4f4963b19fd2e0b728bcf076cd9cf7f6634f092994" +dependencies = [ + "futures-channel", + "futures-core", + "js-sys", + "wasm-bindgen", +] [[package]] name = "gpt" @@ -2435,10 +3170,22 @@ dependencies = [ ] [[package]] -name = "h2" -version = "0.4.11" +name = "growable-bloom-filter" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17da50a276f1e01e0ba6c029e47b7100754904ee8a278f886546e98575380785" +checksum = "d174ccb4ba660d431329e7f0797870d0a4281e36353ec4b4a3c5eab6c2cfb6f1" +dependencies = [ + "serde", + "serde_bytes", + "serde_derive", + "xxhash-rust", +] + +[[package]] +name = "h2" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3c0b69cfcb4e1b9f1bf2f53f95f766e4661169728ec61cd3fe5a0166f2d1386" dependencies = [ "atomic-waker", "bytes", @@ -2496,9 +3243,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.15.4" +version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5971ac85611da7067dbfcabef3c70ebb5606018acd9e2a3903a0da507521e0d5" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" dependencies = [ "allocator-api2", "equivalent", @@ -2511,7 +3258,22 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7382cf6263419f2d8df38c55d7da83da5c18aef87fc7a7fc1fb1e344edfe14c1" dependencies = [ - "hashbrown 0.15.4", + "hashbrown 0.15.5", +] + +[[package]] +name = "hashx" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cb639748a589a17df2126f8015897ab416e81113afb82f56df5d47fa1486ab1" +dependencies = [ + "arrayvec 0.7.6", + "blake2", + "dynasmrt", + "fixed-capacity-vec", + "hex", + "rand_core 0.9.3", + "thiserror 2.0.14", ] [[package]] @@ -2568,6 +3330,25 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +[[package]] +name = "hickory-client" +version = "0.25.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c466cd63a4217d5b2b8e32f23f58312741ce96e3c84bf7438677d2baff0fc555" +dependencies = [ + "cfg-if", + "data-encoding", + "futures-channel", + "futures-util", + "hickory-proto 0.25.2", + "once_cell", + "radix_trie", + "rand 0.9.2", + "thiserror 2.0.14", + "tokio", + "tracing", +] + [[package]] name = "hickory-proto" version = "0.24.4" @@ -2581,7 +3362,7 @@ dependencies = [ "futures-channel", "futures-io", "futures-util", - "idna 1.0.3", + "idna", "ipnet", "once_cell", "rand 0.8.5", @@ -2596,6 +3377,32 @@ dependencies = [ "url", ] +[[package]] +name = "hickory-proto" +version = "0.25.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8a6fe56c0038198998a6f217ca4e7ef3a5e51f46163bd6dd60b5c71ca6c6502" +dependencies = [ + "async-trait", + "cfg-if", + "data-encoding", + "enum-as-inner", + "futures-channel", + "futures-io", + "futures-util", + "idna", + "ipnet", + "once_cell", + "rand 0.9.2", + "ring", + "serde", + "thiserror 2.0.14", + "tinyvec", + "tokio", + "tracing", + "url", +] + [[package]] name = "hickory-resolver" version = "0.24.4" @@ -2604,7 +3411,7 @@ checksum = "cbb117a1ca520e111743ab2f6688eddee69db4e0ea242545a604dce8a66fd22e" dependencies = [ "cfg-if", "futures-util", - "hickory-proto", + "hickory-proto 0.24.4", "ipconfig", "lru-cache", "once_cell", @@ -2619,6 +3426,29 @@ dependencies = [ "tracing", ] +[[package]] +name = "hickory-server" +version = "0.25.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d53e5fe811b941c74ee46b8818228bfd2bc2688ba276a0eaeb0f2c95ea3b2585" +dependencies = [ + "async-trait", + "bytes", + "cfg-if", + "data-encoding", + "enum-as-inner", + "futures-util", + "hickory-proto 0.25.2", + "ipnet", + "prefix-trie", + "serde", + "thiserror 2.0.14", + "time", + "tokio", + "tokio-util", + "tracing", +] + [[package]] name = "hifijson" version = "0.2.3" @@ -2652,6 +3482,12 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "hostname-validator" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f558a64ac9af88b5ba400d99b579451af0d39c6d360980045b91aac966d705e2" + [[package]] name = "http" version = "1.3.1" @@ -2704,6 +3540,16 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b112acc8b3adf4b107a8ec20977da0273a8c386765a3ec0229bd500a1443f9f" +[[package]] +name = "humantime-serde" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57a3db5ea5923d99402c94e9feb261dc5ee9b4efa158b0315f788cf549cc200c" +dependencies = [ + "humantime", + "serde", +] + [[package]] name = "hyper" version = "1.6.0" @@ -2734,7 +3580,7 @@ dependencies = [ "http", "hyper", "hyper-util", - "rustls 0.23.29", + "rustls 0.23.31", "rustls-pki-types", "tokio", "tokio-rustls 0.26.2", @@ -2921,16 +3767,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" -[[package]] -name = "idna" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] - [[package]] name = "idna" version = "1.0.3" @@ -2978,20 +3814,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "imbl" -version = "6.0.0" -source = "git+https://github.com/dr-bonez/imbl.git?branch=bugfix%2Fordmap-lifetimes#897cf45b8c32bbee760d1348872724d4d9987ffe" -dependencies = [ - "archery", - "bitmaps", - "imbl-sized-chunks", - "rand_core 0.9.3", - "rand_xoshiro", - "serde", - "version_check", -] - [[package]] name = "imbl-sized-chunks" version = "0.1.3" @@ -3007,7 +3829,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "80b000e99a562d9598ae56029f675dbf1104e8aed5a9b074824a752de0a61f39" dependencies = [ - "imbl 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "imbl", "serde", "serde_json", "yasi", @@ -3018,7 +3840,7 @@ name = "imbl-value" version = "0.4.0" source = "git+https://github.com/Start9Labs/imbl-value.git#82b91f973d67139ce5b3f662407f436bc64d2fe9" dependencies = [ - "imbl 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "imbl", "serde", "serde_json", "yasi", @@ -3045,9 +3867,9 @@ dependencies = [ [[package]] name = "indenter" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" +checksum = "964de6e86d545b246d84badc0fef527924ace5134f30641c203ef52ba83f58d5" [[package]] name = "indexmap" @@ -3067,7 +3889,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fe4cd85333e22411419a0bcae1297d25e58c9443848b11dc6a86fefe8c78a661" dependencies = [ "equivalent", - "hashbrown 0.15.4", + "hashbrown 0.15.5", "serde", ] @@ -3085,6 +3907,26 @@ dependencies = [ "web-time", ] +[[package]] +name = "inotify" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f37dccff2791ab604f9babef0ba14fbe0be30bd368dc541e2b08d07c8aa908f3" +dependencies = [ + "bitflags 2.9.1", + "inotify-sys", + "libc", +] + +[[package]] +name = "inotify-sys" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e05c02b5e89bff3b946cedeca278abc628fe811e604f027c45a8aa3cf793d0eb" +dependencies = [ + "libc", +] + [[package]] name = "inout" version = "0.1.4" @@ -3104,6 +3946,15 @@ dependencies = [ "tokio", ] +[[package]] +name = "inventory" +version = "0.3.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab08d7cd2c5897f2c949e5383ea7c7db03fb19130ffcfbf7eda795137ae3cb83" +dependencies = [ + "rustversion", +] + [[package]] name = "io-uring" version = "0.7.9" @@ -3294,7 +4145,7 @@ dependencies = [ "regex", "serde", "serde_json", - "thiserror 2.0.12", + "thiserror 2.0.14", "time", ] @@ -3321,10 +4172,10 @@ dependencies = [ name = "json-ptr" version = "0.1.0" dependencies = [ - "imbl 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "imbl", "imbl-value 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde", - "thiserror 2.0.12", + "thiserror 2.0.14", ] [[package]] @@ -3338,6 +4189,16 @@ dependencies = [ "serde_json", ] +[[package]] +name = "k12" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4dc5fdb62af2f520116927304f15d25b3c2667b4817b90efdc045194c912c54" +dependencies = [ + "digest 0.10.7", + "sha3", +] + [[package]] name = "keccak" version = "0.1.5" @@ -3347,6 +4208,35 @@ dependencies = [ "cpufeatures", ] +[[package]] +name = "kqueue" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eac30106d7dce88daf4a3fcb4879ea939476d5074a9b7ddd0fb97fa4bed5596a" +dependencies = [ + "kqueue-sys", + "libc", +] + +[[package]] +name = "kqueue-sys" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed9625ffda8729b85e45cf04090035ac368927b8cebc34898e7c120f52e4838b" +dependencies = [ + "bitflags 1.3.2", + "libc", +] + +[[package]] +name = "kv-log-macro" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f" +dependencies = [ + "log", +] + [[package]] name = "lalrpop" version = "0.20.2" @@ -3424,9 +4314,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.174" +version = "0.2.175" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776" +checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543" [[package]] name = "libloading" @@ -3435,7 +4325,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07033963ba89ebaf1584d767badaa2e8fcec21aedea6b8c0346d487d49c28667" dependencies = [ "cfg-if", - "windows-targets 0.53.2", + "windows-targets 0.53.3", ] [[package]] @@ -3446,21 +4336,22 @@ checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" [[package]] name = "libredox" -version = "0.1.6" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4488594b9328dee448adb906d8b126d9b7deb7cf5c22161ee591610bb1be83c0" +checksum = "391290121bad3d37fbddad76d8f5d1c1c314cfc646d143d7e07a3086ddff0ce3" dependencies = [ "bitflags 2.9.1", "libc", - "redox_syscall 0.5.15", + "redox_syscall 0.5.17", ] [[package]] name = "libsqlite3-sys" -version = "0.30.1" +version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e99fb7a497b1e3339bc746195567ed8d3e24945ecd636e3619d20b9de9e9149" +checksum = "133c182a6a2c87864fe97778797e46c7e999672690dc9fa3ee8e241aa4a9c13f" dependencies = [ + "cc", "pkg-config", "vcpkg", ] @@ -3529,6 +4420,9 @@ name = "log" version = "0.4.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" +dependencies = [ + "value-bag", +] [[package]] name = "lru-cache" @@ -3616,7 +4510,7 @@ dependencies = [ "mail-builder", "md5", "rand 0.8.5", - "rustls 0.23.29", + "rustls 0.23.31", "rustls-pki-types", "smtp-proto", "tokio", @@ -3655,7 +4549,7 @@ dependencies = [ "bitvec 1.0.1", "serde", "serde-big-array", - "thiserror 2.0.12", + "thiserror 2.0.14", ] [[package]] @@ -3707,6 +4601,18 @@ dependencies = [ "autocfg", ] +[[package]] +name = "merlin" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58c38e2799fc0978b65dfff8023ec7843e2330bb462f19198840b34b6582397d" +dependencies = [ + "byteorder", + "keccak", + "rand_core 0.6.4", + "zeroize", +] + [[package]] name = "mime" version = "0.3.17" @@ -3744,6 +4650,7 @@ dependencies = [ name = "models" version = "0.1.0" dependencies = [ + "arti-client", "axum 0.8.4", "base64 0.22.1", "color-eyre", @@ -3760,14 +4667,12 @@ dependencies = [ "regex", "reqwest", "rpc-toolkit", - "rustls 0.23.29", + "rustls 0.23.31", "serde", "serde_json", - "sqlx", "ssh-key", - "thiserror 2.0.12", + "thiserror 2.0.14", "tokio", - "torut", "tracing", "ts-rs", "yasi", @@ -3882,6 +4787,38 @@ dependencies = [ "memchr", ] +[[package]] +name = "notify" +version = "8.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d3d07927151ff8575b7087f245456e549fea62edf0ec4e565a5ee50c8402bc3" +dependencies = [ + "bitflags 2.9.1", + "inotify", + "kqueue", + "libc", + "log", + "mio", + "notify-types", + "walkdir", + "windows-sys 0.60.2", +] + +[[package]] +name = "notify-types" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e0826a989adedc2a244799e823aece04662b66609d96af8dff7ac6df9a8925d" + +[[package]] +name = "ntapi" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8a3895c6391c39d7fe7ebc444a87eb2991b2a0bc718fdabd071eec617fc68e4" +dependencies = [ + "winapi", +] + [[package]] name = "nu-ansi-term" version = "0.46.0" @@ -4033,6 +4970,25 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6aa2c4e539b869820a2b82e1aef6ff40aa85e65decdd5185e83fb4b1249cd00f" +[[package]] +name = "objc2-core-foundation" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c10c2894a6fed806ade6027bcd50662746363a9589d3ec9d9bef30a4e4bc166" +dependencies = [ + "bitflags 2.9.1", +] + +[[package]] +name = "objc2-io-kit" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71c1c64d6120e51cd86033f67176b1cb66780c2efe34dec55176f77befd93c0a" +dependencies = [ + "libc", + "objc2-core-foundation", +] + [[package]] name = "object" version = "0.36.7" @@ -4048,7 +5004,7 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8d8034d9489cdaf79228eb9f6a3b8d7bb32ba00d6645ebd48eef4077ceb5bd9" dependencies = [ - "asn1-rs", + "asn1-rs 0.6.2", ] [[package]] @@ -4056,6 +5012,10 @@ name = "once_cell" version = "1.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" +dependencies = [ + "critical-section", + "portable-atomic", +] [[package]] name = "once_cell_polyfill" @@ -4063,6 +5023,21 @@ version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4895175b425cb1f87721b59f0f286c2092bd4af812243672510e1ac53e2e0ad" +[[package]] +name = "oneshot-fused-workaround" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff2948fd2414b613f9a97f8401270bd5d7638265ab940475cdbcfa28a0273d58" +dependencies = [ + "futures", +] + +[[package]] +name = "oorandom" +version = "11.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6790f58c7ff633d8771f42965289203411a5e5c68388703c06e14f24770b41e" + [[package]] name = "opaque-debug" version = "0.3.1" @@ -4116,9 +5091,9 @@ checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" [[package]] name = "openssl-src" -version = "300.5.1+3.5.1" +version = "300.5.2+3.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "735230c832b28c000e3bc117119e6466a663ec73506bc0a9907ea4187508e42a" +checksum = "d270b79e2926f5150189d475bc7e9d2c69f9c4697b185fa917d5a32b792d21b4" dependencies = [ "cc", ] @@ -4136,6 +5111,21 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + +[[package]] +name = "ordered-float" +version = "2.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68f19d67e5a2795c94e73e0bb1cc1a7edeb2e28efd39e2e1c9b7a40c1108b11c" +dependencies = [ + "num-traits", +] + [[package]] name = "ordered-stream" version = "0.2.0" @@ -4146,6 +5136,15 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "os_str_bytes" +version = "6.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" +dependencies = [ + "memchr", +] + [[package]] name = "overload" version = "0.1.1" @@ -4220,11 +5219,17 @@ checksum = "bc838d2a56b5b1a6c25f55575dfc605fabb63bb2365f6c2353ef9159aa69e4a5" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.15", + "redox_syscall 0.5.17", "smallvec", "windows-targets 0.52.6", ] +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + [[package]] name = "patch-db" version = "0.1.0" @@ -4232,7 +5237,7 @@ dependencies = [ "async-trait", "fd-lock-rs", "futures", - "imbl 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "imbl", "imbl-value 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "json-patch", "json-ptr", @@ -4241,7 +5246,7 @@ dependencies = [ "patch-db-macro", "serde", "serde_cbor", - "thiserror 2.0.12", + "thiserror 2.0.14", "tokio", "tracing", "tracing-error", @@ -4308,7 +5313,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1db05f56d34358a8b1066f67cbb203ee3e7ed2ba674a6263a1d5ec6db2204323" dependencies = [ "memchr", - "thiserror 2.0.12", + "thiserror 2.0.14", "ucd-trie", ] @@ -4355,6 +5360,40 @@ dependencies = [ "indexmap 2.10.0", ] +[[package]] +name = "phf" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "913273894cec178f401a31ec4b656318d95473527be05c0752cc41cdc32be8b7" +dependencies = [ + "phf_macros", + "phf_shared 0.12.1", + "serde", +] + +[[package]] +name = "phf_generator" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2cbb1126afed61dd6368748dae63b1ee7dc480191c6262a3b4ff1e29d86a6c5b" +dependencies = [ + "fastrand", + "phf_shared 0.12.1", +] + +[[package]] +name = "phf_macros" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d713258393a82f091ead52047ca779d37e5766226d009de21696c4e667044368" +dependencies = [ + "phf_generator", + "phf_shared 0.12.1", + "proc-macro2", + "quote", + "syn 2.0.104", +] + [[package]] name = "phf_shared" version = "0.11.3" @@ -4364,6 +5403,15 @@ dependencies = [ "siphasher", ] +[[package]] +name = "phf_shared" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06005508882fb681fd97892ecff4b7fd0fee13ef1aa569f8695dae7ab9099981" +dependencies = [ + "siphasher", +] + [[package]] name = "pico-args" version = "0.5.0" @@ -4441,10 +5489,38 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" [[package]] -name = "polling" -version = "3.9.0" +name = "plotters" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ee9b2fa7a4517d2c91ff5bc6c297a427a96749d15f98fcdbb22c05571a4d4b7" +checksum = "5aeb6f403d7a4911efb1e33402027fc44f29b5bf6def3effcc22d7bb75f2b747" +dependencies = [ + "num-traits", + "plotters-backend", + "plotters-svg", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "plotters-backend" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df42e13c12958a16b3f7f4386b9ab1f3e7933914ecea48da7139435263a4172a" + +[[package]] +name = "plotters-svg" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51bae2ac328883f7acdfea3d66a7c35751187f870bc81f94563733a154d7a670" +dependencies = [ + "plotters-backend", +] + +[[package]] +name = "polling" +version = "3.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5bd19146350fe804f7cb2669c851c03d69da628803dab0d98018142aaa5d829" dependencies = [ "cfg-if", "concurrent-queue 2.5.0", @@ -4460,6 +5536,21 @@ version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483" +[[package]] +name = "postage" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af3fb618632874fb76937c2361a7f22afd393c982a2165595407edc75b06d3c1" +dependencies = [ + "atomic 0.5.3", + "crossbeam-queue", + "futures", + "parking_lot", + "pin-project", + "static_assertions", + "thiserror 1.0.69", +] + [[package]] name = "potential_utf" version = "0.1.2" @@ -4490,6 +5581,16 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" +[[package]] +name = "prefix-trie" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85cf4c7c25f1dd66c76b451e9041a8cfce26e4ca754934fa7aed8d5a59a01d20" +dependencies = [ + "ipnet", + "num-traits", +] + [[package]] name = "prettyplease" version = "0.2.36" @@ -4523,20 +5624,53 @@ dependencies = [ "elliptic-curve", ] +[[package]] +name = "priority-queue" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5676d703dda103cbb035b653a9f11448c0a7216c7926bd35fcb5865475d0c970" +dependencies = [ + "autocfg", + "equivalent", + "indexmap 2.10.0", +] + [[package]] name = "proc-macro-crate" version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "edce586971a4dfaa28950c6f18ed55e0406c1ab88bbce2c6f6293a7aaba73d35" dependencies = [ - "toml_edit 0.22.27", + "toml_edit", +] + +[[package]] +name = "proc-macro-error-attr2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5" +dependencies = [ + "proc-macro2", + "quote", +] + +[[package]] +name = "proc-macro-error2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802" +dependencies = [ + "proc-macro-error-attr2", + "proc-macro2", + "quote", + "syn 2.0.104", ] [[package]] name = "proc-macro2" -version = "1.0.95" +version = "1.0.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" +checksum = "d61789d7719defeb74ea5fe81f2fdfdbd28a803847077cecce2ff14e1472f6f1" dependencies = [ "unicode-ident", ] @@ -4650,10 +5784,22 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f42ea446cab60335f76979ec15e12619a2165b5ae2c12166bef27d283a9fadf" dependencies = [ - "idna 1.0.3", + "idna", "psl-types", ] +[[package]] +name = "pwd-grp" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b94fdf3867b7f2889a736f0022ea9386766280d2cca4bdbe41629ada9e4f3b8f" +dependencies = [ + "derive-deftly 0.14.6", + "libc", + "paste", + "thiserror 1.0.69", +] + [[package]] name = "qrcode" version = "0.14.1" @@ -4815,6 +5961,17 @@ dependencies = [ "rand_core 0.5.1", ] +[[package]] +name = "rand_jitter" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b16df48f071248e67b8fc5e866d9448d45c08ad8b672baaaf796e2f15e606ff0" +dependencies = [ + "libc", + "rand_core 0.9.3", + "winapi", +] + [[package]] name = "rand_xorshift" version = "0.4.0" @@ -4833,6 +5990,22 @@ dependencies = [ "rand_core 0.9.3", ] +[[package]] +name = "rangemap" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f93e7e49bb0bf967717f7bd674458b3d6b0c5f48ec7e3038166026a69fc22223" + +[[package]] +name = "rayon" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" +dependencies = [ + "either", + "rayon-core", +] + [[package]] name = "rayon-core" version = "1.12.1" @@ -4855,6 +6028,15 @@ dependencies = [ "yasna", ] +[[package]] +name = "rdrand" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d92195228612ac8eed47adbc2ed0f04e513a4ccb98175b6f2bd04d963b533655" +dependencies = [ + "rand_core 0.6.4", +] + [[package]] name = "redox_syscall" version = "0.1.57" @@ -4872,9 +6054,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.15" +version = "0.5.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e8af0dde094006011e6a740d4879319439489813bd0bcdc7d821beaeeff48ec" +checksum = "5407465600fb0548f1442edf71dd20683c6ed326200ace4b1ef0763521bb3b77" dependencies = [ "bitflags 2.9.1", ] @@ -4896,6 +6078,17 @@ dependencies = [ "thiserror 1.0.69", ] +[[package]] +name = "redox_users" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac" +dependencies = [ + "getrandom 0.2.16", + "libredox", + "thiserror 2.0.14", +] + [[package]] name = "ref-cast" version = "1.0.24" @@ -4962,9 +6155,9 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" -version = "0.12.22" +version = "0.12.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbc931937e6ca3a06e3b6c0aa7841849b160a90351d6ab467a8b9b9959767531" +checksum = "d429f34c8092b2d42c7c93cec323bb4adeb7c67698f70839adec842ec10c7ceb" dependencies = [ "base64 0.22.1", "bytes", @@ -5023,6 +6216,12 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95325155c684b1c89f7765e30bc1c42e4a6da51ca513615660cb8a62ef9a88e3" +[[package]] +name = "retry-error" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce97442758392c7e2a7716e06c514de75f0fe4b5a4b76e14ba1e5edfb7ba3512" + [[package]] name = "rfc6979" version = "0.4.0" @@ -5079,7 +6278,7 @@ dependencies = [ "reqwest", "serde", "serde_json", - "thiserror 2.0.12", + "thiserror 2.0.14", "tokio", "tokio-stream", "url", @@ -5117,6 +6316,21 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "rusqlite" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "165ca6e57b20e1351573e3729b958bc62f0e48025386970b6e4d29e7a7e71f3f" +dependencies = [ + "bitflags 2.9.1", + "fallible-iterator", + "fallible-streaming-iterator", + "hashlink", + "libsqlite3-sys", + "smallvec", + "time", +] + [[package]] name = "rust-argon2" version = "2.1.0" @@ -5130,9 +6344,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.25" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "989e6739f80c4ad5b13e0fd7fe89531180375b18520cc8c82080e4dc4035b84f" +checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" [[package]] name = "rustc-hash" @@ -5212,9 +6426,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.29" +version = "0.23.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2491382039b29b9b11ff08b76ff6c97cf287671dbb74f0be44bda389fffe9bd1" +checksum = "c0ebcbd2f03de0fc1122ad9bb24b127a5a6cd51d72604a3f3c50ac459762b6cc" dependencies = [ "aws-lc-rs", "log", @@ -5288,9 +6502,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.21" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a0d197bd2c9dc6e53b84da9556a69ba4cdfab8619eb41a8bd1cc2027a0f6b1d" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" [[package]] name = "rusty-fork" @@ -5315,7 +6529,7 @@ dependencies = [ "futures-util", "pin-project", "thingbuf", - "thiserror 2.0.12", + "thiserror 2.0.14", "unicode-segmentation", ] @@ -5325,6 +6539,19 @@ version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" +[[package]] +name = "safelog" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a4e1c994fbc7521a5003e5c1c54304654ea0458881e777f6e2638520c2de8c5" +dependencies = [ + "derive_more", + "educe", + "either", + "fluid-let", + "thiserror 2.0.14", +] + [[package]] name = "same-file" version = "1.0.6" @@ -5334,6 +6561,15 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "sanitize-filename" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc984f4f9ceb736a7bb755c3e3bd17dc56370af2600c9780dcc48c66453da34d" +dependencies = [ + "regex", +] + [[package]] name = "schannel" version = "0.1.27" @@ -5447,6 +6683,25 @@ dependencies = [ "serde", ] +[[package]] +name = "serde-value" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3a1a3341211875ef120e117ea7fd5228530ae7e7036a779fdc9117be6b3282c" +dependencies = [ + "ordered-float", + "serde", +] + +[[package]] +name = "serde_bytes" +version = "0.11.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8437fd221bde2d4ca316d61b90e337e9e702b3820b87d63caa9ba6c02bd06d96" +dependencies = [ + "serde", +] + [[package]] name = "serde_cbor" version = "0.11.1" @@ -5467,10 +6722,19 @@ dependencies = [ ] [[package]] -name = "serde_json" -version = "1.0.141" +name = "serde_ignored" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30b9eff21ebe718216c6ec64e1d9ac57087aad11efc64e32002bce4a0d4c03d3" +checksum = "b516445dac1e3535b6d658a7b528d771153dfb272ed4180ca4617a20550365ff" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_json" +version = "1.0.142" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "030fedb782600dcbd6f02d479bf0d817ac3bb40d644745b769d6a96bc3afc5a7" dependencies = [ "indexmap 2.10.0", "itoa", @@ -5558,7 +6822,7 @@ version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de90945e6565ce0d9a25098082ed4ee4002e047cb59892c318d66821e14bb30f" dependencies = [ - "darling", + "darling 0.20.11", "proc-macro2", "quote", "syn 2.0.104", @@ -5651,6 +6915,17 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" +[[package]] +name = "shellexpand" +version = "3.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b1fdf65dd6331831494dd616b30351c38e96e45921a27745cf98490458b90bb" +dependencies = [ + "bstr", + "dirs", + "os_str_bytes", +] + [[package]] name = "shlex" version = "1.3.0" @@ -5680,9 +6955,9 @@ dependencies = [ [[package]] name = "signal-hook-registry" -version = "1.4.5" +version = "1.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9203b8055f63a2a00e2f593bb0510367fe707d7ff1e5c872de2f537b339e5410" +checksum = "b2a4719bff48cee6b39d12c020eeb490953ad2443b7055bd0b21fca26bd8c28b" dependencies = [ "libc", ] @@ -5734,9 +7009,32 @@ checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" [[package]] name = "slab" -version = "0.4.10" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04dc19736151f35336d325007ac991178d504a119863a2fcb3758cdb5e52c50d" +checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" + +[[package]] +name = "slotmap" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbff4acf519f630b3a3ddcfaea6c06b42174d9a44bc70c620e9ed1649d58b82a" +dependencies = [ + "serde", + "version_check", +] + +[[package]] +name = "slotmap-careful" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9500059071474a36baac642b6bb99ca1dbac0ce43727abbba02dad83822dadf2" +dependencies = [ + "paste", + "serde", + "slotmap", + "thiserror 2.0.14", + "void", +] [[package]] name = "smallvec" @@ -5790,9 +7088,6 @@ name = "spin" version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" -dependencies = [ - "lock_api", -] [[package]] name = "spki" @@ -5812,9 +7107,7 @@ checksum = "1fefb893899429669dcdd979aff487bd78f4064e5e7907e4269081e0ef7d97dc" dependencies = [ "sqlx-core", "sqlx-macros", - "sqlx-mysql", "sqlx-postgres", - "sqlx-sqlite", ] [[package]] @@ -5825,28 +7118,27 @@ checksum = "ee6798b1838b6a0f69c007c133b8df5866302197e404e8b6ee8ed3e3a5e68dc6" dependencies = [ "base64 0.22.1", "bytes", - "chrono", "crc", "crossbeam-queue", "either", - "event-listener 5.4.0", + "event-listener 5.4.1", "futures-core", "futures-intrusive", "futures-io", "futures-util", - "hashbrown 0.15.4", + "hashbrown 0.15.5", "hashlink", "indexmap 2.10.0", "log", "memchr", "once_cell", "percent-encoding", - "rustls 0.23.29", + "rustls 0.23.31", "serde", "serde_json", "sha2 0.10.9", "smallvec", - "thiserror 2.0.12", + "thiserror 2.0.14", "tokio", "tokio-stream", "tracing", @@ -5884,57 +7176,12 @@ dependencies = [ "serde_json", "sha2 0.10.9", "sqlx-core", - "sqlx-mysql", "sqlx-postgres", - "sqlx-sqlite", "syn 2.0.104", "tokio", "url", ] -[[package]] -name = "sqlx-mysql" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa003f0038df784eb8fecbbac13affe3da23b45194bd57dba231c8f48199c526" -dependencies = [ - "atoi", - "base64 0.22.1", - "bitflags 2.9.1", - "byteorder", - "bytes", - "chrono", - "crc", - "digest 0.10.7", - "dotenvy", - "either", - "futures-channel", - "futures-core", - "futures-io", - "futures-util", - "generic-array", - "hex", - "hkdf", - "hmac", - "itoa", - "log", - "md-5", - "memchr", - "once_cell", - "percent-encoding", - "rand 0.8.5", - "rsa", - "serde", - "sha1", - "sha2 0.10.9", - "smallvec", - "sqlx-core", - "stringprep", - "thiserror 2.0.12", - "tracing", - "whoami", -] - [[package]] name = "sqlx-postgres" version = "0.8.6" @@ -5945,7 +7192,6 @@ dependencies = [ "base64 0.22.1", "bitflags 2.9.1", "byteorder", - "chrono", "crc", "dotenvy", "etcetera", @@ -5968,36 +7214,11 @@ dependencies = [ "smallvec", "sqlx-core", "stringprep", - "thiserror 2.0.12", + "thiserror 2.0.14", "tracing", "whoami", ] -[[package]] -name = "sqlx-sqlite" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2d12fe70b2c1b4401038055f90f151b78208de1f9f89a7dbfd41587a10c3eea" -dependencies = [ - "atoi", - "chrono", - "flume", - "futures-channel", - "futures-core", - "futures-executor", - "futures-intrusive", - "futures-util", - "libsqlite3-sys", - "log", - "percent-encoding", - "serde", - "serde_urlencoded", - "sqlx-core", - "thiserror 2.0.12", - "tracing", - "url", -] - [[package]] name = "sscanf" version = "0.4.1" @@ -6078,6 +7299,7 @@ name = "start-os" version = "0.4.0-alpha.10" dependencies = [ "aes 0.7.5", + "arti-client", "async-acme", "async-compression", "async-stream", @@ -6085,7 +7307,7 @@ dependencies = [ "axum 0.8.4", "backhand", "barrage", - "base32 0.5.1", + "base32", "base64 0.22.1", "base64ct", "basic-cookies", @@ -6103,6 +7325,7 @@ dependencies = [ "der", "digest 0.10.7", "divrem", + "dns-lookup", "ed25519 2.2.3", "ed25519-dalek 1.0.1", "ed25519-dalek 2.2.0", @@ -6113,13 +7336,15 @@ dependencies = [ "gpt", "helpers", "hex", + "hickory-client", + "hickory-server", "hmac", "http", "http-body-util", "hyper", "hyper-util", "id-pool", - "imbl 6.0.0 (git+https://github.com/dr-bonez/imbl.git?branch=bugfix%2Fordmap-lifetimes)", + "imbl", "imbl-value 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "include_dir", "indexmap 2.10.0", @@ -6168,9 +7393,10 @@ dependencies = [ "rpassword", "rpc-toolkit", "rust-argon2", - "rustls 0.23.29", + "rustls 0.23.31", "rustls-pki-types", "rustyline-async", + "safelog", "semver", "serde", "serde_json", @@ -6182,14 +7408,14 @@ dependencies = [ "shell-words", "signal-hook", "simple-logging", - "socket2 0.5.10", + "socket2 0.6.0", "sqlx", "sscanf", "ssh-key", "tar", "termion", "textwrap", - "thiserror 2.0.12", + "thiserror 2.0.14", "tokio", "tokio-rustls 0.26.2", "tokio-socks", @@ -6197,16 +7423,18 @@ dependencies = [ "tokio-tar", "tokio-tungstenite", "tokio-util", - "toml 0.8.23", - "torut", + "toml", + "tor-hscrypto", + "tor-hsservice", + "tor-keymgr", + "tor-llcrypto", + "tor-rtcompat", "tower-service", "tracing", "tracing-error", "tracing-futures", "tracing-journald", "tracing-subscriber", - "trust-dns-client", - "trust-dns-server", "ts-rs", "typed-builder", "unix-named-pipe", @@ -6231,7 +7459,7 @@ checksum = "bf776ba3fa74f83bf4b63c3dcbbf82173db2632ed8452cb2d891d33f459de70f" dependencies = [ "new_debug_unreachable", "parking_lot", - "phf_shared", + "phf_shared 0.11.3", "precomputed-hash", ] @@ -6258,6 +7486,27 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" +[[package]] +name = "strum" +version = "0.27.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af23d6f6c1a224baef9d3f61e287d2761385a5b88fdab4eb4c6f11aeb54c4bcf" +dependencies = [ + "strum_macros", +] + +[[package]] +name = "strum_macros" +version = "0.27.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7695ce3845ea4b33927c055a39dc438a45b059f7c1b3d91d38d10355fb8cbca7" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "syn 2.0.104", +] + [[package]] name = "subtle" version = "2.6.1" @@ -6306,6 +7555,20 @@ dependencies = [ "syn 2.0.104", ] +[[package]] +name = "sysinfo" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "252800745060e7b9ffb7b2badbd8b31cfa4aa2e61af879d0a3bf2a317c20217d" +dependencies = [ + "libc", + "memchr", + "ntapi", + "objc2-core-foundation", + "objc2-io-kit", + "windows", +] + [[package]] name = "system-configuration" version = "0.6.1" @@ -6421,11 +7684,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.12" +version = "2.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" +checksum = "0b0949c3a6c842cbde3f1686d6eea5a010516deb7085f79db747562d4102f41e" dependencies = [ - "thiserror-impl 2.0.12", + "thiserror-impl 2.0.14", ] [[package]] @@ -6441,9 +7704,9 @@ dependencies = [ [[package]] name = "thiserror-impl" -version = "2.0.12" +version = "2.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" +checksum = "cc5b44b4ab9c2fdd0e0512e6bece8388e214c0749f5862b114cc5b7a25daf227" dependencies = [ "proc-macro2", "quote", @@ -6520,6 +7783,16 @@ dependencies = [ "zerovec", ] +[[package]] +name = "tinytemplate" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc" +dependencies = [ + "serde", + "serde_json", +] + [[package]] name = "tinyvec" version = "1.9.0" @@ -6537,9 +7810,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.46.1" +version = "1.47.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cc3a2344dafbe23a245241fe8b09735b521110d30fcefbbd5feb1797ca35d17" +checksum = "89e49afdadebb872d3145a5638b59eb0691ea23e46ca484037cfab3b76b95038" dependencies = [ "backtrace", "bytes", @@ -6550,10 +7823,10 @@ dependencies = [ "pin-project-lite", "signal-hook-registry", "slab", - "socket2 0.5.10", + "socket2 0.6.0", "tokio-macros", "tracing", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -6604,7 +7877,7 @@ version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e727b36a1a0e8b74c376ac2211e40c2c8af09fb4013c60d910495810f008e9b" dependencies = [ - "rustls 0.23.29", + "rustls 0.23.31", "tokio", ] @@ -6662,29 +7935,18 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.15" +version = "0.7.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66a539a9ad6d5d281510d5bd368c973d636c02dbf8a67300bfb6b950696ad7df" +checksum = "14307c986784f72ef81c89db7d9e28d6ac26d16213b109ea501696195e6e3ce5" dependencies = [ "bytes", "futures-core", + "futures-io", "futures-sink", "pin-project-lite", "tokio", ] -[[package]] -name = "toml" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" -dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit 0.19.15", -] - [[package]] name = "toml" version = "0.8.23" @@ -6694,7 +7956,7 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.27", + "toml_edit", ] [[package]] @@ -6706,19 +7968,6 @@ dependencies = [ "serde", ] -[[package]] -name = "toml_edit" -version = "0.19.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" -dependencies = [ - "indexmap 2.10.0", - "serde", - "serde_spanned", - "toml_datetime", - "winnow 0.5.40", -] - [[package]] name = "toml_edit" version = "0.22.27" @@ -6730,7 +7979,7 @@ dependencies = [ "serde_spanned", "toml_datetime", "toml_write", - "winnow 0.7.12", + "winnow", ] [[package]] @@ -6770,22 +8019,1073 @@ dependencies = [ ] [[package]] -name = "torut" -version = "0.2.1" -source = "git+https://github.com/Start9Labs/torut.git?branch=update%2Fdependencies#cc7a1425a01214465e106975e6690794d8551bdb" +name = "tor-async-utils" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28240d2b739ecba7514c92c0e42f2b5b81a95b5286366bdb2c2f8ef526a5578c" dependencies = [ - "base32 0.4.0", - "base64 0.21.7", - "derive_more 0.99.20", - "ed25519-dalek 1.0.1", + "derive-deftly 1.2.0", + "educe", + "futures", + "oneshot-fused-workaround", + "pin-project", + "postage", + "thiserror 2.0.14", + "void", +] + +[[package]] +name = "tor-basic-utils" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55f86a4e4768d337df0e1189eb229c1c27125e86282fabdef89088e1f0be9107" +dependencies = [ + "derive_more", "hex", - "hmac", - "rand 0.7.3", + "itertools 0.14.0", + "libc", + "paste", + "rand 0.9.2", + "rand_chacha 0.9.0", "serde", - "serde_derive", + "slab", + "smallvec", + "thiserror 2.0.14", +] + +[[package]] +name = "tor-bytes" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d08b5b2e93fd21a4aaa9a3867962ea82f5dc830522737183abb514bdeae9fc9" +dependencies = [ + "bytes", + "derive-deftly 1.2.0", + "digest 0.10.7", + "educe", + "getrandom 0.3.3", + "safelog", + "thiserror 2.0.14", + "tor-error", + "tor-llcrypto", + "zeroize", +] + +[[package]] +name = "tor-cell" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60677bfa808c00539df7f8276facd59f92e5d0bd22ee8e5bdc1ab6a14632db41" +dependencies = [ + "amplify", + "bitflags 2.9.1", + "bytes", + "caret", + "derive-deftly 1.2.0", + "derive_more", + "educe", + "paste", + "rand 0.9.2", + "smallvec", + "thiserror 2.0.14", + "tor-basic-utils", + "tor-bytes", + "tor-cert", + "tor-error", + "tor-hscrypto", + "tor-linkspec", + "tor-llcrypto", + "tor-memquota", + "tor-protover", + "tor-units", + "void", +] + +[[package]] +name = "tor-cert" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abd81384d03705336b9fb7ecf152e4f61b2e0a0cb1adbd9bbd116b46a010e230" +dependencies = [ + "caret", + "derive_builder_fork_arti", + "derive_more", + "digest 0.10.7", + "thiserror 2.0.14", + "tor-bytes", + "tor-checkable", + "tor-llcrypto", +] + +[[package]] +name = "tor-chanmgr" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74322fa01b09b3839903da1e7f443b2cf8aecd31f0cfd5395253ddad473b4ef3" +dependencies = [ + "async-trait", + "caret", + "derive_builder_fork_arti", + "derive_more", + "educe", + "futures", + "oneshot-fused-workaround", + "postage", + "rand 0.9.2", + "safelog", + "serde", + "thiserror 2.0.14", + "tor-async-utils", + "tor-basic-utils", + "tor-cell", + "tor-config", + "tor-error", + "tor-linkspec", + "tor-llcrypto", + "tor-memquota", + "tor-netdir", + "tor-proto", + "tor-rtcompat", + "tor-socksproto", + "tor-units", + "tracing", + "void", +] + +[[package]] +name = "tor-checkable" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5703d370d4ee4b5c318ac8b944a3b183e2865f6f0104475d36b9e1b8c89f0f38" +dependencies = [ + "humantime", + "signature 2.2.0", + "thiserror 2.0.14", + "tor-llcrypto", +] + +[[package]] +name = "tor-circmgr" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f8f6d0e84dcf5fa3761e55fe8bb75725e699ee03e3b37bbd06e6421e9961fbd" +dependencies = [ + "amplify", + "async-trait", + "bounded-vec-deque", + "cfg-if", + "derive_builder_fork_arti", + "derive_more", + "downcast-rs", + "dyn-clone", + "educe", + "futures", + "humantime-serde", + "itertools 0.14.0", + "once_cell", + "oneshot-fused-workaround", + "pin-project", + "rand 0.9.2", + "retry-error", + "safelog", + "serde", + "static_assertions", + "thiserror 2.0.14", + "tor-async-utils", + "tor-basic-utils", + "tor-chanmgr", + "tor-config", + "tor-error", + "tor-geoip", + "tor-guardmgr", + "tor-linkspec", + "tor-memquota", + "tor-netdir", + "tor-netdoc", + "tor-persist", + "tor-proto", + "tor-protover", + "tor-relay-selection", + "tor-rtcompat", + "tor-units", + "tracing", + "void", + "weak-table", +] + +[[package]] +name = "tor-config" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3852d0e3a6ca41ab9fed79fa4cb89347bdb24bcd5f6665f506a10b993ac24e8b" +dependencies = [ + "amplify", + "cfg-if", + "derive-deftly 1.2.0", + "derive_builder_fork_arti", + "educe", + "either", + "figment", + "fs-mistrust", + "futures", + "itertools 0.14.0", + "notify", + "paste", + "postage", + "regex", + "serde", + "serde-value", + "serde_ignored", + "strum", + "thiserror 2.0.14", + "toml", + "tor-basic-utils", + "tor-error", + "tor-rtcompat", + "tracing", + "void", +] + +[[package]] +name = "tor-config-path" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf19ba283027eb8d8c441eec743d2c73c971c4b22c9830aae87163e8fcdc334e" +dependencies = [ + "directories", + "serde", + "shellexpand", + "thiserror 2.0.14", + "tor-error", + "tor-general-addr", +] + +[[package]] +name = "tor-consdiff" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5164757c908a50737ebd483a0e29380e53db0b14103f7996751e28964c6d98a" +dependencies = [ + "digest 0.10.7", + "hex", + "thiserror 2.0.14", + "tor-llcrypto", +] + +[[package]] +name = "tor-dirclient" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a411a66d9a5f41b2e85e8defb17a3641d5827f168e4b175a28db9b987125843f" +dependencies = [ + "async-compression", + "base64ct", + "derive_more", + "futures", + "hex", + "http", + "httparse", + "httpdate", + "itertools 0.14.0", + "memchr", + "thiserror 2.0.14", + "tor-circmgr", + "tor-error", + "tor-hscrypto", + "tor-linkspec", + "tor-llcrypto", + "tor-netdoc", + "tor-proto", + "tor-rtcompat", + "tracing", +] + +[[package]] +name = "tor-dirmgr" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c74b75377747b13d338c8ab29c5de44f4485c04c492a15edebed61110e24299" +dependencies = [ + "async-trait", + "base64ct", + "derive_builder_fork_arti", + "derive_more", + "digest 0.10.7", + "educe", + "event-listener 5.4.1", + "fs-mistrust", + "fslock", + "futures", + "hex", + "humantime", + "humantime-serde", + "itertools 0.14.0", + "memmap2", + "oneshot-fused-workaround", + "paste", + "postage", + "rand 0.9.2", + "rusqlite", + "safelog", + "scopeguard", + "serde", + "serde_json", + "signature 2.2.0", + "static_assertions", + "strum", + "thiserror 2.0.14", + "time", + "tor-async-utils", + "tor-basic-utils", + "tor-checkable", + "tor-circmgr", + "tor-config", + "tor-consdiff", + "tor-dirclient", + "tor-error", + "tor-geoip", + "tor-guardmgr", + "tor-llcrypto", + "tor-netdir", + "tor-netdoc", + "tor-persist", + "tor-proto", + "tor-protover", + "tor-rtcompat", + "tracing", +] + +[[package]] +name = "tor-error" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5566edb4beb34d7be7bc4fc2f653a5119a3ccade26a9237912e53d4f4029e83" +dependencies = [ + "derive_more", + "futures", + "paste", + "retry-error", + "static_assertions", + "strum", + "thiserror 2.0.14", + "tracing", + "void", +] + +[[package]] +name = "tor-general-addr" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc9d4a8c4593a0c590c66bae348590fb49dbf04da264cacc0631d71a92e5d2ac" +dependencies = [ + "arbitrary", + "derive_more", + "thiserror 2.0.14", + "void", +] + +[[package]] +name = "tor-geoip" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e35eae499db1fc43ad1cb65fe113dcd6c064350d85f39c0530dc4a06b43d19ed" +dependencies = [ + "derive_more", + "rangemap", + "thiserror 2.0.14", +] + +[[package]] +name = "tor-guardmgr" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aef0ad8a7ba30210b9c5664e10c423cc19f83d55fafdf1c84097be3a01d0dacd" +dependencies = [ + "amplify", + "base64ct", + "derive-deftly 1.2.0", + "derive_builder_fork_arti", + "derive_more", + "dyn-clone", + "educe", + "futures", + "humantime", + "humantime-serde", + "itertools 0.14.0", + "num_enum", + "oneshot-fused-workaround", + "pin-project", + "postage", + "rand 0.9.2", + "safelog", + "serde", + "strum", + "thiserror 2.0.14", + "tor-async-utils", + "tor-basic-utils", + "tor-config", + "tor-error", + "tor-linkspec", + "tor-llcrypto", + "tor-netdir", + "tor-netdoc", + "tor-persist", + "tor-proto", + "tor-protover", + "tor-relay-selection", + "tor-rtcompat", + "tor-rtmock", + "tor-units", + "tracing", +] + +[[package]] +name = "tor-hsclient" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a0ed4b8790cf8849d10c7ff13db3ec570c2a4aec68331dfe6e1f05d2987d40d" +dependencies = [ + "async-trait", + "derive-deftly 1.2.0", + "derive_more", + "educe", + "either", + "futures", + "itertools 0.14.0", + "oneshot-fused-workaround", + "postage", + "rand 0.9.2", + "retry-error", + "safelog", + "slotmap-careful", + "strum", + "thiserror 2.0.14", + "tor-async-utils", + "tor-basic-utils", + "tor-bytes", + "tor-cell", + "tor-checkable", + "tor-circmgr", + "tor-config", + "tor-dirclient", + "tor-error", + "tor-hscrypto", + "tor-keymgr", + "tor-linkspec", + "tor-llcrypto", + "tor-memquota", + "tor-netdir", + "tor-netdoc", + "tor-persist", + "tor-proto", + "tor-protover", + "tor-rtcompat", + "tracing", +] + +[[package]] +name = "tor-hscrypto" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "163e60a7c8069ea8d8a3031be8620047b21cbed7d535fd9f1662daae7803ccd6" +dependencies = [ + "cipher 0.4.4", + "data-encoding", + "derive-deftly 1.2.0", + "derive_more", + "digest 0.10.7", + "equix", + "hex", + "humantime", + "itertools 0.14.0", + "paste", + "rand 0.9.2", + "safelog", + "serde", + "signature 2.2.0", + "subtle", + "thiserror 2.0.14", + "tor-basic-utils", + "tor-bytes", + "tor-error", + "tor-key-forge", + "tor-llcrypto", + "tor-memquota", + "tor-units", + "void", + "zeroize", +] + +[[package]] +name = "tor-hsservice" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e736178aed67cc200ab84b35b5c9d116a8ed42c2dc2eeaa7ada1828116da500d" +dependencies = [ + "amplify", + "async-trait", + "base64ct", + "cfg-if", + "derive-deftly 1.2.0", + "derive_builder_fork_arti", + "derive_more", + "digest 0.10.7", + "educe", + "fs-mistrust", + "futures", + "growable-bloom-filter", + "hex", + "humantime", + "itertools 0.14.0", + "k12", + "once_cell", + "oneshot-fused-workaround", + "postage", + "rand 0.9.2", + "rand_core 0.9.3", + "retry-error", + "safelog", + "serde", + "serde_with", + "strum", + "thiserror 2.0.14", + "tor-async-utils", + "tor-basic-utils", + "tor-bytes", + "tor-cell", + "tor-checkable", + "tor-circmgr", + "tor-config", + "tor-config-path", + "tor-dirclient", + "tor-error", + "tor-hscrypto", + "tor-keymgr", + "tor-linkspec", + "tor-llcrypto", + "tor-log-ratelim", + "tor-netdir", + "tor-netdoc", + "tor-persist", + "tor-proto", + "tor-protover", + "tor-relay-selection", + "tor-rtcompat", + "tracing", + "void", +] + +[[package]] +name = "tor-key-forge" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b1ddfa5126b2619a9f27b5c5d1a360acf41f15d99ced37af1f30fc449c65889" +dependencies = [ + "derive-deftly 1.2.0", + "derive_more", + "downcast-rs", + "paste", + "rand 0.9.2", + "signature 2.2.0", + "ssh-key", + "thiserror 2.0.14", + "tor-bytes", + "tor-cert", + "tor-checkable", + "tor-error", + "tor-llcrypto", +] + +[[package]] +name = "tor-keymgr" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26e8e0222d2ac27bd8bf4848cd46371fdc72d820940eb38f3d8da616176b3d39" +dependencies = [ + "amplify", + "arrayvec 0.7.6", + "cfg-if", + "derive-deftly 1.2.0", + "derive_builder_fork_arti", + "derive_more", + "downcast-rs", + "dyn-clone", + "fs-mistrust", + "glob-match", + "humantime", + "inventory", + "itertools 0.14.0", + "rand 0.9.2", + "safelog", + "serde", + "signature 2.2.0", + "ssh-key", + "thiserror 2.0.14", + "tor-basic-utils", + "tor-bytes", + "tor-config", + "tor-config-path", + "tor-error", + "tor-hscrypto", + "tor-key-forge", + "tor-llcrypto", + "tor-persist", + "tracing", + "visibility", + "walkdir", + "zeroize", +] + +[[package]] +name = "tor-linkspec" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e6eab944bf3096b1964cbb0f4a3605c1376a35bdfa9d44512464474ffb8e53c" +dependencies = [ + "base64ct", + "by_address", + "caret", + "derive-deftly 1.2.0", + "derive_builder_fork_arti", + "derive_more", + "hex", + "itertools 0.14.0", + "safelog", + "serde", + "serde_with", + "strum", + "thiserror 2.0.14", + "tor-basic-utils", + "tor-bytes", + "tor-config", + "tor-llcrypto", + "tor-memquota", + "tor-protover", +] + +[[package]] +name = "tor-llcrypto" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b92fa9a99a066f06cd266287f6f89270c010693cce3c4c2fa38c27abfcda5fb" +dependencies = [ + "aes 0.8.4", + "base64ct", + "ctr 0.9.2", + "curve25519-dalek 4.1.3", + "der-parser 10.0.0", + "derive-deftly 1.2.0", + "derive_more", + "digest 0.10.7", + "ed25519-dalek 2.2.0", + "educe", + "getrandom 0.3.3", + "hex", + "rand 0.9.2", + "rand_chacha 0.9.0", + "rand_core 0.6.4", + "rand_core 0.9.3", + "rand_jitter", + "rdrand", + "rsa", + "safelog", + "serde", + "sha1", "sha2 0.10.9", "sha3", + "signature 2.2.0", + "subtle", + "thiserror 2.0.14", + "tor-memquota", + "visibility", + "x25519-dalek", + "zeroize", +] + +[[package]] +name = "tor-log-ratelim" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fc97bd804ac7aeaf771dc4507c65f8c5fac1d4f8e469551aaa3bf240fce1171" +dependencies = [ + "futures", + "humantime", + "thiserror 2.0.14", + "tor-error", + "tor-rtcompat", + "tracing", + "weak-table", +] + +[[package]] +name = "tor-memquota" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f015b156dc186601f46b3f89ebd6ace49ef3b142c9a5004559e5d75a6477cc1f" +dependencies = [ + "cfg-if", + "derive-deftly 1.2.0", + "derive_more", + "dyn-clone", + "educe", + "futures", + "itertools 0.14.0", + "paste", + "pin-project", + "serde", + "slotmap-careful", + "static_assertions", + "sysinfo", + "thiserror 2.0.14", + "tor-async-utils", + "tor-basic-utils", + "tor-config", + "tor-error", + "tor-log-ratelim", + "tor-rtcompat", + "tracing", + "void", +] + +[[package]] +name = "tor-netdir" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7874878d0c579e7b1dea5947581a5f2d4ba350af2a20b1946350ef9ace16ebe1" +dependencies = [ + "async-trait", + "bitflags 2.9.1", + "derive_more", + "digest 0.10.7", + "futures", + "hex", + "humantime", + "itertools 0.14.0", + "num_enum", + "rand 0.9.2", + "serde", + "static_assertions", + "strum", + "thiserror 2.0.14", + "time", + "tor-basic-utils", + "tor-error", + "tor-geoip", + "tor-hscrypto", + "tor-linkspec", + "tor-llcrypto", + "tor-netdoc", + "tor-protover", + "tor-units", + "tracing", + "typed-index-collections", +] + +[[package]] +name = "tor-netdoc" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ea853a14cb2011b9f4c45641323e19fbad13010d638dd3d84502e0decf9db0b" +dependencies = [ + "amplify", + "base64ct", + "bitflags 2.9.1", + "cipher 0.4.4", + "derive_builder_fork_arti", + "derive_more", + "digest 0.10.7", + "educe", + "hex", + "humantime", + "itertools 0.14.0", + "memchr", + "phf", + "rand 0.9.2", + "serde", + "serde_with", + "signature 2.2.0", + "smallvec", + "subtle", + "thiserror 2.0.14", + "time", + "tinystr", + "tor-basic-utils", + "tor-bytes", + "tor-cell", + "tor-cert", + "tor-checkable", + "tor-error", + "tor-hscrypto", + "tor-linkspec", + "tor-llcrypto", + "tor-protover", + "tor-units", + "void", + "weak-table", + "zeroize", +] + +[[package]] +name = "tor-persist" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e899d9dd8104fae50c33f15e00a1515bee15683ff0017cfc003315fcd6a195d6" +dependencies = [ + "amplify", + "derive-deftly 1.2.0", + "derive_more", + "filetime", + "fs-mistrust", + "fslock", + "fslock-guard", + "futures", + "itertools 0.14.0", + "oneshot-fused-workaround", + "paste", + "sanitize-filename", + "serde", + "serde_json", + "thiserror 2.0.14", + "time", + "tor-async-utils", + "tor-basic-utils", + "tor-error", + "tracing", + "void", +] + +[[package]] +name = "tor-proto" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08f8d03310fadbc44e9544777a0bb5a7364564798d2236f00db3c337fb25987" +dependencies = [ + "amplify", + "asynchronous-codec", + "bitvec 1.0.1", + "bytes", + "caret", + "cfg-if", + "cipher 0.4.4", + "coarsetime", + "criterion-cycles-per-byte", + "derive-deftly 1.2.0", + "derive_builder_fork_arti", + "derive_more", + "digest 0.10.7", + "educe", + "futures", + "futures-util", + "hkdf", + "hmac", + "itertools 0.14.0", + "oneshot-fused-workaround", + "pin-project", + "postage", + "rand 0.9.2", + "rand_core 0.9.3", + "safelog", + "slotmap-careful", + "smallvec", + "static_assertions", + "subtle", + "sync_wrapper", + "thiserror 2.0.14", "tokio", + "tokio-util", + "tor-async-utils", + "tor-basic-utils", + "tor-bytes", + "tor-cell", + "tor-cert", + "tor-checkable", + "tor-config", + "tor-error", + "tor-hscrypto", + "tor-linkspec", + "tor-llcrypto", + "tor-log-ratelim", + "tor-memquota", + "tor-protover", + "tor-rtcompat", + "tor-rtmock", + "tor-units", + "tracing", + "typenum", + "visibility", + "void", + "zeroize", +] + +[[package]] +name = "tor-protover" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fcc72e258205ca0511bdc84801748c59dd5d7accfd080d909afd11f6b8be182" +dependencies = [ + "caret", + "paste", + "serde_with", + "thiserror 2.0.14", + "tor-bytes", +] + +[[package]] +name = "tor-ptmgr" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a5f226fd8436d1561ac111d97a7162ba4eed50c5e0791818508b5d1bd511e69" +dependencies = [ + "async-trait", + "cfg-if", + "derive_builder_fork_arti", + "fs-mistrust", + "futures", + "itertools 0.14.0", + "oneshot-fused-workaround", + "serde", + "thiserror 2.0.14", + "tor-async-utils", + "tor-basic-utils", + "tor-chanmgr", + "tor-config", + "tor-config-path", + "tor-error", + "tor-linkspec", + "tor-rtcompat", + "tor-socksproto", + "tracing", +] + +[[package]] +name = "tor-relay-selection" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a19816299f125c71bd4ba59be8ea425256aa4494b6a3d39bdb9ccbc385722a70" +dependencies = [ + "rand 0.9.2", + "serde", + "tor-basic-utils", + "tor-geoip", + "tor-linkspec", + "tor-netdir", + "tor-netdoc", +] + +[[package]] +name = "tor-rpcbase" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "907a2747d5e4955e0ca96c81cadf401d2c11aafbbb05ac1c9f8d8a11eb23c950" +dependencies = [ + "derive-deftly 1.2.0", + "derive_more", + "downcast-rs", + "erased-serde", + "futures", + "futures-await-test", + "inventory", + "paste", + "serde", + "thiserror 2.0.14", + "tor-async-utils", + "tor-error", + "typetag", + "void", +] + +[[package]] +name = "tor-rtcompat" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9545fa3b1420df5b165e6bad6537b7202c533311431cabc84ff1908fbca3908" +dependencies = [ + "arbitrary", + "async-io", + "async-native-tls", + "async-std", + "async-trait", + "async_executors", + "asynchronous-codec", + "coarsetime", + "derive_more", + "dyn-clone", + "educe", + "futures", + "futures-rustls 0.26.0", + "hex", + "libc", + "native-tls", + "paste", + "pin-project", + "rustls-pki-types", + "rustls-webpki 0.103.4", + "thiserror 2.0.14", + "tokio", + "tokio-util", + "tor-error", + "tor-general-addr", + "tracing", + "void", +] + +[[package]] +name = "tor-rtmock" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a6ca08427dff9e7a22aa08d8c680c56231ce9b6afa35125e8a9a78f6b8e2890" +dependencies = [ + "amplify", + "assert_matches", + "async-trait", + "derive-deftly 1.2.0", + "derive_more", + "educe", + "futures", + "humantime", + "itertools 0.14.0", + "oneshot-fused-workaround", + "pin-project", + "priority-queue", + "slotmap-careful", + "strum", + "thiserror 2.0.14", + "tor-error", + "tor-general-addr", + "tor-rtcompat", + "tracing", + "tracing-test", + "void", +] + +[[package]] +name = "tor-socksproto" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5b33285d16e5695b6aba7c9656387ab0c662781e2911376887b8b61d1a3d2b2" +dependencies = [ + "amplify", + "caret", + "derive-deftly 1.2.0", + "educe", + "safelog", + "subtle", + "thiserror 2.0.14", + "tor-bytes", + "tor-error", +] + +[[package]] +name = "tor-units" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40e61ae922f0f0209338d63afd4b1b4ba780313b427a54dda212ca3853845578" +dependencies = [ + "derive-deftly 1.2.0", + "derive_more", + "serde", + "thiserror 2.0.14", + "tor-memquota", ] [[package]] @@ -6948,69 +9248,24 @@ dependencies = [ ] [[package]] -name = "trust-dns-client" -version = "0.23.2" +name = "tracing-test" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14135e72c7e6d4c9b6902d4437881a8598f0145dbb2e3f86f92dbad845b61e63" +checksum = "557b891436fe0d5e0e363427fc7f217abf9ccd510d5136549847bdcbcd011d68" dependencies = [ - "cfg-if", - "data-encoding", - "futures-channel", - "futures-util", - "once_cell", - "radix_trie", - "rand 0.8.5", - "thiserror 1.0.69", - "tokio", - "tracing", - "trust-dns-proto", + "tracing-core", + "tracing-subscriber", + "tracing-test-macro", ] [[package]] -name = "trust-dns-proto" -version = "0.23.2" +name = "tracing-test-macro" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3119112651c157f4488931a01e586aa459736e9d6046d3bd9105ffb69352d374" +checksum = "04659ddb06c87d233c566112c1c9c5b9e98256d9af50ec3bc9c8327f873a7568" dependencies = [ - "async-trait", - "cfg-if", - "data-encoding", - "enum-as-inner", - "futures-channel", - "futures-io", - "futures-util", - "idna 0.4.0", - "ipnet", - "once_cell", - "rand 0.8.5", - "smallvec", - "thiserror 1.0.69", - "tinyvec", - "tokio", - "tracing", - "url", -] - -[[package]] -name = "trust-dns-server" -version = "0.23.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c540f73c2b2ec2f6c54eabd0900e7aafb747a820224b742f556e8faabb461bc7" -dependencies = [ - "async-trait", - "bytes", - "cfg-if", - "drain", - "enum-as-inner", - "futures-executor", - "futures-util", - "serde", - "thiserror 1.0.69", - "time", - "tokio", - "toml 0.7.8", - "tracing", - "trust-dns-proto", + "quote", + "syn 2.0.104", ] [[package]] @@ -7054,37 +9309,77 @@ dependencies = [ "native-tls", "rand 0.9.2", "sha1", - "thiserror 2.0.12", + "thiserror 2.0.14", "url", "utf-8", ] [[package]] name = "typed-builder" -version = "0.21.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce63bcaf7e9806c206f7d7b9c1f38e0dce8bb165a80af0898161058b19248534" +checksum = "478cb2887fa0a15be611e4dc0e900f693c31f1add497ac8794a24cd512a22df9" dependencies = [ "typed-builder-macro", ] [[package]] name = "typed-builder-macro" -version = "0.21.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60d8d828da2a3d759d3519cdf29a5bac49c77d039ad36d0782edadbf9cd5415b" +checksum = "6a840d281b4e2b22f6ca51168a373c06e7044e06420f0f12fe0e7b62c28df2f8" dependencies = [ "proc-macro2", "quote", "syn 2.0.104", ] +[[package]] +name = "typed-index-collections" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fd393dbd1e7b23e0cab7396570309b4068aa504e9dac2cd41d827583b4e9ab7" +dependencies = [ + "bincode 2.0.1", + "serde", +] + +[[package]] +name = "typeid" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c" + [[package]] name = "typenum" version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f" +[[package]] +name = "typetag" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73f22b40dd7bfe8c14230cf9702081366421890435b2d625fa92b4acc4c3de6f" +dependencies = [ + "erased-serde", + "inventory", + "once_cell", + "serde", + "typetag-impl", +] + +[[package]] +name = "typetag-impl" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35f5380909ffc31b4de4f4bdf96b877175a016aa2ca98cee39fcfd8c4d53d952" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + [[package]] name = "ucd-trie" version = "0.1.7" @@ -7108,6 +9403,15 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" +[[package]] +name = "uncased" +version = "0.9.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1b88fcfe09e89d3866a5c11019378088af2d24c3fbd4f0543f96b479ec90697" +dependencies = [ + "version_check", +] + [[package]] name = "unicase" version = "2.8.1" @@ -7200,7 +9504,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" dependencies = [ "form_urlencoded", - "idna 1.0.3", + "idna", "percent-encoding", "serde", ] @@ -7231,9 +9535,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.17.0" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cf4199d1e5d15ddd86a694e4d0dffa9c323ce759fea589f00fef9d81cc1931d" +checksum = "f33196643e165781c20a5ead5582283a7dacbb87855d867fbc2df3f81eddc1be" dependencies = [ "getrandom 0.3.3", "js-sys", @@ -7246,6 +9550,12 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" +[[package]] +name = "value-bag" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "943ce29a8a743eb10d6082545d861b24f9d1b160b7d741e0f2cdf726bec909c5" + [[package]] name = "vcpkg" version = "0.2.15" @@ -7264,6 +9574,23 @@ version = "0.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "051eb1abcf10076295e815102942cc58f9d5e3b4560e46e53c21e8ff6f3af7b1" +[[package]] +name = "visibility" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d674d135b4a8c1d7e813e2f8d1c9a58308aee4a680323066025e53132218bd91" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "void" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" + [[package]] name = "wait-timeout" version = "0.2.1" @@ -7319,6 +9646,15 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" +[[package]] +name = "wasix" +version = "0.12.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1fbb4ef9bbca0c1170e0b00dd28abc9e3b68669821600cad1caaed606583c6d" +dependencies = [ + "wasi 0.11.1+wasi-snapshot-preview1", +] + [[package]] name = "wasm-bindgen" version = "0.2.100" @@ -7403,6 +9739,12 @@ dependencies = [ "web-sys", ] +[[package]] +name = "weak-table" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "323f4da9523e9a669e1eaf9c6e763892769b1d38c623913647bfdc1532fe4549" + [[package]] name = "web-sys" version = "0.3.77" @@ -7455,11 +9797,11 @@ dependencies = [ [[package]] name = "whoami" -version = "1.6.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6994d13118ab492c3c80c1f81928718159254c53c472bf9ce36f8dae4add02a7" +checksum = "5d4a4db5077702ca3015d3d02d74974948aba2ad9e12ab7df718ee64ccd7e97d" dependencies = [ - "redox_syscall 0.5.15", + "libredox", "wasite", ] @@ -7500,6 +9842,28 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows" +version = "0.61.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9babd3a767a4c1aef6900409f85f5d53ce2544ccdfaa86dad48c91782c6d6893" +dependencies = [ + "windows-collections", + "windows-core", + "windows-future", + "windows-link", + "windows-numerics", +] + +[[package]] +name = "windows-collections" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3beeceb5e5cfd9eb1d76b381630e82c4241ccd0d27f1a39ed41b2760b255c5e8" +dependencies = [ + "windows-core", +] + [[package]] name = "windows-core" version = "0.61.2" @@ -7513,6 +9877,17 @@ dependencies = [ "windows-strings", ] +[[package]] +name = "windows-future" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e" +dependencies = [ + "windows-core", + "windows-link", + "windows-threading", +] + [[package]] name = "windows-implement" version = "0.60.0" @@ -7541,6 +9916,16 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" +[[package]] +name = "windows-numerics" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1" +dependencies = [ + "windows-core", + "windows-link", +] + [[package]] name = "windows-registry" version = "0.5.3" @@ -7603,7 +9988,7 @@ version = "0.60.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" dependencies = [ - "windows-targets 0.53.2", + "windows-targets 0.53.3", ] [[package]] @@ -7639,10 +10024,11 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.53.2" +version = "0.53.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c66f69fcc9ce11da9966ddb31a40968cad001c5bedeb5c2b82ede4253ab48aef" +checksum = "d5fe6031c4041849d7c496a8ded650796e7b6ecc19df1a431c1a363342e5dc91" dependencies = [ + "windows-link", "windows_aarch64_gnullvm 0.53.0", "windows_aarch64_msvc 0.53.0", "windows_i686_gnu 0.53.0", @@ -7653,6 +10039,15 @@ dependencies = [ "windows_x86_64_msvc 0.53.0", ] +[[package]] +name = "windows-threading" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b66463ad2e0ea3bbf808b7f1d371311c80e115c0b71d60efc142cafbcfb057a6" +dependencies = [ + "windows-link", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.48.5" @@ -7791,15 +10186,6 @@ version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" -[[package]] -name = "winnow" -version = "0.5.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" -dependencies = [ - "memchr", -] - [[package]] name = "winnow" version = "0.7.12" @@ -7849,15 +10235,27 @@ 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 4.1.3", + "rand_core 0.6.4", + "serde", + "zeroize", +] + [[package]] name = "x509-parser" version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcbc162f30700d6f3f82a24bf7cc62ffe7caea42c0b2cba8bf7f3ae50cf51f69" dependencies = [ - "asn1-rs", + "asn1-rs 0.6.2", "data-encoding", - "der-parser", + "der-parser 9.0.0", "lazy_static", "nom 7.1.3", "oid-registry", @@ -7973,7 +10371,7 @@ dependencies = [ "async-trait", "blocking", "enumflags2", - "event-listener 5.4.0", + "event-listener 5.4.1", "futures-core", "futures-lite", "hex", @@ -7984,7 +10382,7 @@ dependencies = [ "tracing", "uds_windows", "windows-sys 0.59.0", - "winnow 0.7.12", + "winnow", "zbus_macros", "zbus_names", "zvariant", @@ -8013,7 +10411,7 @@ checksum = "7be68e64bf6ce8db94f63e72f0c7eb9a60d733f7e0499e628dfab0f84d6bcb97" dependencies = [ "serde", "static_assertions", - "winnow 0.7.12", + "winnow", "zvariant", ] @@ -8091,9 +10489,9 @@ dependencies = [ [[package]] name = "zerovec" -version = "0.11.2" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a05eb080e015ba39cc9e23bbe5e7fb04d5fb040350f99f34e338d5fdd294428" +checksum = "e7aa2bd55086f1ab526693ecbe444205da57e25f4489879da80635a46d90e73b" dependencies = [ "yoke", "zerofrom", @@ -8133,7 +10531,7 @@ dependencies = [ "memchr", "pbkdf2", "sha1", - "thiserror 2.0.12", + "thiserror 2.0.14", "time", "xz2", "zeroize", @@ -8196,7 +10594,7 @@ dependencies = [ "endi", "enumflags2", "serde", - "winnow 0.7.12", + "winnow", "zvariant_derive", "zvariant_utils", ] @@ -8225,5 +10623,5 @@ dependencies = [ "serde", "static_assertions", "syn 2.0.104", - "winnow 0.7.12", + "winnow", ] diff --git a/core/models/Cargo.toml b/core/models/Cargo.toml index 03149b7fb..e272b11b3 100644 --- a/core/models/Cargo.toml +++ b/core/models/Cargo.toml @@ -6,6 +6,7 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] +arti-client = { version = "0.33", features = ["full"] } axum = "0.8.4" base64 = "0.22.1" color-eyre = "0.6.2" @@ -29,16 +30,10 @@ rpc-toolkit = { git = "https://github.com/Start9Labs/rpc-toolkit.git", branch = rustls = "0.23" serde = { version = "1.0", features = ["derive", "rc"] } serde_json = "1.0" -sqlx = { version = "0.8.6", features = [ - "chrono", - "runtime-tokio-rustls", - "postgres", -] } ssh-key = "0.6.2" ts-rs = { git = "https://github.com/dr-bonez/ts-rs.git", branch = "feature/top-level-as" } # "8" thiserror = "2.0" tokio = { version = "1", features = ["full"] } -torut = { git = "https://github.com/Start9Labs/torut.git", branch = "update/dependencies" } tracing = "0.1.39" yasi = "0.1.5" zbus = "5" diff --git a/core/models/src/errors.rs b/core/models/src/errors.rs index b0a709133..779e4b1a4 100644 --- a/core/models/src/errors.rs +++ b/core/models/src/errors.rs @@ -288,11 +288,6 @@ impl From for Error { Error::new(e, ErrorKind::Database) } } -impl From for Error { - fn from(e: sqlx::Error) -> Self { - Error::new(e, ErrorKind::Database) - } -} impl From for Error { fn from(e: ed25519_dalek::SignatureError) -> Self { Error::new(e, ErrorKind::InvalidSignature) @@ -303,11 +298,6 @@ impl From for Error { Error::new(e, ErrorKind::ParseNetAddress) } } -impl From for Error { - fn from(e: torut::control::ConnError) -> Self { - Error::new(e, ErrorKind::Tor) - } -} impl From for Error { fn from(e: ipnet::AddrParseError) -> Self { Error::new(e, ErrorKind::ParseNetAddress) @@ -353,8 +343,8 @@ impl From for Error { Error::new(e, kind) } } -impl From for Error { - fn from(e: torut::onion::OnionAddressParseError) -> Self { +impl From for Error { + fn from(e: arti_client::Error) -> Self { Error::new(e, ErrorKind::Tor) } } diff --git a/core/models/src/id/host.rs b/core/models/src/id/host.rs index f147813f3..58d7eb027 100644 --- a/core/models/src/id/host.rs +++ b/core/models/src/id/host.rs @@ -60,20 +60,3 @@ impl AsRef for HostId { self.0.as_ref().as_ref() } } -impl<'q> sqlx::Encode<'q, sqlx::Postgres> for HostId { - fn encode_by_ref( - &self, - buf: &mut ::ArgumentBuffer<'q>, - ) -> Result { - <&str as sqlx::Encode<'q, sqlx::Postgres>>::encode_by_ref(&&**self, buf) - } -} -impl sqlx::Type for HostId { - fn type_info() -> sqlx::postgres::PgTypeInfo { - <&str as sqlx::Type>::type_info() - } - - fn compatible(ty: &sqlx::postgres::PgTypeInfo) -> bool { - <&str as sqlx::Type>::compatible(ty) - } -} diff --git a/core/models/src/id/mod.rs b/core/models/src/id/mod.rs index fe4503941..f9f29513c 100644 --- a/core/models/src/id/mod.rs +++ b/core/models/src/id/mod.rs @@ -118,20 +118,3 @@ impl Serialize for Id { serializer.serialize_str(self) } } -impl<'q> sqlx::Encode<'q, sqlx::Postgres> for Id { - fn encode_by_ref( - &self, - buf: &mut ::ArgumentBuffer<'q>, - ) -> Result { - <&str as sqlx::Encode<'q, sqlx::Postgres>>::encode_by_ref(&&**self, buf) - } -} -impl sqlx::Type for Id { - fn type_info() -> sqlx::postgres::PgTypeInfo { - <&str as sqlx::Type>::type_info() - } - - fn compatible(ty: &sqlx::postgres::PgTypeInfo) -> bool { - <&str as sqlx::Type>::compatible(ty) - } -} diff --git a/core/models/src/id/package.rs b/core/models/src/id/package.rs index 886866f87..4c3b06d60 100644 --- a/core/models/src/id/package.rs +++ b/core/models/src/id/package.rs @@ -87,20 +87,3 @@ impl Serialize for PackageId { Serialize::serialize(&self.0, serializer) } } -impl<'q> sqlx::Encode<'q, sqlx::Postgres> for PackageId { - fn encode_by_ref( - &self, - buf: &mut ::ArgumentBuffer<'q>, - ) -> Result { - <&str as sqlx::Encode<'q, sqlx::Postgres>>::encode_by_ref(&&**self, buf) - } -} -impl sqlx::Type for PackageId { - fn type_info() -> sqlx::postgres::PgTypeInfo { - <&str as sqlx::Type>::type_info() - } - - fn compatible(ty: &sqlx::postgres::PgTypeInfo) -> bool { - <&str as sqlx::Type>::compatible(ty) - } -} diff --git a/core/models/src/id/service_interface.rs b/core/models/src/id/service_interface.rs index 872abd419..f398eef78 100644 --- a/core/models/src/id/service_interface.rs +++ b/core/models/src/id/service_interface.rs @@ -44,23 +44,6 @@ impl AsRef for ServiceInterfaceId { self.0.as_ref().as_ref() } } -impl<'q> sqlx::Encode<'q, sqlx::Postgres> for ServiceInterfaceId { - fn encode_by_ref( - &self, - buf: &mut ::ArgumentBuffer<'q>, - ) -> Result { - <&str as sqlx::Encode<'q, sqlx::Postgres>>::encode_by_ref(&&**self, buf) - } -} -impl sqlx::Type for ServiceInterfaceId { - fn type_info() -> sqlx::postgres::PgTypeInfo { - <&str as sqlx::Type>::type_info() - } - - fn compatible(ty: &sqlx::postgres::PgTypeInfo) -> bool { - <&str as sqlx::Type>::compatible(ty) - } -} impl FromStr for ServiceInterfaceId { type Err = ::Err; fn from_str(s: &str) -> Result { diff --git a/core/startos/Cargo.toml b/core/startos/Cargo.toml index 7cf4c55f7..450a136b4 100644 --- a/core/startos/Cargo.toml +++ b/core/startos/Cargo.toml @@ -2,7 +2,7 @@ authors = ["Aiden McClelland "] description = "The core of StartOS" documentation = "https://docs.rs/start-os" -edition = "2021" +edition = "2024" keywords = [ "self-hosted", "raspberry-pi", @@ -57,6 +57,13 @@ tunnel = [] unstable = ["console-subscriber", "tokio/tracing"] [dependencies] +arti-client = { version = "0.33", features = [ + "compression", + "experimental-api", + "rustls", + "static", + "tokio", +], default-features = false } aes = { version = "0.7.5", features = ["ctr"] } async-acme = { version = "0.6.0", git = "https://github.com/dr-bonez/async-acme.git", features = [ "use_rustls", @@ -89,6 +96,7 @@ cookie_store = "0.21.0" der = { version = "0.7.9", features = ["derive", "pem"] } digest = "0.10.7" divrem = "1.0.0" +dns-lookup = "2.1.0" ed25519 = { version = "2.2.3", features = ["pkcs8", "pem", "alloc"] } ed25519-dalek = { version = "2.2.0", features = [ "serde", @@ -107,6 +115,8 @@ futures = "0.3.28" gpt = "4.1.0" helpers = { path = "../helpers" } hex = "0.4.3" +hickory-client = "0.25.2" +hickory-server = "0.25.2" hmac = "0.12.1" http = "1.0.0" http-body-util = "0.1" @@ -124,10 +134,7 @@ id-pool = { version = "0.2.2", default-features = false, features = [ "serde", "u16", ] } -imbl = { version = "6", git = "https://github.com/dr-bonez/imbl.git", branch = "bugfix/ordmap-lifetimes", features = [ - "serde", - "small-chunks", -] } +imbl = { version = "6", features = ["serde", "small-chunks"] } imbl-value = "0.4.0" include_dir = { version = "0.7.3", features = ["metadata"] } indexmap = { version = "2.0.2", features = ["serde"] } @@ -186,6 +193,7 @@ rpassword = "7.2.0" rpc-toolkit = { git = "https://github.com/Start9Labs/rpc-toolkit.git", branch = "master" } rust-argon2 = "2.0.0" rustyline-async = "0.4.1" +safelog = "0.4.8" semver = { version = "1.0.20", features = ["serde"] } serde = { version = "1.0", features = ["derive", "rc"] } serde_cbor = { package = "ciborium", version = "0.2.1" } @@ -199,12 +207,11 @@ sha2 = "0.10.2" shell-words = "1" signal-hook = "0.3.17" simple-logging = "2.0.2" -socket2 = "0.5.7" +socket2 = { version = "0.6.0", features = ["all"] } sqlx = { version = "0.8.6", features = [ - "chrono", "runtime-tokio-rustls", "postgres", -] } +], default-features = false } sscanf = "0.4.1" ssh-key = { version = "0.6.2", features = ["ed25519"] } tar = "0.4.40" @@ -218,17 +225,17 @@ tokio-stream = { version = "0.1.14", features = ["io-util", "sync", "net"] } tokio-tar = { git = "https://github.com/dr-bonez/tokio-tar.git" } tokio-tungstenite = { version = "0.26.2", features = ["native-tls", "url"] } tokio-util = { version = "0.7.9", features = ["io"] } -torut = { git = "https://github.com/Start9Labs/torut.git", branch = "update/dependencies", features = [ - "serialize", -] } +tor-hscrypto = { version = "0.33", features = ["full"] } +tor-hsservice = { version = "0.33" } +tor-keymgr = { version = "0.33", features = ["ephemeral-keystore"] } +tor-llcrypto = { version = "0.33", features = ["full"] } +tor-rtcompat = { version = "0.33", features = ["tokio", "rustls"] } tower-service = "0.3.3" tracing = "0.1.39" tracing-error = "0.2.0" tracing-futures = "0.2.5" tracing-journald = "0.3.0" tracing-subscriber = { version = "0.3.17", features = ["env-filter"] } -trust-dns-server = "0.23.2" -trust-dns-client = "0.23.2" ts-rs = { git = "https://github.com/dr-bonez/ts-rs.git", branch = "feature/top-level-as" } # "8.1.0" typed-builder = "0.21.0" unix-named-pipe = "0.2.0" diff --git a/core/startos/src/account.rs b/core/startos/src/account.rs index 6abe18c28..37996b429 100644 --- a/core/startos/src/account.rs +++ b/core/startos/src/account.rs @@ -3,11 +3,11 @@ use std::time::SystemTime; use imbl_value::InternedString; use openssl::pkey::{PKey, Private}; use openssl::x509::X509; -use torut::onion::TorSecretKeyV3; use crate::db::model::DatabaseModel; use crate::hostname::{generate_hostname, generate_id, Hostname}; use crate::net::ssl::{generate_key, make_root_cert}; +use crate::net::tor::TorSecretKey; use crate::prelude::*; use crate::util::serde::Pem; @@ -20,12 +20,12 @@ fn hash_password(password: &str) -> Result { .with_kind(crate::ErrorKind::PasswordHashGeneration) } -#[derive(Debug, Clone)] +#[derive(Clone)] pub struct AccountInfo { pub server_id: String, pub hostname: Hostname, pub password: String, - pub tor_keys: Vec, + pub tor_keys: Vec, pub root_ca_key: PKey, pub root_ca_cert: X509, pub ssh_key: ssh_key::PrivateKey, @@ -35,7 +35,7 @@ impl AccountInfo { pub fn new(password: &str, start_time: SystemTime) -> Result { let server_id = generate_id(); let hostname = generate_hostname(); - let tor_key = vec![TorSecretKeyV3::generate()]; + let tor_key = vec![TorSecretKey::generate()]; let root_ca_key = generate_key()?; let root_ca_cert = make_root_cert(&root_ca_key, &hostname, start_time)?; let ssh_key = ssh_key::PrivateKey::from(ssh_key::private::Ed25519Keypair::random( @@ -104,7 +104,7 @@ impl AccountInfo { &self .tor_keys .iter() - .map(|tor_key| tor_key.public().get_onion_address()) + .map(|tor_key| tor_key.onion_address()) .collect(), )?; db.as_private_mut().as_password_mut().ser(&self.password)?; @@ -142,7 +142,7 @@ impl AccountInfo { .chain( self.tor_keys .iter() - .map(|k| InternedString::from_display(&k.public().get_onion_address())), + .map(|k| InternedString::from_display(&k.onion_address())), ) } } diff --git a/core/startos/src/backup/os.rs b/core/startos/src/backup/os.rs index d0d5c83f5..61ad77dbd 100644 --- a/core/startos/src/backup/os.rs +++ b/core/startos/src/backup/os.rs @@ -4,10 +4,10 @@ use openssl::x509::X509; use patch_db::Value; use serde::{Deserialize, Serialize}; use ssh_key::private::Ed25519Keypair; -use torut::onion::TorSecretKeyV3; use crate::account::AccountInfo; use crate::hostname::{generate_hostname, generate_id, Hostname}; +use crate::net::tor::TorSecretKey; use crate::prelude::*; use crate::util::crypto::ed25519_expand_key; use crate::util::serde::{Base32, Base64, Pem}; @@ -85,7 +85,10 @@ impl OsBackupV0 { &mut ssh_key::rand_core::OsRng::default(), ssh_key::Algorithm::Ed25519, )?, - tor_keys: vec![TorSecretKeyV3::from(self.tor_key.0)], + tor_keys: TorSecretKey::from_bytes(self.tor_key.0) + .ok() + .into_iter() + .collect(), developer_key: ed25519_dalek::SigningKey::generate( &mut ssh_key::rand_core::OsRng::default(), ), @@ -116,7 +119,10 @@ impl OsBackupV1 { root_ca_key: self.root_ca_key.0, root_ca_cert: self.root_ca_cert.0, ssh_key: ssh_key::PrivateKey::from(Ed25519Keypair::from_seed(&self.net_key.0)), - tor_keys: vec![TorSecretKeyV3::from(ed25519_expand_key(&self.net_key.0))], + tor_keys: TorSecretKey::from_bytes(ed25519_expand_key(&self.net_key.0)) + .ok() + .into_iter() + .collect(), developer_key: ed25519_dalek::SigningKey::from_bytes(&self.net_key), }, ui: self.ui, @@ -134,7 +140,7 @@ struct OsBackupV2 { root_ca_key: Pem>, // PEM Encoded OpenSSL Key root_ca_cert: Pem, // PEM Encoded OpenSSL X509 Certificate ssh_key: Pem, // PEM Encoded OpenSSH Key - tor_keys: Vec, // Base64 Encoded Ed25519 Expanded Secret Key + tor_keys: Vec, // Base64 Encoded Ed25519 Expanded Secret Key compat_s9pk_key: Pem, // PEM Encoded ED25519 Key ui: Value, // JSON Value } diff --git a/core/startos/src/context/cli.rs b/core/startos/src/context/cli.rs index f8eb1207d..ed61ffcea 100644 --- a/core/startos/src/context/cli.rs +++ b/core/startos/src/context/cli.rs @@ -131,7 +131,11 @@ impl CliContext { tunnel_listen: config.tunnel_listen, client: { let mut builder = Client::builder().cookie_provider(cookie_store.clone()); - if let Some(proxy) = config.proxy { + if let Some(proxy) = config.proxy.or_else(|| { + config + .socks_listen + .and_then(|socks| format!("socks5h://{socks}").parse::().log_err()) + }) { builder = builder.proxy(Proxy::all(proxy).with_kind(crate::ErrorKind::ParseUrl)?) } diff --git a/core/startos/src/context/config.rs b/core/startos/src/context/config.rs index f89fd17a3..ba7907bdd 100644 --- a/core/startos/src/context/config.rs +++ b/core/startos/src/context/config.rs @@ -74,6 +74,8 @@ pub struct ClientConfig { pub tunnel_listen: Option, #[arg(short = 'p', long)] pub proxy: Option, + #[arg(skip)] + pub socks_listen: Option, #[arg(long)] pub cookie_path: Option, #[arg(long)] @@ -114,9 +116,7 @@ pub struct ServerConfig { #[arg(skip)] pub os_partitions: Option, #[arg(long)] - pub tor_control: Option, - #[arg(long)] - pub tor_socks: Option, + pub socks_listen: Option, #[arg(long)] pub revision_cache_size: Option, #[arg(long)] @@ -133,8 +133,7 @@ impl ContextConfig for ServerConfig { fn merge_with(&mut self, other: Self) { self.ethernet_interface = self.ethernet_interface.take().or(other.ethernet_interface); self.os_partitions = self.os_partitions.take().or(other.os_partitions); - self.tor_control = self.tor_control.take().or(other.tor_control); - self.tor_socks = self.tor_socks.take().or(other.tor_socks); + self.socks_listen = self.socks_listen.take().or(other.socks_listen); self.revision_cache_size = self .revision_cache_size .take() diff --git a/core/startos/src/context/rpc.rs b/core/startos/src/context/rpc.rs index ba164ddcd..52cd0b2f7 100644 --- a/core/startos/src/context/rpc.rs +++ b/core/startos/src/context/rpc.rs @@ -65,7 +65,6 @@ pub struct RpcContextSeed { pub cancellable_installs: SyncMutex>>, pub metrics_cache: Watch>, pub shutdown: broadcast::Sender>, - pub tor_socks: SocketAddr, pub lxc_manager: Arc, pub open_authed_continuations: OpenAuthedContinuations>, pub rpc_continuations: RpcContinuations, @@ -138,10 +137,12 @@ impl RpcContext { run_migrations, }: InitRpcContextPhases, ) -> Result { - let tor_proxy = config.tor_socks.unwrap_or(SocketAddr::V4(SocketAddrV4::new( - Ipv4Addr::new(127, 0, 0, 1), - 9050, - ))); + let socks_proxy = config + .socks_listen + .unwrap_or(SocketAddr::V4(SocketAddrV4::new( + Ipv4Addr::new(127, 0, 0, 1), + 9050, + ))); let (shutdown, _) = tokio::sync::broadcast::channel(1); load_db.start(); @@ -163,17 +164,7 @@ impl RpcContext { { (net_ctrl, os_net_service) } else { - let net_ctrl = Arc::new( - NetController::init( - db.clone(), - config - .tor_control - .unwrap_or(SocketAddr::from(([127, 0, 0, 1], 9051))), - tor_proxy, - &account.hostname, - ) - .await?, - ); + let net_ctrl = Arc::new(NetController::init(db.clone(), &account.hostname).await?); webserver.try_upgrade(|a| net_ctrl.net_iface.watcher.upgrade_listener(a))?; let os_net_service = net_ctrl.os_bindings().await?; (net_ctrl, os_net_service) @@ -183,7 +174,7 @@ impl RpcContext { let services = ServiceMap::default(); let metrics_cache = Watch::>::new(None); - let tor_proxy_url = format!("socks5h://{tor_proxy}"); + let socks_proxy_url = format!("socks5h://{socks_proxy}"); let crons = SyncMutex::new(BTreeMap::new()); @@ -251,7 +242,6 @@ impl RpcContext { cancellable_installs: SyncMutex::new(BTreeMap::new()), metrics_cache, shutdown, - tor_socks: tor_proxy, lxc_manager: Arc::new(LxcManager::new()), open_authed_continuations: OpenAuthedContinuations::new(), rpc_continuations: RpcContinuations::new(), @@ -267,13 +257,7 @@ impl RpcContext { })?, ), client: Client::builder() - .proxy(Proxy::custom(move |url| { - if url.host_str().map_or(false, |h| h.ends_with(".onion")) { - Some(tor_proxy_url.clone()) - } else { - None - } - })) + .proxy(Proxy::all(socks_proxy_url)?) .build() .with_kind(crate::ErrorKind::ParseUrl)?, start_time: Instant::now(), diff --git a/core/startos/src/context/setup.rs b/core/startos/src/context/setup.rs index 4902e7a7f..fed7b8814 100644 --- a/core/startos/src/context/setup.rs +++ b/core/startos/src/context/setup.rs @@ -55,7 +55,7 @@ impl TryFrom<&AccountInfo> for SetupResult { tor_addresses: value .tor_keys .iter() - .map(|tor_key| format!("https://{}", tor_key.public().get_onion_address())) + .map(|tor_key| format!("https://{}", tor_key.onion_address())) .collect(), hostname: value.hostname.clone(), lan_address: value.hostname.lan_address(), diff --git a/core/startos/src/db/model/public.rs b/core/startos/src/db/model/public.rs index 3e1f9c2cf..2330fe96f 100644 --- a/core/startos/src/db/model/public.rs +++ b/core/startos/src/db/model/public.rs @@ -18,8 +18,9 @@ use ts_rs::TS; use crate::account::AccountInfo; use crate::db::model::package::AllPackageData; use crate::net::acme::AcmeProvider; +use crate::net::forward::START9_BRIDGE_IFACE; use crate::net::host::binding::{AddSslOptions, BindInfo, BindOptions, NetInfo}; -use crate::net::host::Host; +use crate::net::host::{Domains, Host}; use crate::net::utils::ipv6_is_local; use crate::net::vhost::AlpnInfo; use crate::prelude::*; @@ -29,7 +30,7 @@ use crate::util::cpupower::Governor; use crate::util::lshw::LshwDevice; use crate::util::serde::MaybeUtf8String; use crate::version::{Current, VersionT}; -use crate::{ARCH, PLATFORM}; +use crate::{ARCH, HOST_IP, PLATFORM}; #[derive(Debug, Deserialize, Serialize, HasModel, TS)] #[serde(rename_all = "camelCase")] @@ -80,12 +81,8 @@ impl Public { )] .into_iter() .collect(), - onions: account - .tor_keys - .iter() - .map(|k| k.public().get_onion_address()) - .collect(), - domains: BTreeMap::new(), + onions: account.tor_keys.iter().map(|k| k.onion_address()).collect(), + domains: Domains::default(), hostname_info: BTreeMap::new(), }, wifi: WifiInfo { @@ -95,6 +92,7 @@ impl Public { gateways: OrdMap::new(), acme: BTreeMap::new(), domains: BTreeMap::new(), + dns: Default::default(), }, status_info: ServerStatus { backup_progress: None, @@ -198,6 +196,18 @@ pub struct NetworkInfo { #[serde(default)] #[ts(as = "BTreeMap::")] pub domains: BTreeMap, + #[serde(default)] + pub dns: DnsSettings, +} + +#[derive(Debug, Default, Deserialize, Serialize, HasModel, TS)] +#[serde(rename_all = "camelCase")] +#[model = "Model"] +#[ts(export)] +pub struct DnsSettings { + pub dhcp: Vec, + #[serde(rename = "static")] + pub static_servers: Option>, } #[derive(Clone, Debug, Default, Deserialize, Serialize, HasModel, TS)] @@ -226,13 +236,42 @@ impl NetworkInterfaceInfo { ] .into_iter() .collect(), + lan_ip: [ + IpAddr::from(Ipv4Addr::LOCALHOST), + IpAddr::from(Ipv6Addr::LOCALHOST) + ] + .into_iter() + .collect(), wan_ip: None, ntp_servers: Default::default(), + dns_servers: Default::default(), }), }; } (&*LO, &*LOOPBACK) } + pub fn lxc_bridge() -> (&'static GatewayId, &'static Self) { + lazy_static! { + static ref LXCBR0: GatewayId = GatewayId::from(START9_BRIDGE_IFACE); + static ref LXC_BRIDGE: NetworkInterfaceInfo = NetworkInterfaceInfo { + public: Some(false), + secure: Some(true), + ip_info: Some(IpInfo { + name: START9_BRIDGE_IFACE.into(), + scope_id: 0, + device_type: None, + subnets: [IpNet::new(HOST_IP.into(), 24).unwrap()] + .into_iter() + .collect(), + lan_ip: [IpAddr::from(HOST_IP)].into_iter().collect(), + wan_ip: None, + ntp_servers: Default::default(), + dns_servers: Default::default(), + }), + }; + } + (&*LXCBR0, &*LXC_BRIDGE) + } pub fn public(&self) -> bool { self.public.unwrap_or_else(|| { !self.ip_info.as_ref().map_or(true, |ip_info| { @@ -285,9 +324,13 @@ pub struct IpInfo { pub device_type: Option, #[ts(type = "string[]")] pub subnets: OrdSet, + #[ts(type = "string[]")] + pub lan_ip: OrdSet, pub wan_ip: Option, #[ts(type = "string[]")] pub ntp_servers: OrdSet, + #[ts(type = "string[]")] + pub dns_servers: OrdSet, } #[derive(Clone, Copy, Debug, PartialEq, Eq, Deserialize, Serialize, TS)] diff --git a/core/startos/src/disk/mod.rs b/core/startos/src/disk/mod.rs index d064c5cd2..144aa8bb4 100644 --- a/core/startos/src/disk/mod.rs +++ b/core/startos/src/disk/mod.rs @@ -96,14 +96,13 @@ fn display_disk_info(params: WithIoFormat, args: Vec) -> Result "N/A" }, part.capacity, - if let Some(used) = part + &if let Some(used) = part .used .map(|u| format!("{:.2} GiB", u as f64 / 1024.0 / 1024.0 / 1024.0)) - .as_ref() { used } else { - "N/A" + "N/A".to_owned() }, &if part.start_os.is_empty() { "N/A".to_owned() diff --git a/core/startos/src/init.rs b/core/startos/src/init.rs index 7bb9a9ee3..da58faf35 100644 --- a/core/startos/src/init.rs +++ b/core/startos/src/init.rs @@ -1,5 +1,4 @@ use std::io::Cursor; -use std::net::{Ipv4Addr, SocketAddr, SocketAddrV4}; use std::path::Path; use std::sync::Arc; use std::time::{Duration, SystemTime}; @@ -203,19 +202,7 @@ pub async fn init( let account = AccountInfo::load(&peek)?; start_net.start(); - let net_ctrl = Arc::new( - NetController::init( - db.clone(), - cfg.tor_control - .unwrap_or(SocketAddr::from(([127, 0, 0, 1], 9051))), - cfg.tor_socks.unwrap_or(SocketAddr::V4(SocketAddrV4::new( - Ipv4Addr::new(127, 0, 0, 1), - 9050, - ))), - &account.hostname, - ) - .await?, - ); + let net_ctrl = Arc::new(NetController::init(db.clone(), &account.hostname).await?); webserver.try_upgrade(|a| net_ctrl.net_iface.watcher.upgrade_listener(a))?; let os_net_service = net_ctrl.os_bindings().await?; start_net.complete(); diff --git a/core/startos/src/middleware/auth.rs b/core/startos/src/middleware/auth.rs index 5c057ebc2..cee5af74c 100644 --- a/core/startos/src/middleware/auth.rs +++ b/core/startos/src/middleware/auth.rs @@ -89,10 +89,22 @@ impl SignatureAuthContext for RpcContext { .as_network() .as_host() .as_domains() + .as_public() .keys() .map(|k| k.into_iter()) .transpose(), ) + .chain( + peek.as_public() + .as_server_info() + .as_network() + .as_host() + .as_domains() + .as_private() + .de() + .map(|k| k.into_iter()) + .transpose(), + ) .collect::>() } fn check_pubkey( diff --git a/core/startos/src/net/dns.rs b/core/startos/src/net/dns.rs index e25aaf00c..b5b6a69d5 100644 --- a/core/startos/src/net/dns.rs +++ b/core/startos/src/net/dns.rs @@ -1,69 +1,178 @@ use std::borrow::Borrow; use std::collections::BTreeMap; -use std::future::Future; -use std::net::Ipv4Addr; +use std::net::{IpAddr, Ipv4Addr, Ipv6Addr}; use std::sync::{Arc, Weak}; use std::time::Duration; +use clap::Parser; use color_eyre::eyre::eyre; +use futures::{FutureExt, TryStreamExt}; use helpers::NonDetachingJoinHandle; -use models::PackageId; +use hickory_client::client::Client; +use hickory_client::proto::runtime::TokioRuntimeProvider; +use hickory_client::proto::udp::UdpClientStream; +use hickory_client::proto::xfer::DnsRequestOptions; +use hickory_client::proto::DnsHandle; +use hickory_server::authority::MessageResponseBuilder; +use hickory_server::proto::op::{Header, ResponseCode}; +use hickory_server::proto::rr::{Name, Record, RecordType}; +use hickory_server::server::{Request, RequestHandler, ResponseHandler, ResponseInfo}; +use hickory_server::ServerFuture; +use imbl::OrdMap; +use imbl_value::InternedString; +use models::{GatewayId, PackageId}; +use rpc_toolkit::{from_fn_blocking, Context, HandlerArgs, HandlerExt, ParentHandler}; +use serde::{Deserialize, Serialize}; use tokio::net::{TcpListener, UdpSocket}; -use tokio::process::Command; -use tokio::sync::RwLock; use tracing::instrument; -use trust_dns_server::authority::MessageResponseBuilder; -use trust_dns_server::proto::op::{Header, ResponseCode}; -use trust_dns_server::proto::rr::{Name, Record, RecordType}; -use trust_dns_server::server::{Request, RequestHandler, ResponseHandler, ResponseInfo}; -use trust_dns_server::ServerFuture; -use crate::net::forward::START9_BRIDGE_IFACE; -use crate::util::Invoke; +use crate::db::model::public::NetworkInterfaceInfo; +use crate::net::gateway::NetworkInterfaceWatcher; +use crate::util::serde::{display_serializable, HandlerExtSerde}; +use crate::util::sync::{SyncRwLock, Watch}; use crate::{Error, ErrorKind, ResultExt}; +pub fn dns_api() -> ParentHandler { + ParentHandler::new().subcommand( + "query", + from_fn_blocking(query_dns::) + .with_display_serializable() + .with_custom_display_fn(|HandlerArgs { params, .. }, res| { + if let Some(format) = params.format { + return display_serializable(format, res); + } + + if let Some(ip) = res { + println!("{}", ip) + } + + Ok(()) + }) + .with_about("Test the DNS configuration for a domain"), + ) +} + +#[derive(Deserialize, Serialize, Parser)] +pub struct QueryDnsParams { + pub fqdn: InternedString, +} + +pub fn query_dns( + _: C, + QueryDnsParams { fqdn }: QueryDnsParams, +) -> Result, Error> { + let hints = dns_lookup::AddrInfoHints { + flags: 0, + address: libc::AF_INET, + socktype: 0, + protocol: 0, + }; + dns_lookup::getaddrinfo(Some(&*fqdn), None, Some(hints)) + .map(Some) + .or_else(|e| { + if matches!( + e.kind(), + dns_lookup::LookupErrorKind::NoName | dns_lookup::LookupErrorKind::NoData + ) { + Ok(None) + } else { + Err(std::io::Error::from(e)) + } + }) + .with_kind(ErrorKind::Network)? + .into_iter() + .flatten() + .find_map(|a| match a.map(|a| a.sockaddr.ip()) { + Ok(IpAddr::V4(a)) => Some(Ok(a)), + Err(e) => Some(Err(e)), + _ => None, + }) + .transpose() + .map_err(Error::from) +} + +// #[test] +// fn test_dns() { +// assert!(query_dns( +// (), +// QueryDnsParams { +// fqdn: "fakedomain-definitely-not-real.com" +// } +// ) +// .unwrap() +// .is_none()) +// } + +#[derive(Default)] +struct ResolveMap { + private_domains: BTreeMap>, + services: BTreeMap, BTreeMap>>, +} + pub struct DnsController { - services: Weak, BTreeMap>>>>, + resolve: Weak>, #[allow(dead_code)] - dns_server: NonDetachingJoinHandle>, + dns_server: NonDetachingJoinHandle<()>, } struct Resolver { - services: Arc, BTreeMap>>>>, + client: hickory_client::client::Client, + net_iface: Watch>, + resolve: Arc>, } impl Resolver { - async fn resolve(&self, name: &Name) -> Option> { - match name.iter().next_back() { - Some(b"embassy") | Some(b"startos") => { - if let Some(pkg) = name.iter().rev().skip(1).next() { - if let Some(ip) = self.services.read().await.get(&Some( - std::str::from_utf8(pkg) - .unwrap_or_default() - .parse() - .unwrap_or_default(), - )) { + fn resolve(&self, name: &Name, src: IpAddr) -> Option> { + self.resolve.peek(|r| { + if r.private_domains + .get(&*name.to_lowercase().to_ascii()) + .map_or(false, |d| d.strong_count() > 0) + { + if let Some(res) = self.net_iface.peek(|i| { + i.values() + .chain([NetworkInterfaceInfo::lxc_bridge().1]) + .flat_map(|i| i.ip_info.as_ref()) + .find(|i| i.subnets.iter().any(|s| s.contains(&src))) + .map(|ip_info| { + let mut res = ip_info.subnets.iter().collect::>(); + res.sort_by_cached_key(|a| !a.contains(&src)); + res.into_iter().map(|s| s.addr()).collect() + }) + }) { + return Some(res); + } + } + match name.iter().next_back() { + Some(b"embassy") | Some(b"startos") => { + if let Some(pkg) = name.iter().rev().skip(1).next() { + if let Some(ip) = r.services.get(&Some( + std::str::from_utf8(pkg) + .unwrap_or_default() + .parse() + .unwrap_or_default(), + )) { + Some( + ip.iter() + .filter(|(_, rc)| rc.strong_count() > 0) + .map(|(ip, _)| (*ip).into()) + .collect(), + ) + } else { + None + } + } else if let Some(ip) = r.services.get(&None) { Some( ip.iter() .filter(|(_, rc)| rc.strong_count() > 0) - .map(|(ip, _)| *ip) + .map(|(ip, _)| (*ip).into()) .collect(), ) } else { None } - } else if let Some(ip) = self.services.read().await.get(&None) { - Some( - ip.iter() - .filter(|(_, rc)| rc.strong_count() > 0) - .map(|(ip, _)| *ip) - .collect(), - ) - } else { - None } + _ => None, } - _ => None, - } + }) } } @@ -74,60 +183,110 @@ impl RequestHandler for Resolver { request: &Request, mut response_handle: R, ) -> ResponseInfo { - let query = request.request_info().query; - if let Some(ip) = self.resolve(query.name().borrow()).await { - match query.query_type() { - RecordType::A => { - response_handle - .send_response( - MessageResponseBuilder::from_message_request(&*request).build( - Header::response_from_request(request.header()), - &ip.into_iter() - .map(|ip| { - Record::from_rdata( - request.request_info().query.name().to_owned().into(), - 0, - trust_dns_server::proto::rr::RData::A(ip.into()), - ) - }) - .collect::>(), - [], - [], - [], - ), - ) - .await + async { + let req = request.request_info()?; + let query = req.query; + if let Some(ip) = self.resolve(query.name().borrow(), req.src.ip()) { + match query.query_type() { + RecordType::A => { + response_handle + .send_response( + MessageResponseBuilder::from_message_request(&*request).build( + Header::response_from_request(request.header()), + &ip.into_iter() + .filter_map(|a| { + if let IpAddr::V4(a) = a { + Some(a) + } else { + None + } + }) + .map(|ip| { + Record::from_rdata( + query.name().to_owned().into(), + 0, + hickory_server::proto::rr::RData::A(ip.into()), + ) + }) + .collect::>(), + [], + [], + [], + ), + ) + .await + } + RecordType::AAAA => { + response_handle + .send_response( + MessageResponseBuilder::from_message_request(&*request).build( + Header::response_from_request(request.header()), + &ip.into_iter() + .filter_map(|a| { + if let IpAddr::V6(a) = a { + Some(a) + } else { + None + } + }) + .map(|ip| { + Record::from_rdata( + query.name().to_owned().into(), + 0, + hickory_server::proto::rr::RData::AAAA(ip.into()), + ) + }) + .collect::>(), + [], + [], + [], + ), + ) + .await + } + _ => { + let res = Header::response_from_request(request.header()); + response_handle + .send_response( + MessageResponseBuilder::from_message_request(&*request).build( + res.into(), + [], + [], + [], + [], + ), + ) + .await + } } - _ => { - let res = Header::response_from_request(request.header()); - response_handle - .send_response( - MessageResponseBuilder::from_message_request(&*request).build( - res.into(), - [], - [], - [], - [], - ), - ) - .await + } else { + let query = query.original().clone(); + let mut stream = self.client.lookup(query, DnsRequestOptions::default()); + let mut res = None; + while let Some(msg) = stream.try_next().await? { + res = Some( + response_handle + .send_response( + MessageResponseBuilder::from_message_request(&*request).build( + msg.header().clone(), + msg.answers(), + msg.name_servers(), + &msg.soa().map(|s| s.to_owned().into_record_of_rdata()), + msg.additionals(), + ), + ) + .await?, + ); } + res.ok_or_else(|| { + std::io::Error::new( + std::io::ErrorKind::NotFound, + eyre!("no response from server"), + ) + }) } - } else { - let mut res = Header::response_from_request(request.header()); - res.set_response_code(ResponseCode::NXDomain); - response_handle - .send_response( - MessageResponseBuilder::from_message_request(&*request).build( - res.into(), - [], - [], - [], - [], - ), - ) - .await } + .await .unwrap_or_else(|e| { tracing::error!("{}", e); tracing::debug!("{:?}", e); @@ -140,68 +299,73 @@ impl RequestHandler for Resolver { impl DnsController { #[instrument(skip_all)] - pub async fn init( - bridge_activated: impl Future + Send + Sync + 'static, - ) -> Result { - let services = Arc::new(RwLock::new(BTreeMap::new())); + pub async fn init(watcher: &NetworkInterfaceWatcher) -> Result { + let resolve = Arc::new(SyncRwLock::new(ResolveMap::default())); + + let stream = + UdpClientStream::builder(([127, 0, 0, 53], 5355).into(), TokioRuntimeProvider::new()) + .build(); + let (client, bg) = Client::connect(stream) + .await + .with_kind(ErrorKind::Network)?; let mut server = ServerFuture::new(Resolver { - services: services.clone(), + client, + net_iface: watcher.subscribe(), + resolve: resolve.clone(), }); - let dns_server = tokio::spawn(async move { - server.register_listener( - TcpListener::bind((Ipv4Addr::LOCALHOST, 53)) - .await - .with_kind(ErrorKind::Network)?, - Duration::from_secs(30), - ); - server.register_socket( - UdpSocket::bind((Ipv4Addr::LOCALHOST, 53)) - .await - .with_kind(ErrorKind::Network)?, - ); + let dns_server = tokio::spawn( + futures::future::join( + async move { + server.register_listener( + TcpListener::bind((Ipv6Addr::UNSPECIFIED, 53)) + .await + .with_kind(ErrorKind::Network)?, + Duration::from_secs(30), + ); + server.register_socket( + UdpSocket::bind((Ipv6Addr::UNSPECIFIED, 53)) + .await + .with_kind(ErrorKind::Network)?, + ); - bridge_activated.await; - - Command::new("resolvectl") - .arg("dns") - .arg(START9_BRIDGE_IFACE) - .arg("127.0.0.1") - .invoke(ErrorKind::Network) - .await?; - Command::new("resolvectl") - .arg("domain") - .arg(START9_BRIDGE_IFACE) - .arg("embassy") - .invoke(ErrorKind::Network) - .await?; - - server - .block_until_done() - .await - .map_err(|e| Error::new(e, ErrorKind::Network)) - }) + server + .block_until_done() + .await + .with_kind(ErrorKind::Network) + } + .map(|r| { + r.log_err(); + }), + bg.map(|r| { + r.log_err(); + }), + ) + .map(|_| ()), + ) .into(); Ok(Self { - services: Arc::downgrade(&services), + resolve: Arc::downgrade(&resolve), dns_server, }) } - pub async fn add(&self, pkg_id: Option, ip: Ipv4Addr) -> Result, Error> { - if let Some(services) = Weak::upgrade(&self.services) { - let mut writable = services.write().await; - let mut ips = writable.remove(&pkg_id).unwrap_or_default(); - let rc = if let Some(rc) = Weak::upgrade(&ips.remove(&ip).unwrap_or_default()) { - rc - } else { - Arc::new(()) - }; - ips.insert(ip, Arc::downgrade(&rc)); - writable.insert(pkg_id, ips); - Ok(rc) + pub fn add_service(&self, pkg_id: Option, ip: Ipv4Addr) -> Result, Error> { + if let Some(resolve) = Weak::upgrade(&self.resolve) { + resolve.mutate(|writable| { + let ips = writable.services.entry(pkg_id).or_default(); + let weak = ips.entry(ip).or_default(); + let rc = if let Some(rc) = Weak::upgrade(&*weak) { + rc + } else { + let new = Arc::new(()); + *weak = Arc::downgrade(&new); + new + }; + Ok(rc) + }) } else { Err(Error::new( eyre!("DNS Server Thread has exited"), @@ -210,17 +374,65 @@ impl DnsController { } } - pub async fn gc(&self, pkg_id: Option, ip: Ipv4Addr) -> Result<(), Error> { - if let Some(services) = Weak::upgrade(&self.services) { - let mut writable = services.write().await; - let mut ips = writable.remove(&pkg_id).unwrap_or_default(); - if let Some(rc) = Weak::upgrade(&ips.remove(&ip).unwrap_or_default()) { - ips.insert(ip, Arc::downgrade(&rc)); - } - if !ips.is_empty() { - writable.insert(pkg_id, ips); - } - Ok(()) + pub fn gc_service(&self, pkg_id: Option, ip: Ipv4Addr) -> Result<(), Error> { + if let Some(resolve) = Weak::upgrade(&self.resolve) { + resolve.mutate(|writable| { + let mut ips = writable.services.remove(&pkg_id).unwrap_or_default(); + if let Some(rc) = Weak::upgrade(&ips.remove(&ip).unwrap_or_default()) { + ips.insert(ip, Arc::downgrade(&rc)); + } + if !ips.is_empty() { + writable.services.insert(pkg_id, ips); + } + Ok(()) + }) + } else { + Err(Error::new( + eyre!("DNS Server Thread has exited"), + crate::ErrorKind::Network, + )) + } + } + + pub fn add_private_domain(&self, fqdn: InternedString) -> Result, Error> { + if let Some(resolve) = Weak::upgrade(&self.resolve) { + resolve.mutate(|writable| { + let weak = writable.private_domains.entry(fqdn).or_default(); + let rc = if let Some(rc) = Weak::upgrade(&*weak) { + rc + } else { + let new = Arc::new(()); + *weak = Arc::downgrade(&new); + new + }; + Ok(rc) + }) + } else { + Err(Error::new( + eyre!("DNS Server Thread has exited"), + crate::ErrorKind::Network, + )) + } + } + + pub fn gc_private_domains<'a, BK: Ord + 'a>( + &self, + domains: impl IntoIterator + 'a, + ) -> Result<(), Error> + where + InternedString: Borrow, + { + if let Some(resolve) = Weak::upgrade(&self.resolve) { + resolve.mutate(|writable| { + for domain in domains { + if let Some((k, v)) = writable.private_domains.remove_entry(domain) { + if v.strong_count() > 0 { + writable.private_domains.insert(k, v); + } + } + } + Ok(()) + }) } else { Err(Error::new( eyre!("DNS Server Thread has exited"), diff --git a/core/startos/src/net/domain.rs b/core/startos/src/net/domain.rs deleted file mode 100644 index f3c0644ec..000000000 --- a/core/startos/src/net/domain.rs +++ /dev/null @@ -1,204 +0,0 @@ -use std::collections::BTreeMap; - -use clap::Parser; -use futures::TryFutureExt; -use helpers::NonDetachingJoinHandle; -use imbl_value::InternedString; -use models::GatewayId; -use rpc_toolkit::{from_fn_async, Context, HandlerArgs, HandlerExt, ParentHandler}; -use serde::{Deserialize, Serialize}; - -use crate::context::{CliContext, RpcContext}; -use crate::db::model::public::DomainSettings; -use crate::prelude::*; -use crate::util::new_guid; -use crate::util::serde::{display_serializable, HandlerExtSerde}; - -pub fn domain_api() -> ParentHandler { - ParentHandler::new() - .subcommand( - "list", - from_fn_async(list) - .with_display_serializable() - .with_custom_display_fn(|HandlerArgs { params, .. }, res| { - use prettytable::*; - - if let Some(format) = params.format { - return display_serializable(format, res); - } - - let mut table = Table::new(); - table.add_row(row![bc => "DOMAIN", "GATEWAY"]); - for (domain, info) in res { - table.add_row(row![domain, info.gateway]); - } - - table.print_tty(false)?; - - Ok(()) - }) - .with_about("List domains available to StartOS") - .with_call_remote::(), - ) - .subcommand( - "add", - from_fn_async(add) - .with_metadata("sync_db", Value::Bool(true)) - .no_display() - .with_about("Add a domain for use with StartOS") - .with_call_remote::(), - ) - .subcommand( - "remove", - from_fn_async(remove) - .with_metadata("sync_db", Value::Bool(true)) - .no_display() - .with_about("Remove a domain for use with StartOS") - .with_call_remote::(), - ) - .subcommand( - "test-dns", - from_fn_async(test_dns) - .with_display_serializable() - .with_custom_display_fn(|HandlerArgs { params, .. }, res| { - use prettytable::*; - - if let Some(format) = params.format { - return display_serializable(format, res); - } - - let mut table = Table::new(); - table.add_row(row![bc -> "ROOT", if res.root { "✅️" } else { "❌️" }]); - table.add_row(row![bc -> "WILDCARD", if res.wildcard { "✅️" } else { "❌️" }]); - - table.print_tty(false)?; - - Ok(()) - }) - .with_about("Test the DNS configuration for a domain"), - ) -} - -pub async fn list(ctx: RpcContext) -> Result, Error> { - ctx.db - .peek() - .await - .into_public() - .into_server_info() - .into_network() - .into_domains() - .de() -} - -#[derive(Deserialize, Serialize, Parser)] -pub struct AddDomainParams { - pub fqdn: InternedString, - pub gateway: GatewayId, -} - -pub async fn add( - ctx: RpcContext, - AddDomainParams { fqdn, gateway }: AddDomainParams, -) -> Result<(), Error> { - ctx.db - .mutate(|db| { - db.as_public_mut() - .as_server_info_mut() - .as_network_mut() - .as_domains_mut() - .insert(&fqdn, &DomainSettings { gateway }) - }) - .await - .result?; - Ok(()) -} - -#[derive(Deserialize, Serialize, Parser)] -pub struct RemoveDomainParams { - pub fqdn: InternedString, -} - -pub async fn remove( - ctx: RpcContext, - RemoveDomainParams { fqdn }: RemoveDomainParams, -) -> Result<(), Error> { - ctx.db - .mutate(|db| { - db.as_public_mut() - .as_server_info_mut() - .as_network_mut() - .as_domains_mut() - .remove(&fqdn) - }) - .await - .result?; - Ok(()) -} - -#[derive(Deserialize, Serialize)] -pub struct TestDnsResult { - pub root: bool, - pub wildcard: bool, -} - -pub async fn test_dns( - ctx: RpcContext, - AddDomainParams { fqdn, ref gateway }: AddDomainParams, -) -> Result { - use tokio::net::UdpSocket; - use trust_dns_client::client::{AsyncClient, ClientHandle}; - use trust_dns_client::op::DnsResponse; - use trust_dns_client::proto::error::ProtoError; - use trust_dns_client::rr::{DNSClass, Name, RecordType}; - use trust_dns_client::udp::UdpClientStream; - - let wan_ip = ctx - .db - .peek() - .await - .into_public() - .into_server_info() - .into_network() - .into_gateways() - .into_idx(&gateway) - .or_not_found(&gateway)? - .into_ip_info() - .transpose() - .and_then(|i| i.into_wan_ip().transpose()) - .or_not_found(lazy_format!("WAN IP for {gateway}"))? - .de()?; - let stream = UdpClientStream::::new(([127, 0, 0, 53], 53).into()); - let (mut client, bg) = AsyncClient::connect(stream.map_err(ProtoError::from)) - .await - .with_kind(ErrorKind::Network)?; - let bg: NonDetachingJoinHandle<_> = tokio::spawn(bg).into(); - - let root = fqdn.parse::().with_kind(ErrorKind::Network)?; - let wildcard = new_guid() - .parse::() - .with_kind(ErrorKind::Network)? - .append_domain(&root) - .with_kind(ErrorKind::Network)?; - let q_root = client - .query(root, DNSClass::IN, RecordType::A) - .await - .with_kind(ErrorKind::Network)?; - let q_wildcard = client - .query(wildcard, DNSClass::IN, RecordType::A) - .await - .with_kind(ErrorKind::Network)?; - - bg.abort(); - - let check_q = |q: DnsResponse| { - q.answers().iter().any(|a| { - a.data() - .and_then(|d| d.as_a()) - .map_or(false, |d| d.0 == wan_ip) - }) - }; - Ok(TestDnsResult { - root: check_q(q_root), - wildcard: check_q(q_wildcard), - }) -} diff --git a/core/startos/src/net/gateway.rs b/core/startos/src/net/gateway.rs index 3250879a6..4dbfcd634 100644 --- a/core/startos/src/net/gateway.rs +++ b/core/startos/src/net/gateway.rs @@ -261,6 +261,12 @@ trait ConnectionSettings { trait Ip4Config { #[zbus(property)] fn address_data(&self) -> Result, Error>; + + #[zbus(property)] + fn gateway(&self) -> Result; + + #[zbus(property)] + fn nameserver_data(&self) -> Result, Error>; } #[proxy( @@ -270,6 +276,12 @@ trait Ip4Config { trait Ip6Config { #[zbus(property)] fn address_data(&self) -> Result, Error>; + + #[zbus(property)] + fn gateway(&self) -> Result; + + #[zbus(property)] + fn nameserver_data(&self) -> Result, Error>; } #[derive(Clone, Debug, DeserializeDict, ZValue, ZType)] @@ -285,6 +297,12 @@ impl TryFrom for IpNet { } } +#[derive(Clone, Debug, DeserializeDict, ZValue, ZType)] +#[zvariant(signature = "dict")] +struct NameserverData { + address: String, +} + #[proxy( interface = "org.freedesktop.NetworkManager.DHCP4Config", default_service = "org.freedesktop.NetworkManager" @@ -573,7 +591,15 @@ async fn watch_ip( Ip6ConfigProxy::new(&connection, ip6_config.clone()).await?; let mut until = Until::new() .with_stream(ip4_proxy.receive_address_data_changed().await.stub()) - .with_stream(ip6_proxy.receive_address_data_changed().await.stub()); + .with_stream(ip4_proxy.receive_gateway_changed().await.stub()) + .with_stream( + ip4_proxy.receive_nameserver_data_changed().await.stub(), + ) + .with_stream(ip6_proxy.receive_address_data_changed().await.stub()) + .with_stream(ip6_proxy.receive_gateway_changed().await.stub()) + .with_stream( + ip6_proxy.receive_nameserver_data_changed().await.stub(), + ); let dhcp4_proxy = if &*dhcp4_config != "/" { let dhcp4_proxy = @@ -595,6 +621,12 @@ async fn watch_ip( .into_iter() .chain(ip6_proxy.address_data().await?) .collect_vec(); + let lan_ip = [ + ip4_proxy.gateway().await?.parse::()?, + ip6_proxy.gateway().await?.parse::()?, + ] + .into_iter() + .collect(); let mut ntp_servers = OrdSet::new(); if let Some(dhcp4_proxy) = &dhcp4_proxy { let dhcp = dhcp4_proxy.options().await?; @@ -605,14 +637,22 @@ async fn watch_ip( ); } } + let dns_servers = [] + .into_iter() + .chain(ip4_proxy.nameserver_data().await?) + .chain(ip6_proxy.nameserver_data().await?) + .map(|NameserverData { address }| { + address.parse::() + }) + .collect::>()?; let scope_id = if_nametoindex(iface.as_str()) .with_kind(ErrorKind::Network)?; let subnets: OrdSet = addresses .into_iter() .map(IpNet::try_from) .try_collect()?; - let ip_info = if !subnets.is_empty() { - let wan_ip = match get_wan_ipv4(iface.as_str()).await { + let wan_ip = if !subnets.is_empty() { + match get_wan_ipv4(iface.as_str()).await { Ok(a) => a, Err(e) => { tracing::error!( @@ -621,18 +661,20 @@ async fn watch_ip( tracing::debug!("{e:?}"); None } - }; - Some(IpInfo { - name: name.clone(), - scope_id, - device_type, - subnets, - wan_ip, - ntp_servers, - }) + } } else { None }; + let ip_info = Some(IpInfo { + name: name.clone(), + scope_id, + device_type, + subnets, + lan_ip, + wan_ip, + ntp_servers, + dns_servers, + }); write_to.send_if_modified( |m: &mut OrdMap| { @@ -810,12 +852,12 @@ impl NetworkInterfaceController { ) -> Result<(), Error> { tracing::debug!("syncronizing {info:?} to db"); + let dns = todo!(); + db.mutate(|db| { - db.as_public_mut() - .as_server_info_mut() - .as_network_mut() - .as_gateways_mut() - .ser(info) + let net = db.as_public_mut().as_server_info_mut().as_network_mut(); + net.as_dns_mut().as_dhcp_mut().ser(&dns)?; + net.as_gateways_mut().ser(info) }) .await .result?; @@ -1170,15 +1212,11 @@ impl InterfaceFilter for bool { } } -#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord)] -pub struct LoopbackFilter; -impl InterfaceFilter for LoopbackFilter { - fn filter(&self, _: &GatewayId, info: &NetworkInterfaceInfo) -> bool { - info.ip_info.as_ref().map_or(false, |i| { - i.subnets - .iter() - .any(|i| i.contains(&IpAddr::V4(Ipv4Addr::LOCALHOST))) - }) +#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord)] +pub struct IdFilter(pub GatewayId); +impl InterfaceFilter for IdFilter { + fn filter(&self, id: &GatewayId, _: &NetworkInterfaceInfo) -> bool { + id == &self.0 } } @@ -1428,7 +1466,10 @@ impl ListenerMap { let mut keep = BTreeSet::::new(); for (_, info) in ip_info .iter() - .chain([NetworkInterfaceInfo::loopback()]) + .chain([ + NetworkInterfaceInfo::loopback(), + NetworkInterfaceInfo::lxc_bridge(), + ]) .filter(|(id, info)| filter.filter(*id, *info)) { if let Some(ip_info) = &info.ip_info { @@ -1503,7 +1544,10 @@ pub fn lookup_info_by_addr( ) -> Option<(&GatewayId, &NetworkInterfaceInfo)> { ip_info .iter() - .chain([NetworkInterfaceInfo::loopback()]) + .chain([ + NetworkInterfaceInfo::loopback(), + NetworkInterfaceInfo::lxc_bridge(), + ]) .find(|(_, i)| { i.ip_info .as_ref() diff --git a/core/startos/src/net/host/address.rs b/core/startos/src/net/host/address.rs index 1eb39d26d..830839e70 100644 --- a/core/startos/src/net/host/address.rs +++ b/core/startos/src/net/host/address.rs @@ -2,48 +2,43 @@ use std::collections::BTreeSet; use clap::Parser; use imbl_value::InternedString; +use models::GatewayId; use rpc_toolkit::{from_fn_async, Context, Empty, HandlerArgs, HandlerExt, ParentHandler}; use serde::{Deserialize, Serialize}; -use torut::onion::OnionAddressV3; use ts_rs::TS; use crate::context::{CliContext, RpcContext}; use crate::db::model::DatabaseModel; use crate::net::acme::AcmeProvider; use crate::net::host::{all_hosts, HostApiKind}; +use crate::net::tor::OnionAddress; use crate::prelude::*; use crate::util::serde::{display_serializable, HandlerExtSerde}; -#[derive(Clone, Debug, Deserialize, Serialize, TS)] +#[derive(Clone, Debug, Deserialize, Serialize)] #[serde(rename_all = "kebab-case")] #[serde(rename_all_fields = "camelCase")] #[serde(tag = "kind")] -#[ts(export)] pub enum HostAddress { Onion { - #[ts(type = "string")] - address: OnionAddressV3, + address: OnionAddress, }, Domain { - #[ts(type = "string")] address: InternedString, - public: bool, - acme: Option, + public: Option, }, } -#[derive(Debug, Deserialize, Serialize, TS)] -pub struct DomainConfig { - #[ts(type = "string")] - pub root: InternedString, - pub public: bool, +#[derive(Debug, Clone, Deserialize, Serialize, TS)] +pub struct PublicDomainConfig { + pub gateway: GatewayId, pub acme: Option, } fn check_duplicates(db: &DatabaseModel) -> Result<(), Error> { - let mut onions = BTreeSet::::new(); + let mut onions = BTreeSet::::new(); let mut domains = BTreeSet::::new(); - let mut check_onion = |onion: OnionAddressV3| { + let mut check_onion = |onion: OnionAddress| { if onions.contains(&onion) { return Err(Error::new( eyre!("onion address {onion} is already in use"), @@ -68,7 +63,10 @@ fn check_duplicates(db: &DatabaseModel) -> Result<(), Error> { for onion in host.as_onions().de()? { check_onion(onion)?; } - for domain in host.as_domains().keys()? { + for domain in host.as_domains().as_public().keys()? { + check_domain(domain)?; + } + for domain in host.as_domains().as_private().de()? { check_domain(domain)?; } } @@ -82,22 +80,50 @@ pub fn address_api( "domain", ParentHandler::::new() .subcommand( - "add", - from_fn_async(add_domain::) - .with_metadata("sync_db", Value::Bool(true)) - .with_inherited(|_, a| a) - .no_display() - .with_about("Add an address to this host") - .with_call_remote::(), + "public", + ParentHandler::::new() + .subcommand( + "add", + from_fn_async(add_public_domain::) + .with_metadata("sync_db", Value::Bool(true)) + .with_inherited(|_, a| a) + .no_display() + .with_about("Add a public domain to this host") + .with_call_remote::(), + ) + .subcommand( + "remove", + from_fn_async(remove_public_domain::) + .with_metadata("sync_db", Value::Bool(true)) + .with_inherited(|_, a| a) + .no_display() + .with_about("Remove a public domain from this host") + .with_call_remote::(), + ) + .with_inherited(|_, a| a), ) .subcommand( - "remove", - from_fn_async(remove_domain::) - .with_metadata("sync_db", Value::Bool(true)) - .with_inherited(|_, a| a) - .no_display() - .with_about("Remove an address from this host") - .with_call_remote::(), + "private", + ParentHandler::::new() + .subcommand( + "add", + from_fn_async(add_private_domain::) + .with_metadata("sync_db", Value::Bool(true)) + .with_inherited(|_, a| a) + .no_display() + .with_about("Add a private domain to this host") + .with_call_remote::(), + ) + .subcommand( + "remove", + from_fn_async(remove_private_domain::) + .with_metadata("sync_db", Value::Bool(true)) + .with_inherited(|_, a| a) + .no_display() + .with_about("Remove a private domain from this host") + .with_call_remote::(), + ) + .with_inherited(|_, a| a), ) .with_inherited(Kind::inheritance), ) @@ -146,15 +172,20 @@ pub fn address_api( } HostAddress::Domain { address, - public, - acme, + public: Some(PublicDomainConfig { gateway, acme }), } => { table.add_row(row![ address, - *public, + &format!("YES ({gateway})"), acme.as_ref().map(|a| a.0.as_str()).unwrap_or("NONE") ]); } + HostAddress::Domain { + address, + public: None, + } => { + table.add_row(row![address, &format!("NO"), "N/A"]); + } } } @@ -168,40 +199,24 @@ pub fn address_api( } #[derive(Deserialize, Serialize, Parser)] -pub struct AddDomainParams { +pub struct AddPublicDomainParams { pub domain: InternedString, #[arg(long)] - pub private: bool, - #[arg(long)] pub acme: Option, + pub gateway: GatewayId, } -pub async fn add_domain( +pub async fn add_public_domain( ctx: RpcContext, - AddDomainParams { + AddPublicDomainParams { ref domain, - private, acme, - }: AddDomainParams, + gateway, + }: AddPublicDomainParams, inheritance: Kind::Inheritance, ) -> Result<(), Error> { ctx.db .mutate(|db| { - let root = db - .as_public() - .as_server_info() - .as_network() - .as_domains() - .keys()? - .into_iter() - .find(|root| { - domain == root - || domain - .strip_suffix(&**root) - .map_or(false, |d| d.ends_with(".")) - }) - .or_not_found(lazy_format!("root domain for {domain}"))?; - if let Some(acme) = &acme { if !db .as_public() @@ -214,14 +229,10 @@ pub async fn add_domain( } } - Kind::host_for(&inheritance, db)?.as_domains_mut().insert( - domain, - &DomainConfig { - root, - public: !private, - acme, - }, - )?; + Kind::host_for(&inheritance, db)? + .as_domains_mut() + .as_public_mut() + .insert(domain, &PublicDomainConfig { acme, gateway })?; check_duplicates(db) }) .await @@ -236,7 +247,7 @@ pub struct RemoveDomainParams { pub domain: InternedString, } -pub async fn remove_domain( +pub async fn remove_public_domain( ctx: RpcContext, RemoveDomainParams { domain }: RemoveDomainParams, inheritance: Kind::Inheritance, @@ -245,6 +256,7 @@ pub async fn remove_domain( .mutate(|db| { Kind::host_for(&inheritance, db)? .as_domains_mut() + .as_public_mut() .remove(&domain) }) .await @@ -254,6 +266,50 @@ pub async fn remove_domain( Ok(()) } +#[derive(Deserialize, Serialize, Parser)] +pub struct AddPrivateDomainParams { + pub domain: InternedString, +} + +pub async fn add_private_domain( + ctx: RpcContext, + AddPrivateDomainParams { domain }: AddPrivateDomainParams, + inheritance: Kind::Inheritance, +) -> Result<(), Error> { + ctx.db + .mutate(|db| { + Kind::host_for(&inheritance, db)? + .as_domains_mut() + .as_private_mut() + .mutate(|d| Ok(d.insert(domain)))?; + check_duplicates(db) + }) + .await + .result?; + Kind::sync_host(&ctx, inheritance).await?; + + Ok(()) +} + +pub async fn remove_private_domain( + ctx: RpcContext, + RemoveDomainParams { domain }: RemoveDomainParams, + inheritance: Kind::Inheritance, +) -> Result<(), Error> { + ctx.db + .mutate(|db| { + Kind::host_for(&inheritance, db)? + .as_domains_mut() + .as_private_mut() + .mutate(|d| Ok(d.remove(&domain))) + }) + .await + .result?; + Kind::sync_host(&ctx, inheritance).await?; + + Ok(()) +} + #[derive(Deserialize, Serialize, Parser)] pub struct OnionParams { pub onion: String, @@ -272,7 +328,7 @@ pub async fn add_onion( ErrorKind::InvalidOnionAddress, ) })? - .parse::()?; + .parse::()?; ctx.db .mutate(|db| { db.as_private().as_key_store().as_onion().get_key(&onion)?; @@ -303,7 +359,7 @@ pub async fn remove_onion( ErrorKind::InvalidOnionAddress, ) })? - .parse::()?; + .parse::()?; ctx.db .mutate(|db| { Kind::host_for(&inheritance, db)? diff --git a/core/startos/src/net/host/mod.rs b/core/startos/src/net/host/mod.rs index 70c3009d9..db0c20c4d 100644 --- a/core/startos/src/net/host/mod.rs +++ b/core/startos/src/net/host/mod.rs @@ -8,15 +8,15 @@ use itertools::Itertools; use models::{HostId, PackageId}; use rpc_toolkit::{from_fn_async, Context, Empty, HandlerExt, OrEmpty, ParentHandler}; use serde::{Deserialize, Serialize}; -use torut::onion::OnionAddressV3; use ts_rs::TS; use crate::context::RpcContext; use crate::db::model::DatabaseModel; use crate::net::forward::AvailablePorts; -use crate::net::host::address::{address_api, DomainConfig, HostAddress}; +use crate::net::host::address::{address_api, HostAddress, PublicDomainConfig}; use crate::net::host::binding::{binding, BindInfo, BindOptions}; use crate::net::service_interface::HostnameInfo; +use crate::net::tor::OnionAddress; use crate::prelude::*; pub mod address; @@ -29,12 +29,23 @@ pub mod binding; pub struct Host { pub bindings: BTreeMap, #[ts(type = "string[]")] - pub onions: BTreeSet, - #[ts(as = "BTreeMap::")] - pub domains: BTreeMap, + pub onions: BTreeSet, + pub domains: Domains, /// COMPUTED: NetService::update pub hostname_info: BTreeMap>, // internal port -> Hostnames } + +#[derive(Debug, Default, Deserialize, Serialize, HasModel, TS)] +#[serde(rename_all = "camelCase")] +#[model = "Model"] +#[ts(export)] +pub struct Domains { + #[ts(as = "BTreeMap::")] + pub public: BTreeMap, + #[ts(as = "BTreeSet::")] + pub private: BTreeSet, +} + impl AsRef for Host { fn as_ref(&self) -> &Host { self @@ -51,14 +62,21 @@ impl Host { .map(|address| HostAddress::Onion { address }) .chain( self.domains + .public .iter() - .map( - |(address, DomainConfig { public, acme, .. })| HostAddress::Domain { - address: address.clone(), - public: *public, - acme: acme.clone(), - }, - ), + .map(|(address, config)| HostAddress::Domain { + address: address.clone(), + public: Some(config.clone()), + }), + ) + .chain( + self.domains + .private + .iter() + .map(|address| HostAddress::Domain { + address: address.clone(), + public: None, + }), ) } } @@ -115,12 +133,8 @@ pub fn host_for<'a>( }; host_info(db, package_id)?.upsert(host_id, || { let mut h = Host::new(); - h.onions.insert( - tor_key - .or_not_found("generated tor key")? - .public() - .get_onion_address(), - ); + h.onions + .insert(tor_key.or_not_found("generated tor key")?.onion_address()); Ok(h) }) } diff --git a/core/startos/src/net/mod.rs b/core/startos/src/net/mod.rs index bbf5f36d8..95a1b01d5 100644 --- a/core/startos/src/net/mod.rs +++ b/core/startos/src/net/mod.rs @@ -2,7 +2,6 @@ use rpc_toolkit::{Context, HandlerExt, ParentHandler}; pub mod acme; pub mod dns; -pub mod domain; pub mod forward; pub mod gateway; pub mod host; @@ -30,8 +29,8 @@ pub fn net_api() -> ParentHandler { acme::acme_api::().with_about("Setup automatic clearnet certificate acquisition"), ) .subcommand( - "domain", - domain::domain_api::().with_about("Setup clearnet domains"), + "dns", + dns::dns_api::().with_about("Manage and query DNS"), ) .subcommand( "gateway", diff --git a/core/startos/src/net/net_controller.rs b/core/startos/src/net/net_controller.rs index a86c5a4cf..e2675860c 100644 --- a/core/startos/src/net/net_controller.rs +++ b/core/startos/src/net/net_controller.rs @@ -9,23 +9,23 @@ use ipnet::IpNet; use models::{HostId, OptionExt, PackageId}; use tokio::sync::Mutex; use tokio::task::JoinHandle; -use torut::onion::{OnionAddressV3, TorSecretKeyV3}; use tracing::instrument; +use crate::db::model::public::NetworkInterfaceInfo; use crate::db::model::Database; use crate::error::ErrorCollection; use crate::hostname::Hostname; use crate::net::dns::DnsController; -use crate::net::forward::{PortForwardController, START9_BRIDGE_IFACE}; +use crate::net::forward::PortForwardController; use crate::net::gateway::{ - AndFilter, DynInterfaceFilter, InterfaceFilter, LoopbackFilter, NetworkInterfaceController, - SecureFilter, + AndFilter, DynInterfaceFilter, IdFilter, InterfaceFilter, NetworkInterfaceController, OrFilter, + PublicFilter, SecureFilter, }; use crate::net::host::address::HostAddress; use crate::net::host::binding::{AddSslOptions, BindId, BindOptions}; use crate::net::host::{host_for, Host, Hosts}; use crate::net::service_interface::{HostnameInfo, IpHostname, OnionHostname}; -use crate::net::tor::TorController; +use crate::net::tor::{OnionAddress, TorController, TorSecretKey}; use crate::net::utils::ipv6_is_local; use crate::net::vhost::{AlpnInfo, TargetInfo, VHostController}; use crate::prelude::*; @@ -45,23 +45,13 @@ pub struct NetController { } impl NetController { - pub async fn init( - db: TypedPatchDb, - tor_control: SocketAddr, - tor_socks: SocketAddr, - hostname: &Hostname, - ) -> Result { + pub async fn init(db: TypedPatchDb, hostname: &Hostname) -> Result { let net_iface = Arc::new(NetworkInterfaceController::new(db.clone())); Ok(Self { db: db.clone(), - tor: TorController::new(tor_control, tor_socks), + tor: TorController::new().await?, vhost: VHostController::new(db, net_iface.clone()), - dns: DnsController::init( - net_iface - .watcher - .wait_for_activated(START9_BRIDGE_IFACE.into()), - ) - .await?, + dns: DnsController::init(&net_iface.watcher).await?, forward: PortForwardController::new(net_iface.watcher.subscribe()), net_iface, server_hostnames: vec![ @@ -86,7 +76,7 @@ impl NetController { package: PackageId, ip: Ipv4Addr, ) -> Result { - let dns = self.dns.add(Some(package.clone()), ip).await?; + let dns = self.dns.add_service(Some(package.clone()), ip)?; let res = NetService::new(NetServiceData { id: Some(package), @@ -100,7 +90,7 @@ impl NetController { } pub async fn os_bindings(self: &Arc) -> Result { - let dns = self.dns.add(None, HOST_IP.into()).await?; + let dns = self.dns.add_service(None, HOST_IP.into())?; let service = NetService::new(NetServiceData { id: None, @@ -136,7 +126,8 @@ impl NetController { struct HostBinds { forwards: BTreeMap)>, vhosts: BTreeMap<(Option, u16), (TargetInfo, Arc<()>)>, - tor: BTreeMap, Vec>)>, + private_dns: BTreeMap>, + tor: BTreeMap, Vec>)>, } pub struct NetServiceData { @@ -227,7 +218,8 @@ impl NetServiceData { async fn update(&mut self, ctrl: &NetController, id: HostId, host: Host) -> Result<(), Error> { let mut forwards: BTreeMap = BTreeMap::new(); let mut vhosts: BTreeMap<(Option, u16), TargetInfo> = BTreeMap::new(); - let mut tor: BTreeMap)> = + let mut private_dns: BTreeSet = BTreeSet::new(); + let mut tor: BTreeMap)> = BTreeMap::new(); let mut hostname_info: BTreeMap> = BTreeMap::new(); let binds = self.binds.entry(id.clone()).or_default(); @@ -278,52 +270,100 @@ impl NetServiceData { vhosts.insert( (Some(hostname), external), TargetInfo { - filter: LoopbackFilter.into_dyn(), + filter: OrFilter( + IdFilter( + NetworkInterfaceInfo::loopback().0.clone(), + ), + IdFilter( + NetworkInterfaceInfo::lxc_bridge().0.clone(), + ), + ) + .into_dyn(), acme: None, addr, connect_ssl: connect_ssl.clone(), }, - ); + ); // TODO: wrap onion ssl stream directly in tor ctrl } } - HostAddress::Domain { - address, - public, - acme, - } => { + HostAddress::Domain { address, public } => { if hostnames.insert(address.clone()) { let address = Some(address.clone()); if ssl.preferred_external_port == 443 { - if public { + if let Some(public) = &public { vhosts.insert( (address.clone(), 5443), TargetInfo { - filter: bind.net.clone().into_dyn(), - acme: acme.clone(), + filter: AndFilter( + bind.net.clone(), + AndFilter( + IdFilter(public.gateway.clone()), + PublicFilter { public: false }, + ), + ) + .into_dyn(), + acme: public.acme.clone(), + addr, + connect_ssl: connect_ssl.clone(), + }, + ); + vhosts.insert( + (address.clone(), 443), + TargetInfo { + filter: AndFilter( + bind.net.clone(), + OrFilter( + IdFilter(public.gateway.clone()), + PublicFilter { public: false }, + ), + ) + .into_dyn(), + acme: public.acme.clone(), + addr, + connect_ssl: connect_ssl.clone(), + }, + ); + } else { + vhosts.insert( + (address.clone(), 443), + TargetInfo { + filter: AndFilter( + bind.net.clone(), + PublicFilter { public: false }, + ) + .into_dyn(), + acme: None, addr, connect_ssl: connect_ssl.clone(), }, ); } - vhosts.insert( - (address.clone(), 443), - TargetInfo { - filter: bind.net.clone().into_dyn(), - acme, - addr, - connect_ssl: connect_ssl.clone(), - }, - ); } else { - vhosts.insert( - (address.clone(), external), - TargetInfo { - filter: bind.net.clone().into_dyn(), - acme, - addr, - connect_ssl: connect_ssl.clone(), - }, - ); + if let Some(public) = public { + vhosts.insert( + (address.clone(), external), + TargetInfo { + filter: AndFilter( + bind.net.clone(), + IdFilter(public.gateway.clone()), + ) + .into_dyn(), + acme: public.acme.clone(), + addr, + connect_ssl: connect_ssl.clone(), + }, + ); + } else { + vhosts.insert( + (address.clone(), external), + TargetInfo { + filter: bind.net.clone().into_dyn(), + acme: None, + addr, + connect_ssl: connect_ssl.clone(), + }, + ); + } } } } @@ -383,7 +423,7 @@ impl NetServiceData { { bind_hostname_info.push(HostnameInfo::Ip { gateway_id: interface.clone(), - public, // TODO: check if port forward is active + public: public.is_some(), hostname: IpHostname::Domain { value: address.clone(), port: None, @@ -393,7 +433,7 @@ impl NetServiceData { } else { bind_hostname_info.push(HostnameInfo::Ip { gateway_id: interface.clone(), - public, + public: public.is_some(), hostname: IpHostname::Domain { value: address.clone(), port: bind.net.assigned_port, @@ -448,6 +488,7 @@ impl NetServiceData { } } hostname_info.insert(*port, bind_hostname_info); + private_dns.append(&mut hostnames); } } @@ -497,7 +538,7 @@ impl NetServiceData { .as_key_store() .as_onion() .get_key(tor_addr)?; - tor.insert(key.public().get_onion_address(), (key, tor_binds.clone())); + tor.insert(key.onion_address(), (key, tor_binds.clone())); for (internal, ports) in &tor_hostname_ports { let mut bind_hostname_info = hostname_info.remove(internal).unwrap_or_default(); bind_hostname_info.push(HostnameInfo::Onion { @@ -563,6 +604,22 @@ impl NetServiceData { } } + let mut rm = BTreeSet::new(); + binds.private_dns.retain(|fqdn, _| { + if private_dns.remove(fqdn) { + true + } else { + rm.insert(fqdn.clone()); + false + } + }); + for fqdn in private_dns { + binds + .private_dns + .insert(fqdn.clone(), ctrl.dns.add_private_domain(fqdn)?); + } + ctrl.dns.gc_private_domains(&rm)?; + let all = binds .tor .keys() @@ -578,17 +635,15 @@ impl NetServiceData { if let Some(prev) = prev { prev } else { - let rcs = ctrl - .tor - .add(key, tor_binds.iter().map(|(k, v)| (*k, *v)).collect()) - .await?; + let service = ctrl.tor.service(key)?; + let rcs = service.proxy_all(tor_binds.iter().map(|(k, v)| (*k, *v))); (tor_binds, rcs) }, ); } else { if let Some((_, rc)) = prev { drop(rc); - ctrl.tor.gc(Some(onion), None).await?; + ctrl.tor.gc(Some(onion)).await?; } } } diff --git a/core/startos/src/net/service_interface.rs b/core/startos/src/net/service_interface.rs index 0b37c4ad8..7ffab22ed 100644 --- a/core/startos/src/net/service_interface.rs +++ b/core/startos/src/net/service_interface.rs @@ -1,7 +1,6 @@ use std::net::{Ipv4Addr, Ipv6Addr}; use imbl_value::InternedString; -use lazy_format::lazy_format; use models::{GatewayId, HostId, ServiceInterfaceId}; use serde::{Deserialize, Serialize}; use ts_rs::TS; diff --git a/core/startos/src/net/tor.rs b/core/startos/src/net/tor.rs index 1fb8054ca..056d4134b 100644 --- a/core/startos/src/net/tor.rs +++ b/core/startos/src/net/tor.rs @@ -1,69 +1,214 @@ +use std::borrow::Cow; use std::collections::{BTreeMap, BTreeSet}; use std::net::SocketAddr; -use std::sync::atomic::AtomicBool; +use std::str::FromStr; use std::sync::{Arc, Weak}; -use std::time::Duration; +use arti_client::config::onion_service::OnionServiceConfigBuilder; +use arti_client::{TorClient, TorClientConfig}; +use base64::Engine; use clap::Parser; use color_eyre::eyre::eyre; -use futures::future::BoxFuture; -use futures::{FutureExt, TryStreamExt}; +use futures::FutureExt; use helpers::NonDetachingJoinHandle; +use imbl_value::InternedString; use itertools::Itertools; use lazy_static::lazy_static; use regex::Regex; use rpc_toolkit::{from_fn_async, Context, Empty, HandlerExt, ParentHandler}; +use safelog::DisplayRedacted; use serde::{Deserialize, Serialize}; -use tokio::net::TcpStream; -use tokio::process::Command; -use tokio::sync::{mpsc, oneshot}; -use tokio::time::Instant; -use torut::control::{AsyncEvent, AuthenticatedConn, ConnError}; -use torut::onion::{OnionAddressV3, TorSecretKeyV3}; -use tracing::instrument; +use tor_hscrypto::pk::{HsId, HsIdKeypair}; +use tor_hsservice::status::State as ArtiOnionServiceState; +use tor_hsservice::{HsNickname, RunningOnionService}; +use tor_keymgr::config::ArtiKeystoreKind; +use tor_rtcompat::tokio::TokioRustlsRuntime; use ts_rs::TS; use crate::context::{CliContext, RpcContext}; -use crate::logs::{journalctl, LogSource, LogsParams}; use crate::prelude::*; -use crate::util::serde::{display_serializable, Base64, HandlerExtSerde, WithIoFormat}; -use crate::util::Invoke; +use crate::util::serde::{ + deserialize_from_str, display_serializable, serialize_display, Base64, HandlerExtSerde, + WithIoFormat, BASE64, +}; +use crate::util::sync::{SyncMutex, SyncRwLock}; -pub const SYSTEMD_UNIT: &str = "tor@default"; const STARTING_HEALTH_TIMEOUT: u64 = 120; // 2min -#[derive(Debug, Default, Deserialize, Serialize)] -pub struct OnionStore(BTreeMap); +#[derive(Debug, Clone, Copy)] +pub struct OnionAddress(pub HsId); +impl std::fmt::Display for OnionAddress { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + self.0.fmt_unredacted(f) + } +} +impl FromStr for OnionAddress { + type Err = Error; + fn from_str(s: &str) -> Result { + Ok(Self( + if s.ends_with(".onion") { + Cow::Borrowed(s) + } else { + Cow::Owned(format!("{s}.onion")) + } + .parse::() + .with_kind(ErrorKind::Tor)?, + )) + } +} +impl Serialize for OnionAddress { + fn serialize(&self, serializer: S) -> Result + where + S: serde::Serializer, + { + serialize_display(self, serializer) + } +} +impl<'de> Deserialize<'de> for OnionAddress { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + deserialize_from_str(deserializer) + } +} +impl PartialEq for OnionAddress { + fn eq(&self, other: &Self) -> bool { + self.0.as_ref() == other.0.as_ref() + } +} +impl Eq for OnionAddress {} +impl PartialOrd for OnionAddress { + fn partial_cmp(&self, other: &Self) -> Option { + self.0.as_ref().partial_cmp(other.0.as_ref()) + } +} +impl Ord for OnionAddress { + fn cmp(&self, other: &Self) -> std::cmp::Ordering { + self.0.as_ref().cmp(other.0.as_ref()) + } +} + +pub struct TorSecretKey(pub HsIdKeypair); +impl TorSecretKey { + pub fn onion_address(&self) -> OnionAddress { + OnionAddress(HsId::from(self.0.as_ref().public().to_bytes())) + } + pub fn from_bytes(bytes: [u8; 64]) -> Result { + Ok(Self( + tor_llcrypto::pk::ed25519::ExpandedKeypair::from_secret_key_bytes(bytes) + .ok_or_else(|| { + Error::new(eyre!("invalid ed25519 expanded secret key"), ErrorKind::Tor) + })? + .into(), + )) + } + pub fn generate() -> Self { + Self( + tor_llcrypto::pk::ed25519::ExpandedKeypair::from( + &tor_llcrypto::pk::ed25519::Keypair::generate(&mut rand::rng()), + ) + .into(), + ) + } +} +impl Clone for TorSecretKey { + fn clone(&self) -> Self { + Self(HsIdKeypair::from( + tor_llcrypto::pk::ed25519::ExpandedKeypair::from_secret_key_bytes( + self.0.as_ref().to_secret_key_bytes(), + ) + .unwrap(), + )) + } +} +impl std::fmt::Display for TorSecretKey { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!( + f, + "{}", + BASE64.encode(self.0.as_ref().to_secret_key_bytes()) + ) + } +} +impl FromStr for TorSecretKey { + type Err = Error; + fn from_str(s: &str) -> Result { + Self::from_bytes(Base64::<[u8; 64]>::from_str(s)?.0) + } +} +impl Serialize for TorSecretKey { + fn serialize(&self, serializer: S) -> Result + where + S: serde::Serializer, + { + serialize_display(self, serializer) + } +} +impl<'de> Deserialize<'de> for TorSecretKey { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + deserialize_from_str(deserializer) + } +} + +#[derive(Default, Deserialize, Serialize)] +pub struct OnionStore(BTreeMap); impl Map for OnionStore { - type Key = OnionAddressV3; - type Value = TorSecretKeyV3; + type Key = OnionAddress; + type Value = TorSecretKey; fn key_str(key: &Self::Key) -> Result, Error> { - Ok(key.get_address_without_dot_onion()) + Self::key_string(key) + } + fn key_string(key: &Self::Key) -> Result { + Ok(InternedString::from_display(key)) } } impl OnionStore { pub fn new() -> Self { Self::default() } - pub fn insert(&mut self, key: TorSecretKeyV3) { - self.0.insert(key.public().get_onion_address(), key); + pub fn insert(&mut self, key: TorSecretKey) { + self.0.insert(key.onion_address(), key); } } impl Model { - pub fn new_key(&mut self) -> Result { - let key = TorSecretKeyV3::generate(); - self.insert(&key.public().get_onion_address(), &key)?; + pub fn new_key(&mut self) -> Result { + let key = TorSecretKey::generate(); + self.insert(&key.onion_address(), &key)?; Ok(key) } - pub fn insert_key(&mut self, key: &TorSecretKeyV3) -> Result<(), Error> { - self.insert(&key.public().get_onion_address(), &key) + pub fn insert_key(&mut self, key: &TorSecretKey) -> Result<(), Error> { + self.insert(&key.onion_address(), &key) } - pub fn get_key(&self, address: &OnionAddressV3) -> Result { + pub fn get_key(&self, address: &OnionAddress) -> Result { self.as_idx(address) .or_not_found(lazy_format!("private key for {address}"))? .de() } } +impl std::fmt::Debug for OnionStore { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + struct OnionStoreMap<'a>(&'a BTreeMap); + impl<'a> std::fmt::Debug for OnionStoreMap<'a> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + #[derive(Debug)] + struct KeyFor(OnionAddress); + let mut map = f.debug_map(); + for (k, v) in self.0 { + map.key(k); + map.value(&KeyFor(v.onion_address())); + } + map.finish() + } + } + f.debug_tuple("OnionStore") + .field(&OnionStoreMap(&self.0)) + .finish() + } +} enum ErrorLogSeverity { Fatal { wipe_state: bool }, @@ -94,13 +239,6 @@ pub fn tor_api() -> ParentHandler { .with_about("Display Tor V3 Onion Addresses") .with_call_remote::(), ) - .subcommand("logs", logs().with_about("Display Tor logs")) - .subcommand( - "logs", - from_fn_async(crate::logs::cli_logs::) - .no_display() - .with_about("Display Tor logs"), - ) .subcommand( "reset", from_fn_async(reset) @@ -142,7 +280,7 @@ pub fn key() -> ParentHandler { ) } -pub async fn generate_key(ctx: RpcContext) -> Result { +pub async fn generate_key(ctx: RpcContext) -> Result { ctx.db .mutate(|db| { Ok(db @@ -150,8 +288,7 @@ pub async fn generate_key(ctx: RpcContext) -> Result { .as_key_store_mut() .as_onion_mut() .new_key()? - .public() - .get_onion_address()) + .onion_address()) }) .await .result @@ -165,8 +302,8 @@ pub struct AddKeyParams { pub async fn add_key( ctx: RpcContext, AddKeyParams { key }: AddKeyParams, -) -> Result { - let key = TorSecretKeyV3::from(key.0); +) -> Result { + let key = TorSecretKey::from_bytes(key.0)?; ctx.db .mutate(|db| { db.as_private_mut() @@ -176,10 +313,10 @@ pub async fn add_key( }) .await .result?; - Ok(key.public().get_onion_address()) + Ok(key.onion_address()) } -pub async fn list_keys(ctx: RpcContext) -> Result, Error> { +pub async fn list_keys(ctx: RpcContext) -> Result, Error> { ctx.db .peek() .await @@ -195,22 +332,15 @@ pub async fn list_keys(ctx: RpcContext) -> Result, Erro pub struct ResetParams { #[arg(name = "wipe-state", short = 'w', long = "wipe-state")] wipe_state: bool, - reason: String, } -pub async fn reset( - ctx: RpcContext, - ResetParams { reason, wipe_state }: ResetParams, -) -> Result<(), Error> { - ctx.net_controller - .tor - .reset(wipe_state, Error::new(eyre!("{reason}"), ErrorKind::Tor)) - .await +pub async fn reset(ctx: RpcContext, ResetParams { wipe_state }: ResetParams) -> Result<(), Error> { + ctx.net_controller.tor.reset(wipe_state).await } pub fn display_services( params: WithIoFormat, - services: Vec, + services: BTreeMap, ) -> Result<(), Error> { use prettytable::*; @@ -219,621 +349,156 @@ pub fn display_services( } let mut table = Table::new(); - for service in services { - let row = row![&service.to_string()]; + for (service, status) in services { + let row = row![&service.to_string(), &format!("{status:?}")]; table.add_row(row); } table.print_tty(false)?; Ok(()) } -pub async fn list_services(ctx: RpcContext, _: Empty) -> Result, Error> { +#[derive(Debug, Serialize, Deserialize)] +#[serde(rename_all = "kebab-case")] +pub enum OnionServiceState { + Shutdown, + Bootstrapping, + DegradedReachable, + DegradedUnreachable, + Running, + Recovering, + Broken, +} + +pub async fn list_services( + ctx: RpcContext, + _: Empty, +) -> Result, Error> { ctx.net_controller.tor.list_services().await } -pub fn logs() -> ParentHandler { - crate::logs::logs::(|_: &RpcContext, _| async { - Ok(LogSource::Unit(SYSTEMD_UNIT)) - }) +pub struct TorController { + client: TorClient, + services: SyncMutex>, } - -fn event_handler(_event: AsyncEvent<'static>) -> BoxFuture<'static, Result<(), ConnError>> { - async move { Ok(()) }.boxed() -} - -pub struct TorController(TorControl); impl TorController { - pub fn new(tor_control: SocketAddr, tor_socks: SocketAddr) -> Self { - TorController(TorControl::new(tor_control, tor_socks)) + pub async fn new() -> Result { + let mut config = TorClientConfig::builder(); + config + .storage() + .keystore() + .primary() + .kind(ArtiKeystoreKind::Ephemeral.into()); + Ok(Self { + client: TorClient::with_runtime(TokioRustlsRuntime::current()?) + .config(config.build().with_kind(ErrorKind::Tor)?) + .create_unbootstrapped_async() + .await?, + services: SyncMutex::new(BTreeMap::new()), + }) } - pub async fn add( - &self, - key: TorSecretKeyV3, - bindings: Vec<(u16, SocketAddr)>, - ) -> Result>, Error> { - let (reply, res) = oneshot::channel(); - self.0 - .send - .send(TorCommand::AddOnion { - key, - bindings, - reply, - }) - .map_err(|_| Error::new(eyre!("TorControl died"), ErrorKind::Tor))?; - res.await - .map_err(|_| Error::new(eyre!("TorControl died"), ErrorKind::Tor)) + pub fn service(&self, key: TorSecretKey) -> Result { + self.services.mutate(|s| { + use std::collections::btree_map::Entry; + let addr = key.onion_address(); + match s.entry(addr) { + Entry::Occupied(e) => Ok(e.get().clone()), + Entry::Vacant(e) => Ok(e.insert(OnionService::launch(&self.client, key)?).clone()), + } + }) } - pub async fn gc( - &self, - addr: Option, - external: Option, - ) -> Result<(), Error> { - self.0 - .send - .send(TorCommand::GC { addr, external }) - .ok() - .ok_or_else(|| Error::new(eyre!("TorControl died"), ErrorKind::Tor)) - } - - pub async fn reset(&self, wipe_state: bool, context: Error) -> Result<(), Error> { - self.0 - .send - .send(TorCommand::Reset { - wipe_state, - context, - }) - .ok() - .ok_or_else(|| Error::new(eyre!("TorControl died"), ErrorKind::Tor)) - } - - pub async fn list_services(&self) -> Result, Error> { - let (reply, res) = oneshot::channel(); - self.0 - .send - .send(TorCommand::GetInfo { - query: "onions/current".into(), - reply, - }) - .ok() - .ok_or_else(|| Error::new(eyre!("TorControl died"), ErrorKind::Tor))?; - res.await - .ok() - .ok_or_else(|| Error::new(eyre!("TorControl died"), ErrorKind::Tor))?? - .lines() - .map(|l| l.trim()) - .filter(|l| !l.is_empty()) - .map(|l| l.parse::().with_kind(ErrorKind::Tor)) - .collect() - } -} - -type AuthenticatedConnection = AuthenticatedConn< - TcpStream, - Box) -> BoxFuture<'static, Result<(), ConnError>> + Send + Sync>, ->; - -enum TorCommand { - AddOnion { - key: TorSecretKeyV3, - bindings: Vec<(u16, SocketAddr)>, - reply: oneshot::Sender>>, - }, - GC { - addr: Option, - external: Option, - }, - GetInfo { - query: String, - reply: oneshot::Sender>, - }, - Reset { - wipe_state: bool, - context: Error, - }, -} - -#[instrument(skip_all)] -async fn torctl( - tor_control: SocketAddr, - tor_socks: SocketAddr, - recv: &mut mpsc::UnboundedReceiver, - services: &mut BTreeMap< - OnionAddressV3, - ( - TorSecretKeyV3, - BTreeMap>>, - ), - >, - wipe_state: &AtomicBool, - health_timeout: &mut Duration, -) -> Result<(), Error> { - let bootstrap = async { - if Command::new("systemctl") - .arg("is-active") - .arg("--quiet") - .arg("tor") - .invoke(ErrorKind::Tor) - .await - .is_ok() - { - Command::new("systemctl") - .arg("stop") - .arg("tor") - .invoke(ErrorKind::Tor) - .await?; - for _ in 0..30 { - if TcpStream::connect(tor_control).await.is_err() { - break; - } - tokio::time::sleep(Duration::from_secs(1)).await; - } - if TcpStream::connect(tor_control).await.is_ok() { - return Err(Error::new( - eyre!("Tor is failing to shut down"), - ErrorKind::Tor, - )); - } - } - if wipe_state.load(std::sync::atomic::Ordering::SeqCst) { - tokio::fs::remove_dir_all("/var/lib/tor").await?; - wipe_state.store(false, std::sync::atomic::Ordering::SeqCst); - } - tokio::fs::create_dir_all("/var/lib/tor").await?; - Command::new("chown") - .arg("-R") - .arg("debian-tor") - .arg("/var/lib/tor") - .invoke(ErrorKind::Filesystem) - .await?; - Command::new("systemctl") - .arg("start") - .arg("tor") - .invoke(ErrorKind::Tor) - .await?; - - let logs = journalctl( - LogSource::Unit(SYSTEMD_UNIT), - Some(0), - None, - Some("0"), - false, - true, - ) - .await?; - - let mut tcp_stream = None; - for _ in 0..60 { - if let Ok(conn) = TcpStream::connect(tor_control).await { - tcp_stream = Some(conn); - break; - } - tokio::time::sleep(Duration::from_secs(1)).await; - } - let tcp_stream = tcp_stream.ok_or_else(|| { - Error::new(eyre!("Timed out waiting for tor to start"), ErrorKind::Tor) - })?; - tracing::info!("Tor is started"); - - let mut conn = torut::control::UnauthenticatedConn::new(tcp_stream); - let auth = conn - .load_protocol_info() - .await? - .make_auth_data()? - .ok_or_else(|| eyre!("Cookie Auth Not Available")) - .with_kind(crate::ErrorKind::Tor)?; - conn.authenticate(&auth).await?; - let mut connection: AuthenticatedConnection = conn.into_authenticated().await; - connection.set_async_event_handler(Some(Box::new(|event| event_handler(event)))); - - let mut bootstrapped = false; - let mut last_increment = (String::new(), Instant::now()); - for _ in 0..300 { - match connection.get_info("status/bootstrap-phase").await { - Ok(a) => { - if a.contains("TAG=done") { - bootstrapped = true; - break; - } - if let Some(p) = PROGRESS_REGEX.captures(&a) { - if let Some(p) = p.get(1) { - if p.as_str() != &*last_increment.0 { - last_increment = (p.as_str().into(), Instant::now()); - } - } - } - } - Err(e) => { - let e = Error::from(e); - tracing::error!("{}", e); - tracing::debug!("{:?}", e); - } - } - if last_increment.1.elapsed() > Duration::from_secs(30) { - return Err(Error::new( - eyre!("Tor stuck bootstrapping at {}%", last_increment.0), - ErrorKind::Tor, - )); - } - tokio::time::sleep(Duration::from_secs(1)).await; - } - if !bootstrapped { - return Err(Error::new( - eyre!("Timed out waiting for tor to bootstrap"), - ErrorKind::Tor, - )); - } - Ok((connection, logs)) - }; - let pre_handler = async { - while let Some(command) = recv.recv().await { - match command { - TorCommand::AddOnion { - key, - bindings, - reply, - } => { - let addr = key.public().get_onion_address(); - let mut service = if let Some((_key, service)) = services.remove(&addr) { - debug_assert_eq!(key, _key); - service - } else { - BTreeMap::new() - }; - let mut rcs = Vec::with_capacity(bindings.len()); - for (external, target) in bindings { - let mut binding = service.remove(&external).unwrap_or_default(); - let rc = if let Some(rc) = - Weak::upgrade(&binding.remove(&target).unwrap_or_default()) - { - rc - } else { - Arc::new(()) - }; - binding.insert(target, Arc::downgrade(&rc)); - service.insert(external, binding); - rcs.push(rc); - } - services.insert(addr, (key, service)); - reply.send(rcs).unwrap_or_default(); - } - TorCommand::GetInfo { reply, .. } => { - reply - .send(Err(Error::new( - eyre!("Tor has not finished bootstrapping..."), - ErrorKind::Tor, - ))) - .unwrap_or_default(); - } - TorCommand::GC { .. } => (), - TorCommand::Reset { - wipe_state: new_wipe_state, - context, - } => { - wipe_state.fetch_or(new_wipe_state, std::sync::atomic::Ordering::SeqCst); - return Err(context); - } - } - } - Ok(()) - }; - - let (mut connection, mut logs) = tokio::select! { - res = bootstrap => res?, - res = pre_handler => return res, - }; - - let hck_key = TorSecretKeyV3::generate(); - connection - .add_onion_v3( - &hck_key, - false, - false, - false, - None, - &mut [(80, SocketAddr::from(([127, 0, 0, 1], 80)))].iter(), - ) - .await?; - - for (addr, (key, service)) in std::mem::take(services) { - let bindings = service - .iter() - .flat_map(|(ext, int)| { - int.iter() - .find(|(_, rc)| rc.strong_count() > 0) - .map(|(addr, _)| (*ext, SocketAddr::from(*addr))) - }) - .collect::>(); - if !bindings.is_empty() { - services.insert(addr, (key.clone(), service)); - connection - .add_onion_v3(&key, false, false, false, None, &mut bindings.iter()) - .await?; - } - } - - let handler = async { - while let Some(command) = recv.recv().await { - match command { - TorCommand::AddOnion { - key, - bindings, - reply, - } => { - let mut rm_res = Ok(()); - let addr = key.public().get_onion_address(); - let onion_base = addr.get_address_without_dot_onion(); - let mut service = if let Some((_key, service)) = services.remove(&addr) { - debug_assert_eq!(_key, key); - rm_res = connection.del_onion(&onion_base).await; - service - } else { - BTreeMap::new() - }; - let mut rcs = Vec::with_capacity(bindings.len()); - for (external, target) in bindings { - let mut binding = service.remove(&external).unwrap_or_default(); - let rc = if let Some(rc) = - Weak::upgrade(&binding.remove(&target).unwrap_or_default()) - { - rc - } else { - Arc::new(()) - }; - binding.insert(target, Arc::downgrade(&rc)); - service.insert(external, binding); - rcs.push(rc); - } - let bindings = service - .iter() - .flat_map(|(ext, int)| { - int.iter() - .find(|(_, rc)| rc.strong_count() > 0) - .map(|(addr, _)| (*ext, SocketAddr::from(*addr))) - }) - .collect::>(); - services.insert(addr, (key.clone(), service)); - reply.send(rcs).unwrap_or_default(); - rm_res?; - connection - .add_onion_v3(&key, false, false, false, None, &mut bindings.iter()) - .await?; - } - TorCommand::GC { addr, external } => { - for addr in if addr.is_some() { - itertools::Either::Left(addr.into_iter()) - } else { - itertools::Either::Right(services.keys().cloned().collect_vec().into_iter()) - } { - if let Some((key, mut service)) = services.remove(&addr) { - let onion_base: String = addr.get_address_without_dot_onion(); - for external in if external.is_some() { - itertools::Either::Left(external.into_iter()) - } else { - itertools::Either::Right( - service.keys().copied().collect_vec().into_iter(), - ) - } { - if let Some(mut binding) = service.remove(&external) { - binding = binding - .into_iter() - .filter(|(_, rc)| rc.strong_count() > 0) - .collect(); - if !binding.is_empty() { - service.insert(external, binding); - } - } - } - let rm_res = connection.del_onion(&onion_base).await; - if !service.is_empty() { - let bindings = service - .iter() - .flat_map(|(ext, int)| { - int.iter() - .find(|(_, rc)| rc.strong_count() > 0) - .map(|(addr, _)| (*ext, SocketAddr::from(*addr))) - }) - .collect::>(); - if !bindings.is_empty() { - services.insert(addr, (key.clone(), service)); - } - rm_res?; - if !bindings.is_empty() { - connection - .add_onion_v3( - &key, - false, - false, - false, - None, - &mut bindings.iter(), - ) - .await?; - } - } else { - rm_res?; - } - } - } - } - TorCommand::GetInfo { query, reply } => { - reply - .send(connection.get_info(&query).await.with_kind(ErrorKind::Tor)) - .unwrap_or_default(); - } - TorCommand::Reset { - wipe_state: new_wipe_state, - context, - } => { - wipe_state.fetch_or(new_wipe_state, std::sync::atomic::Ordering::SeqCst); - return Err(context); - } - } - } - Ok(()) - }; - let log_parser = async { - while let Some(log) = logs.try_next().await? { - for (regex, severity) in &*LOG_REGEXES { - if regex.is_match(&log.message) { - let (check, wipe_state) = match severity { - ErrorLogSeverity::Fatal { wipe_state } => (false, *wipe_state), - ErrorLogSeverity::Unknown { wipe_state } => (true, *wipe_state), - }; - if !check - || tokio::time::timeout( - Duration::from_secs(30), - tokio_socks::tcp::Socks5Stream::connect( - tor_socks, - (hck_key.public().get_onion_address().to_string(), 80), - ), - ) - .await - .map_err(|e| tracing::warn!("Tor is confirmed to be down: {e}")) - .and_then(|a| { - a.map_err(|e| tracing::warn!("Tor is confirmed to be down: {e}")) - }) - .is_err() - { - if wipe_state { - Command::new("systemctl") - .arg("stop") - .arg("tor") - .invoke(ErrorKind::Tor) - .await?; - tokio::fs::remove_dir_all("/var/lib/tor").await?; - } - return Err(Error::new(eyre!("{}", log.message), ErrorKind::Tor)); - } - } - } - } - Err(Error::new(eyre!("Log stream terminated"), ErrorKind::Tor)) - }; - let health_checker = async { - let mut last_success = Instant::now(); - loop { - tokio::time::sleep(Duration::from_secs(30)).await; - if tokio::time::timeout( - Duration::from_secs(30), - tokio_socks::tcp::Socks5Stream::connect( - tor_socks, - (hck_key.public().get_onion_address().to_string(), 80), - ), - ) - .await - .map_err(|e| e.to_string()) - .and_then(|e| e.map_err(|e| e.to_string())) - .is_err() - { - if last_success.elapsed() > *health_timeout { - let err = Error::new(eyre!("Tor health check failed for longer than current timeout ({health_timeout:?})"), crate::ErrorKind::Tor); - *health_timeout *= 2; - wipe_state.store(true, std::sync::atomic::Ordering::SeqCst); - return Err(err); + pub async fn gc(&self, addr: Option) -> Result<(), Error> { + if let Some(addr) = addr { + if let Some(s) = self.services.mutate(|s| { + let rm = if let Some(s) = s.get(&addr) { + !s.gc() + } else { + false + }; + if rm { + s.remove(&addr) + } else { + None } + }) { + s.shutdown().await } else { - last_success = Instant::now(); + Ok(()) } + } else { + for s in self.services.mutate(|s| { + let mut rm = Vec::new(); + s.retain(|_, s| { + if s.gc() { + true + } else { + rm.push(s.clone()); + false + } + }); + rm + }) { + s.shutdown().await?; + } + Ok(()) } - }; - - tokio::select! { - res = handler => res?, - res = log_parser => res?, - res = health_checker => res?, } - Ok(()) + pub async fn reset(&self, wipe_state: bool) -> Result<(), Error> { + todo!() + } + + pub async fn list_services(&self) -> Result, Error> { + todo!() + } } -struct TorControl { +#[derive(Clone)] +pub struct OnionService(Arc); +struct OnionServiceData { + service: Arc, + bindings: Arc>>>>, _thread: NonDetachingJoinHandle<()>, - send: mpsc::UnboundedSender, } -impl TorControl { - pub fn new(tor_control: SocketAddr, tor_socks: SocketAddr) -> Self { - let (send, mut recv) = mpsc::unbounded_channel(); - Self { - _thread: tokio::spawn(async move { - let mut services = BTreeMap::new(); - let wipe_state = AtomicBool::new(false); - let mut health_timeout = Duration::from_secs(STARTING_HEALTH_TIMEOUT); - while let Err(e) = torctl( - tor_control, - tor_socks, - &mut recv, - &mut services, - &wipe_state, - &mut health_timeout, +impl OnionService { + fn launch(client: &TorClient, key: TorSecretKey) -> Result { + let (service, stream) = client.launch_onion_service_with_hsid( + OnionServiceConfigBuilder::default() + .nickname( + key.onion_address() + .to_string() + .trim_end_matches(".onion") + .parse::() + .with_kind(ErrorKind::Tor)?, ) - .await - { - tracing::error!("{e}: Restarting tor"); - tracing::debug!("{e:?}"); - } - tracing::info!("TorControl is shut down.") + .build() + .with_kind(ErrorKind::Tor)?, + key.0, + )?; + let bindings = Arc::new(SyncRwLock::new(BTreeMap::new())); + Ok(Self(Arc::new(OnionServiceData { + service: service.clone(), + bindings: bindings.clone(), + _thread: tokio::spawn(async move { + todo!(); }) .into(), - send, - } + }))) + } + + pub fn proxy_all>>( + &self, + bindings: impl IntoIterator, + ) -> Rcs { + todo!() + } + + pub fn gc(&self) -> bool { + todo!() + } + + pub async fn shutdown(self) -> Result<(), Error> { + todo!() } } - -#[tokio::test] -#[ignore] -async fn test() { - let mut conn = torut::control::UnauthenticatedConn::new( - TcpStream::connect(SocketAddr::from(([127, 0, 0, 1], 9051))) - .await - .unwrap(), - ); - let auth = conn - .load_protocol_info() - .await - .unwrap() - .make_auth_data() - .unwrap() - .ok_or_else(|| eyre!("Cookie Auth Not Available")) - .with_kind(crate::ErrorKind::Tor) - .unwrap(); - conn.authenticate(&auth).await.unwrap(); - let mut connection: AuthenticatedConn< - TcpStream, - fn(AsyncEvent<'static>) -> BoxFuture<'static, Result<(), ConnError>>, - > = conn.into_authenticated().await; - let tor_key = torut::onion::TorSecretKeyV3::generate(); - connection.get_conf("SocksPort").await.unwrap(); - connection - .add_onion_v3( - &tor_key, - false, - false, - false, - None, - &mut [(443_u16, SocketAddr::from(([127, 0, 0, 1], 8443)))].iter(), - ) - .await - .unwrap(); - connection - .del_onion( - &tor_key - .public() - .get_onion_address() - .get_address_without_dot_onion(), - ) - .await - .unwrap(); - connection - .add_onion_v3( - &tor_key, - false, - false, - false, - None, - &mut [(8443_u16, SocketAddr::from(([127, 0, 0, 1], 8443)))].iter(), - ) - .await - .unwrap(); -} diff --git a/core/startos/src/registry/os/version/mod.rs b/core/startos/src/registry/os/version/mod.rs index 7064348dd..9ca54e17a 100644 --- a/core/startos/src/registry/os/version/mod.rs +++ b/core/startos/src/registry/os/version/mod.rs @@ -1,13 +1,12 @@ use std::collections::BTreeMap; -use chrono::Utc; +use chrono::{DateTime, NaiveDate, NaiveDateTime, Utc}; use clap::Parser; use exver::{Version, VersionRange}; use imbl_value::InternedString; use itertools::Itertools; use rpc_toolkit::{from_fn_async, Context, HandlerExt, ParentHandler}; use serde::{Deserialize, Serialize}; -use sqlx::query; use ts_rs::TS; use crate::context::CliContext; @@ -151,6 +150,33 @@ pub struct GetOsVersionParams { pub device_info: Option, } +struct PgDateTime(DateTime); +impl sqlx::Type for PgDateTime { + fn type_info() -> ::TypeInfo { + sqlx::postgres::PgTypeInfo::with_oid(sqlx::postgres::types::Oid(1184)) + } +} +impl sqlx::Encode<'_, sqlx::Postgres> for PgDateTime { + fn encode_by_ref( + &self, + buf: &mut ::ArgumentBuffer<'_>, + ) -> Result { + fn postgres_epoch_datetime() -> NaiveDateTime { + NaiveDate::from_ymd_opt(2000, 1, 1) + .expect("expected 2000-01-01 to be a valid NaiveDate") + .and_hms_opt(0, 0, 0) + .expect("expected 2000-01-01T00:00:00 to be a valid NaiveDateTime") + } + let micros = (self.0.naive_utc() - postgres_epoch_datetime()) + .num_microseconds() + .ok_or_else(|| format!("NaiveDateTime out of range for Postgres: {:?}", self.0))?; + micros.encode(buf) + } + fn size_hint(&self) -> usize { + std::mem::size_of::() + } +} + pub async fn get_version( ctx: RegistryContext, GetOsVersionParams { @@ -166,14 +192,13 @@ pub async fn get_version( if let (Some(pool), Some(server_id), Some(arch)) = (&ctx.pool, server_id, &platform) { let created_at = Utc::now(); - query!( - "INSERT INTO user_activity (created_at, server_id, arch) VALUES ($1, $2, $3)", - created_at, - server_id, - &**arch - ) - .execute(pool) - .await?; + sqlx::query("INSERT INTO user_activity (created_at, server_id, arch) VALUES ($1, $2, $3)") + .bind(PgDateTime(created_at)) + .bind(server_id) + .bind(&**arch) + .execute(pool) + .await + .with_kind(ErrorKind::Database)?; } let target = target.unwrap_or(VersionRange::Any); ctx.db diff --git a/core/startos/src/service/effects/health.rs b/core/startos/src/service/effects/health.rs index 26524c1f5..2fb7a529a 100644 --- a/core/startos/src/service/effects/health.rs +++ b/core/startos/src/service/effects/health.rs @@ -31,8 +31,7 @@ pub async fn set_health( .as_status_mut() .mutate(|main| { match main { - MainStatus::Running { ref mut health, .. } - | MainStatus::Starting { ref mut health } => { + MainStatus::Running { health, .. } | MainStatus::Starting { health } => { health.insert(id, result); } _ => (), diff --git a/core/startos/src/service/effects/net/ssl.rs b/core/startos/src/service/effects/net/ssl.rs index 69d3caae0..7275f1791 100644 --- a/core/startos/src/service/effects/net/ssl.rs +++ b/core/startos/src/service/effects/net/ssl.rs @@ -59,7 +59,8 @@ pub async fn get_ssl_certificate( .de()? .iter() .map(InternedString::from_display) - .chain(m.as_domains().keys()?) + .chain(m.as_domains().as_public().keys()?) + .chain(m.as_domains().as_private().de()?) .chain( m.as_hostname_info() .de()? @@ -184,7 +185,8 @@ pub async fn get_ssl_key( .de()? .iter() .map(InternedString::from_display) - .chain(m.as_domains().keys()?) + .chain(m.as_domains().as_public().keys()?) + .chain(m.as_domains().as_private().de()?) .chain( m.as_hostname_info() .de()? diff --git a/core/startos/src/service/service_map.rs b/core/startos/src/service/service_map.rs index 07747504e..ba3275696 100644 --- a/core/startos/src/service/service_map.rs +++ b/core/startos/src/service/service_map.rs @@ -23,13 +23,13 @@ use crate::install::PKG_ARCHIVE_DIR; use crate::notifications::{notify, NotificationLevel}; use crate::prelude::*; use crate::progress::{FullProgressTracker, PhaseProgressTrackerHandle, ProgressTrackerWriter}; -use crate::sign::commitment::merkle_archive::MerkleArchiveCommitment; use crate::s9pk::manifest::PackageId; use crate::s9pk::merkle_archive::source::FileSource; use crate::s9pk::S9pk; use crate::service::rpc::ExitParams; use crate::service::start_stop::StartStop; use crate::service::{LoadDisposition, Service, ServiceRef}; +use crate::sign::commitment::merkle_archive::MerkleArchiveCommitment; use crate::status::MainStatus; use crate::util::serde::{Base32, Pem}; use crate::util::sync::SyncMutex; @@ -382,7 +382,7 @@ impl ServiceMap { id: PackageId, soft: bool, force: bool, - ) -> Result> + Send, Error> { + ) -> Result> + Send + 'static, Error> { let mut guard = self.get_mut(&id).await; ctx.db .mutate(|db| { diff --git a/core/startos/src/util/sync.rs b/core/startos/src/util/sync.rs index 0e65d8aec..b5d8dca0a 100644 --- a/core/startos/src/util/sync.rs +++ b/core/startos/src/util/sync.rs @@ -21,6 +21,20 @@ impl SyncMutex { } } +#[derive(Debug, Default)] +pub struct SyncRwLock(std::sync::RwLock); +impl SyncRwLock { + pub fn new(t: T) -> Self { + Self(std::sync::RwLock::new(t)) + } + pub fn mutate U, U>(&self, f: F) -> U { + f(&mut *self.0.write().unwrap()) + } + pub fn peek U, U>(&self, f: F) -> U { + f(&*self.0.read().unwrap()) + } +} + struct WatchShared { version: u64, data: T, diff --git a/core/startos/src/version/v0_3_6_alpha_0.rs b/core/startos/src/version/v0_3_6_alpha_0.rs index f5ac17016..16070d2c3 100644 --- a/core/startos/src/version/v0_3_6_alpha_0.rs +++ b/core/startos/src/version/v0_3_6_alpha_0.rs @@ -13,7 +13,6 @@ use openssl::x509::X509; use sqlx::postgres::PgConnectOptions; use sqlx::{PgPool, Row}; use tokio::process::Command; -use torut::onion::TorSecretKeyV3; use super::v0_3_5::V0_3_0_COMPAT; use super::{v0_3_5_2, VersionT}; @@ -26,6 +25,7 @@ use crate::disk::mount::util::unmount; use crate::hostname::Hostname; use crate::net::forward::AvailablePorts; use crate::net::keys::KeyStore; +use crate::net::tor::TorSecretKey; use crate::notifications::Notifications; use crate::prelude::*; use crate::s9pk::merkle_archive::source::multi_cursor_file::MultiCursorFile; @@ -198,12 +198,9 @@ async fn init_postgres(datadir: impl AsRef) -> Result { .port(5433) .socket("/var/run/postgresql"), ) - .await? - }; - sqlx::migrate!() - .run(&secret_store) .await - .with_kind(crate::ErrorKind::Database)?; + .with_kind(ErrorKind::Database)? + }; Ok(secret_store) } @@ -422,10 +419,11 @@ impl VersionT for Version { async fn previous_cifs(pg: &sqlx::Pool) -> Result { let cifs = sqlx::query(r#"SELECT * FROM cifs_shares"#) .fetch_all(pg) - .await? + .await + .with_kind(ErrorKind::Database)? .into_iter() .map(|row| { - let id: i32 = row.try_get("id")?; + let id: i32 = row.try_get("id").with_kind(ErrorKind::Database)?; Ok::<_, Error>(( id, Cifs { @@ -458,13 +456,14 @@ async fn previous_cifs(pg: &sqlx::Pool) -> Result) -> Result { let account_query = sqlx::query(r#"SELECT * FROM account"#) .fetch_one(pg) - .await?; + .await + .with_kind(ErrorKind::Database)?; let account = { AccountInfo { password: account_query .try_get("password") .with_ctx(|_| (ErrorKind::Database, "password"))?, - tor_keys: vec![TorSecretKeyV3::try_from( + tor_keys: vec![TorSecretKey::from_bytes( if let Some(bytes) = account_query .try_get::>, _>("tor_key") .with_ctx(|_| (ErrorKind::Database, "tor_key"))? @@ -479,14 +478,18 @@ async fn previous_account_info(pg: &sqlx::Pool) -> Result::try_from(account_query.try_get::, _>("network_key")?) - .map_err(|e| { - Error::new( - eyre!("expected vec of len 32, got len {}", e.len()), - ErrorKind::ParseDbField, - ) - }) - .with_ctx(|_| (ErrorKind::Database, "password.u8 32"))?, + &<[u8; 32]>::try_from( + account_query + .try_get::, _>("network_key") + .with_kind(ErrorKind::Database)?, + ) + .map_err(|e| { + Error::new( + eyre!("expected vec of len 32, got len {}", e.len()), + ErrorKind::ParseDbField, + ) + }) + .with_ctx(|_| (ErrorKind::Database, "password.u8 32"))?, ) }, )?], @@ -527,7 +530,8 @@ async fn previous_account_info(pg: &sqlx::Pool) -> Result) -> Result { let ssh_query = sqlx::query(r#"SELECT * FROM ssh_keys"#) .fetch_all(pg) - .await?; + .await + .with_kind(ErrorKind::Database)?; let ssh_keys: SshKeys = { let keys = ssh_query.into_iter().fold( Ok::<_, Error>(BTreeMap::>::new()), @@ -535,12 +539,12 @@ async fn previous_ssh_keys(pg: &sqlx::Pool) -> Result("created_at") - .map_err(Error::from) + .with_kind(ErrorKind::Database) .and_then(|x| x.parse::>().with_kind(ErrorKind::Database)) .with_ctx(|_| (ErrorKind::Database, "openssh_pubkey::created_at"))?; let value: SshPubKey = row .try_get::("openssh_pubkey") - .map_err(Error::from) + .with_kind(ErrorKind::Database) .and_then(|x| x.parse().map(SshPubKey).with_kind(ErrorKind::Database)) .with_ctx(|_| (ErrorKind::Database, "openssh_pubkey"))?; let data = WithTimeData { diff --git a/core/startos/src/version/v0_3_6_alpha_10.rs b/core/startos/src/version/v0_3_6_alpha_10.rs index b198a93f1..cd1b90dfe 100644 --- a/core/startos/src/version/v0_3_6_alpha_10.rs +++ b/core/startos/src/version/v0_3_6_alpha_10.rs @@ -2,12 +2,13 @@ use std::collections::{BTreeMap, BTreeSet}; use exver::{PreReleaseSegment, VersionRange}; use imbl_value::InternedString; +use models::GatewayId; use serde::{Deserialize, Serialize}; -use torut::onion::OnionAddressV3; use super::v0_3_5::V0_3_0_COMPAT; use super::{v0_3_6_alpha_9, VersionT}; -use crate::net::host::address::DomainConfig; +use crate::net::host::address::PublicDomainConfig; +use crate::net::tor::OnionAddress; use crate::prelude::*; lazy_static::lazy_static! { @@ -21,7 +22,7 @@ lazy_static::lazy_static! { #[serde(rename_all = "camelCase")] #[serde(tag = "kind")] enum HostAddress { - Onion { address: OnionAddressV3 }, + Onion { address: OnionAddress }, Domain { address: InternedString }, } @@ -73,9 +74,8 @@ impl VersionT for Version { HostAddress::Domain { address } => { domains.insert( address.clone(), - DomainConfig { - root: address, - public: true, + PublicDomainConfig { + gateway: GatewayId::from("lo"), acme: None, }, ); diff --git a/core/startos/src/version/v0_4_0_alpha_10.rs b/core/startos/src/version/v0_4_0_alpha_10.rs index a8ad7978a..6c553f312 100644 --- a/core/startos/src/version/v0_4_0_alpha_10.rs +++ b/core/startos/src/version/v0_4_0_alpha_10.rs @@ -1,4 +1,4 @@ -use std::collections::BTreeSet; +use std::collections::{BTreeMap, BTreeSet}; use std::sync::Arc; use exver::{PreReleaseSegment, VersionRange}; @@ -39,7 +39,6 @@ impl VersionT for Version { .flatten() .find(|(_, i)| i["ipInfo"]["wanIp"].is_string()) .map(|(g, _)| g.clone()); - let mut roots = BTreeSet::new(); for (_, package) in db["public"]["packageData"] .as_object_mut() .ok_or_else(|| { @@ -60,10 +59,8 @@ impl VersionT for Version { })? .iter_mut() { - if default_gateway.is_none() { - host["domains"] = json!({}); - continue; - } + let mut public = BTreeMap::new(); + let mut private = BTreeSet::new(); for (domain, info) in host["domains"] .as_object_mut() .ok_or_else(|| { @@ -79,26 +76,25 @@ impl VersionT for Version { let Some(info) = info.as_object_mut() else { continue; }; - let root = domain.clone(); - info.insert("root".into(), Value::String(Arc::new((&*root).to_owned()))); - roots.insert(root); + if info["public"].as_bool().unwrap_or_default() && let Some(gateway) = &default_gateway { + info.insert( + "gateway".into(), + Value::String(Arc::new((&**gateway).to_owned())), + ); + public.insert(domain.clone(), info.clone()); + } else { + private.insert(domain.clone()); + } + } + host["domains"] = json!({ "public": &public, "private": &private }); } } - let network = db["public"]["serverInfo"]["network"] - .as_object_mut() - .ok_or_else(|| { - Error::new( - eyre!("expected public.serverInfo.network to be an object"), - ErrorKind::Database, - ) - })?; + let network = &mut db["public"]["serverInfo"]["network"]; network["gateways"] = network["networkInterfaces"].clone(); - if let Some(gateway) = default_gateway { - for root in roots { - network["domains"][&*root] = json!({ "gateway": gateway }); - } - } + network["dns"] = json!({ + "dhcp": [], + }); Ok(Value::Null) } diff --git a/debian/postinst b/debian/postinst index 9124f03bc..f2ec29f59 100755 --- a/debian/postinst +++ b/debian/postinst @@ -83,7 +83,6 @@ $SYSTEMCTL enable ssh.service $SYSTEMCTL disable wpa_supplicant.service $SYSTEMCTL mask systemd-networkd-wait-online.service # currently use `NetworkManager-wait-online.service` -$SYSTEMCTL disable docker.service $SYSTEMCTL disable postgresql.service $SYSTEMCTL disable tor.service $SYSTEMCTL disable bluetooth.service @@ -111,6 +110,8 @@ sed -i '/^\s*#\?\s*issue_discards\s*=\s*/c\issue_discards = 1' /etc/lvm/lvm.conf sed -i '/\(^\|#\)\s*unqualified-search-registries\s*=\s*/c\unqualified-search-registries = ["docker.io"]' /etc/containers/registries.conf sed -i 's/\(#\|\^\)\s*\([^=]\+\)=\(suspend\|hibernate\)\s*$/\2=ignore/g' /etc/systemd/logind.conf sed -i '/\(^\|#\)MulticastDNS=/c\MulticastDNS=no' /etc/systemd/resolved.conf +sed -i '/\(^\|#\)DNS=/c\DNS=127.0.0.1:5355' /etc/systemd/resolved.conf +sed -i '/\(^\|#\)DNSStubListenerExtra=/c\DNSStubListenerExtra=0.0.0.0:53' /etc/systemd/resolved.conf sed -i 's/\[Service\]/[Service]\nEnvironment=SYSTEMD_LOG_LEVEL=debug/' /lib/systemd/system/systemd-timesyncd.service sed -i "s/\.debian\./\./g;s/#FallbackNTP=/FallbackNTP=/" /etc/systemd/timesyncd.conf sed -i '/\(^\|#\)RootDistanceMaxSec=/c\RootDistanceMaxSec=10' /etc/systemd/timesyncd.conf diff --git a/image-recipe/build.sh b/image-recipe/build.sh index 3d97f7e5c..2a69ab712 100755 --- a/image-recipe/build.sh +++ b/image-recipe/build.sh @@ -161,12 +161,6 @@ if [ "${IB_TARGET_PLATFORM}" = "rockchip64" ]; then echo "deb https://apt.armbian.com/ ${IB_SUITE} main" > config/archives/armbian.list fi -curl -fsSL https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc > config/archives/tor.key -echo "deb [arch=${IB_TARGET_ARCH} signed-by=/etc/apt/trusted.gpg.d/tor.key.gpg] https://deb.torproject.org/torproject.org ${IB_SUITE} main" > config/archives/tor.list - -curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o config/archives/docker.key -echo "deb [arch=${IB_TARGET_ARCH} signed-by=/etc/apt/trusted.gpg.d/docker.key.gpg] https://download.docker.com/linux/debian ${IB_SUITE} stable" > config/archives/docker.list - # Dependencies ## Base dependencies diff --git a/patch-db b/patch-db index de9a2a678..223b1af4f 160000 --- a/patch-db +++ b/patch-db @@ -1 +1 @@ -Subproject commit de9a2a67872aee7caa751fa237c333e42aa72b1a +Subproject commit 223b1af4f59d36dc68d7f038ef77d37a8f058d24 diff --git a/sdk/base/lib/osBindings/DnsSettings.ts b/sdk/base/lib/osBindings/DnsSettings.ts new file mode 100644 index 000000000..667c61b99 --- /dev/null +++ b/sdk/base/lib/osBindings/DnsSettings.ts @@ -0,0 +1,3 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +export type DnsSettings = { dhcp: Array; static: Array | null } diff --git a/sdk/base/lib/osBindings/Domains.ts b/sdk/base/lib/osBindings/Domains.ts new file mode 100644 index 000000000..7af39bcf7 --- /dev/null +++ b/sdk/base/lib/osBindings/Domains.ts @@ -0,0 +1,7 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { PublicDomainConfig } from "./PublicDomainConfig" + +export type Domains = { + public: { [key: string]: PublicDomainConfig } + private: Array +} diff --git a/sdk/base/lib/osBindings/Host.ts b/sdk/base/lib/osBindings/Host.ts index 041e1c9bc..8962ad1e3 100644 --- a/sdk/base/lib/osBindings/Host.ts +++ b/sdk/base/lib/osBindings/Host.ts @@ -1,12 +1,12 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { BindInfo } from "./BindInfo" -import type { DomainConfig } from "./DomainConfig" +import type { Domains } from "./Domains" import type { HostnameInfo } from "./HostnameInfo" export type Host = { bindings: { [key: number]: BindInfo } onions: string[] - domains: { [key: string]: DomainConfig } + domains: Domains /** * COMPUTED: NetService::update */ diff --git a/sdk/base/lib/osBindings/HostAddress.ts b/sdk/base/lib/osBindings/HostAddress.ts deleted file mode 100644 index fe16c89d7..000000000 --- a/sdk/base/lib/osBindings/HostAddress.ts +++ /dev/null @@ -1,11 +0,0 @@ -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AcmeProvider } from "./AcmeProvider" - -export type HostAddress = - | { kind: "onion"; address: string } - | { - kind: "domain" - address: string - public: boolean - acme: AcmeProvider | null - } diff --git a/sdk/base/lib/osBindings/IpInfo.ts b/sdk/base/lib/osBindings/IpInfo.ts index 28d052048..4fc21f163 100644 --- a/sdk/base/lib/osBindings/IpInfo.ts +++ b/sdk/base/lib/osBindings/IpInfo.ts @@ -6,6 +6,8 @@ export type IpInfo = { scopeId: number deviceType: NetworkInterfaceType | null subnets: string[] + lanIp: string[] wanIp: string | null ntpServers: string[] + dnsServers: string[] } diff --git a/sdk/base/lib/osBindings/NetworkInfo.ts b/sdk/base/lib/osBindings/NetworkInfo.ts index ba544b939..118adcfe8 100644 --- a/sdk/base/lib/osBindings/NetworkInfo.ts +++ b/sdk/base/lib/osBindings/NetworkInfo.ts @@ -1,6 +1,7 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { AcmeProvider } from "./AcmeProvider" import type { AcmeSettings } from "./AcmeSettings" +import type { DnsSettings } from "./DnsSettings" import type { DomainSettings } from "./DomainSettings" import type { GatewayId } from "./GatewayId" import type { Host } from "./Host" @@ -13,4 +14,5 @@ export type NetworkInfo = { gateways: { [key: GatewayId]: NetworkInterfaceInfo } acme: { [key: AcmeProvider]: AcmeSettings } domains: { [key: string]: DomainSettings } + dns: DnsSettings } diff --git a/sdk/base/lib/osBindings/DomainConfig.ts b/sdk/base/lib/osBindings/PublicDomainConfig.ts similarity index 65% rename from sdk/base/lib/osBindings/DomainConfig.ts rename to sdk/base/lib/osBindings/PublicDomainConfig.ts index b68cbd068..d4058eccd 100644 --- a/sdk/base/lib/osBindings/DomainConfig.ts +++ b/sdk/base/lib/osBindings/PublicDomainConfig.ts @@ -1,8 +1,8 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { AcmeProvider } from "./AcmeProvider" +import type { GatewayId } from "./GatewayId" -export type DomainConfig = { - root: string - public: boolean +export type PublicDomainConfig = { + gateway: GatewayId acme: AcmeProvider | null } diff --git a/sdk/base/lib/osBindings/index.ts b/sdk/base/lib/osBindings/index.ts index f3d6e9675..4898ef297 100644 --- a/sdk/base/lib/osBindings/index.ts +++ b/sdk/base/lib/osBindings/index.ts @@ -66,8 +66,9 @@ export { DepInfo } from "./DepInfo" export { Description } from "./Description" export { DestroySubcontainerFsParams } from "./DestroySubcontainerFsParams" export { DeviceFilter } from "./DeviceFilter" -export { DomainConfig } from "./DomainConfig" +export { DnsSettings } from "./DnsSettings" export { DomainSettings } from "./DomainSettings" +export { Domains } from "./Domains" export { Duration } from "./Duration" export { EchoParams } from "./EchoParams" export { EditSignerParams } from "./EditSignerParams" @@ -100,7 +101,6 @@ export { Governor } from "./Governor" export { Guid } from "./Guid" export { HardwareRequirements } from "./HardwareRequirements" export { HealthCheckId } from "./HealthCheckId" -export { HostAddress } from "./HostAddress" export { HostId } from "./HostId" export { HostnameInfo } from "./HostnameInfo" export { Hosts } from "./Hosts" @@ -161,6 +161,7 @@ export { PathOrUrl } from "./PathOrUrl" export { Percentage } from "./Percentage" export { Progress } from "./Progress" export { ProgressUnits } from "./ProgressUnits" +export { PublicDomainConfig } from "./PublicDomainConfig" export { Public } from "./Public" export { RecoverySource } from "./RecoverySource" export { RegistryAsset } from "./RegistryAsset" diff --git a/system-images/README.md b/system-images/README.md deleted file mode 100644 index 45dde2b2a..000000000 --- a/system-images/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# System Images - -There once was a time that I served to provide backwards compatibility for service configuration and properties rendering. Utilizing me for this functionality has since been deprecated in favor of [JS procedures](https://start9.com/latest/developer-docs/specification/js-procedure). Now I simply serve to provide service backup functionality. This will soon be converted to using JS procedure scripts as well. \ No newline at end of file diff --git a/system-images/binfmt/.gitignore b/system-images/binfmt/.gitignore deleted file mode 100644 index 9ea8ef8d2..000000000 --- a/system-images/binfmt/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/docker-images \ No newline at end of file diff --git a/system-images/binfmt/Dockerfile b/system-images/binfmt/Dockerfile deleted file mode 100644 index e1dd5d65b..000000000 --- a/system-images/binfmt/Dockerfile +++ /dev/null @@ -1 +0,0 @@ -FROM tonistiigi/binfmt diff --git a/system-images/binfmt/Makefile b/system-images/binfmt/Makefile deleted file mode 100644 index 141b50fc1..000000000 --- a/system-images/binfmt/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -.DELETE_ON_ERROR: - -all: docker-images/aarch64.tar docker-images/x86_64.tar - -clean: - rm -rf docker-images - -docker-images: - mkdir docker-images - -docker-images/aarch64.tar: Dockerfile docker-images - docker buildx build --tag start9/x_system/binfmt --platform=linux/arm64 -o type=docker,dest=docker-images/aarch64.tar . - -docker-images/x86_64.tar: Dockerfile docker-images - docker buildx build --tag start9/x_system/binfmt --platform=linux/amd64 -o type=docker,dest=docker-images/x86_64.tar . \ No newline at end of file diff --git a/system-images/binfmt/manifest.json b/system-images/binfmt/manifest.json deleted file mode 100644 index ebdfc259d..000000000 --- a/system-images/binfmt/manifest.json +++ /dev/null @@ -1 +0,0 @@ -[{"Config":"3f7fd8db05afd7a5fa804ebfb0e40038068af52b45d8f9a04c1c9fa8d316e511.json","RepoTags":["multitest/binfmt:latest"],"Layers":["753827173463aa2b7471a5be8ac2323a1cf78ccedfdfcc7bb21831d9e0141732/layer.tar","e0747212aee318099c729893bb4cca2ff164f6bd154841d5777636f82b7f18d4/layer.tar"]},{"Config":"143329dfbcc6abb472070a2f0bae5cf9865f178e5391a15592e75b349c803c69.json","RepoTags":["multitest/binfmt:latest"],"Layers":["de6e72d83667be34f782cf1f0a376e0507d189872142e1934f14d3be4813715a/layer.tar","12670876b666af35f388c3d2160436257b390a163a4c7178863badd05394577a/layer.tar"]}] diff --git a/system-images/compat/.gitignore b/system-images/compat/.gitignore deleted file mode 100644 index 0a8fcff98..000000000 --- a/system-images/compat/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -/target -**/*.rs.bk -.DS_Store -.vscode -/docker-images \ No newline at end of file diff --git a/system-images/compat/Cargo.lock b/system-images/compat/Cargo.lock deleted file mode 100644 index c5cf4db11..000000000 --- a/system-images/compat/Cargo.lock +++ /dev/null @@ -1,6120 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "addr2line" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" -dependencies = [ - "gimli", -] - -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - -[[package]] -name = "aes" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" -dependencies = [ - "cfg-if", - "cipher 0.3.0", - "cpufeatures", - "ctr", - "opaque-debug", -] - -[[package]] -name = "ahash" -version = "0.7.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" -dependencies = [ - "getrandom 0.2.12", - "once_cell", - "version_check", -] - -[[package]] -name = "ahash" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77c3a9648d43b9cd48db467b3f87fdd6e146bcc88ab0180006cef2179fe11d01" -dependencies = [ - "cfg-if", - "getrandom 0.2.12", - "once_cell", - "version_check", - "zerocopy", -] - -[[package]] -name = "aho-corasick" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" -dependencies = [ - "memchr", -] - -[[package]] -name = "alloc-no-stdlib" -version = "2.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" - -[[package]] -name = "alloc-stdlib" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" -dependencies = [ - "alloc-no-stdlib", -] - -[[package]] -name = "allocator-api2" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" - -[[package]] -name = "android-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - -[[package]] -name = "android_system_properties" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" -dependencies = [ - "libc", -] - -[[package]] -name = "ansi_term" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" -dependencies = [ - "winapi", -] - -[[package]] -name = "anstream" -version = "0.6.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e2e1ebcb11de5c03c67de28a7df593d32191b44939c482e97702baaaa6ab6a5" -dependencies = [ - "anstyle", - "anstyle-parse", - "anstyle-query", - "anstyle-wincon", - "colorchoice", - "utf8parse", -] - -[[package]] -name = "anstyle" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" - -[[package]] -name = "anstyle-parse" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" -dependencies = [ - "utf8parse", -] - -[[package]] -name = "anstyle-query" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" -dependencies = [ - "windows-sys 0.52.0", -] - -[[package]] -name = "anstyle-wincon" -version = "3.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" -dependencies = [ - "anstyle", - "windows-sys 0.52.0", -] - -[[package]] -name = "anyhow" -version = "1.0.79" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" -dependencies = [ - "backtrace", -] - -[[package]] -name = "arrayref" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" - -[[package]] -name = "arrayvec" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" - -[[package]] -name = "ascii-canvas" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8824ecca2e851cec16968d54a01dd372ef8f95b244fb84b84e70128be347c3c6" -dependencies = [ - "term", -] - -[[package]] -name = "async-channel" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" -dependencies = [ - "concurrent-queue", - "event-listener", - "futures-core", -] - -[[package]] -name = "async-compression" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a116f46a969224200a0a97f29cfd4c50e7534e4b4826bd23ea2c3c533039c82c" -dependencies = [ - "brotli", - "flate2", - "futures-core", - "memchr", - "pin-project-lite", - "tokio", -] - -[[package]] -name = "async-stream" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" -dependencies = [ - "async-stream-impl", - "futures-core", - "pin-project-lite", -] - -[[package]] -name = "async-stream-impl" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "async-trait" -version = "0.1.77" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "atoi" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28d99ec8bfea296261ca1af174f24225171fea9664ba9003cbebee704810528" -dependencies = [ - "num-traits", -] - -[[package]] -name = "atomic-write-file" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edcdbedc2236483ab103a53415653d6b4442ea6141baf1ffa85df29635e88436" -dependencies = [ - "nix 0.27.1", - "rand 0.8.5", -] - -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi 0.1.19", - "libc", - "winapi", -] - -[[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - -[[package]] -name = "axum" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1236b4b292f6c4d6dc34604bb5120d85c3fe1d1aa596bd5cc52ca054d13e7b9e" -dependencies = [ - "async-trait", - "axum-core", - "base64 0.21.7", - "bytes", - "futures-util", - "http 1.0.0", - "http-body 1.0.0", - "http-body-util", - "hyper 1.1.0", - "hyper-util", - "itoa", - "matchit", - "memchr", - "mime", - "percent-encoding", - "pin-project-lite", - "rustversion", - "serde", - "serde_json", - "serde_path_to_error", - "serde_urlencoded", - "sha1", - "sync_wrapper", - "tokio", - "tokio-tungstenite", - "tower", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "axum-core" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a15c63fd72d41492dc4f497196f5da1fb04fb7529e631d73630d1b491e47a2e3" -dependencies = [ - "async-trait", - "bytes", - "futures-util", - "http 1.0.0", - "http-body 1.0.0", - "http-body-util", - "mime", - "pin-project-lite", - "rustversion", - "sync_wrapper", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "axum-server" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1ad46c3ec4e12f4a4b6835e173ba21c25e484c9d02b49770bf006ce5367c036" -dependencies = [ - "bytes", - "futures-util", - "http 1.0.0", - "http-body 1.0.0", - "http-body-util", - "hyper 1.1.0", - "hyper-util", - "pin-project-lite", - "tokio", - "tower", - "tower-service", -] - -[[package]] -name = "backtrace" -version = "0.3.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" -dependencies = [ - "addr2line", - "cc", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", -] - -[[package]] -name = "base16ct" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" - -[[package]] -name = "base32" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23ce669cd6c8588f79e15cf450314f9638f967fc5770ff1c7c1deb0925ea7cfa" - -[[package]] -name = "base64" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" - -[[package]] -name = "base64" -version = "0.21.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" - -[[package]] -name = "base64ct" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" - -[[package]] -name = "basic-cookies" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67bd8fd42c16bdb08688243dc5f0cc117a3ca9efeeaba3a345a18a6159ad96f7" -dependencies = [ - "lalrpop", - "lalrpop-util", - "regex", -] - -[[package]] -name = "beau_collector" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33a143066d3cbd3d32c15b51c39449e50e32a68293d31589fb941d6a9df0df4f" -dependencies = [ - "anyhow", - "itertools 0.9.0", -] - -[[package]] -name = "bimap" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc0455254eb5c6964c4545d8bac815e1a1be4f3afe0ae695ea539c12d728d44b" -dependencies = [ - "serde", -] - -[[package]] -name = "bincode" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" -dependencies = [ - "serde", -] - -[[package]] -name = "bit-set" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" -dependencies = [ - "bit-vec", -] - -[[package]] -name = "bit-vec" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitflags" -version = "2.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" -dependencies = [ - "serde", -] - -[[package]] -name = "bitmaps" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "703642b98a00b3b90513279a8ede3fcfa479c126c5fb46e78f3051522f021403" - -[[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 = "blake2b_simd" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23285ad32269793932e830392f2fe2f83e26488fd3ec778883a93c8323735780" -dependencies = [ - "arrayref", - "arrayvec", - "constant_time_eq", -] - -[[package]] -name = "blake3" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0231f06152bf547e9c2b5194f247cd97aacf6dcd8b15d8e5ec0663f64580da87" -dependencies = [ - "arrayref", - "arrayvec", - "cc", - "cfg-if", - "constant_time_eq", -] - -[[package]] -name = "block-buffer" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" -dependencies = [ - "block-padding", - "generic-array", -] - -[[package]] -name = "block-buffer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" -dependencies = [ - "generic-array", -] - -[[package]] -name = "block-padding" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" - -[[package]] -name = "brotli" -version = "3.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "516074a47ef4bce09577a3b379392300159ce5b1ba2e501ff1c819950066100f" -dependencies = [ - "alloc-no-stdlib", - "alloc-stdlib", - "brotli-decompressor", -] - -[[package]] -name = "brotli-decompressor" -version = "2.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e2e4afe60d7dd600fdd3de8d0f08c2b7ec039712e3b6137ff98b7004e82de4f" -dependencies = [ - "alloc-no-stdlib", - "alloc-stdlib", -] - -[[package]] -name = "bumpalo" -version = "3.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" - -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - -[[package]] -name = "bytes" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" - -[[package]] -name = "cc" -version = "1.0.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" -dependencies = [ - "libc", -] - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "chrono" -version = "0.4.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f13690e35a5e4ace198e7beea2895d29f3a9cc55015fcebe6336bd2010af9eb" -dependencies = [ - "android-tzdata", - "iana-time-zone", - "js-sys", - "num-traits", - "serde", - "wasm-bindgen", - "windows-targets 0.52.0", -] - -[[package]] -name = "chumsky" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eebd66744a15ded14960ab4ccdbfb51ad3b81f51f3f04a80adac98c985396c9" -dependencies = [ - "hashbrown 0.14.3", -] - -[[package]] -name = "ciborium" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42e69ffd6f0917f5c029256a24d0161db17cea3997d185db0d35926308770f0e" -dependencies = [ - "ciborium-io", - "ciborium-ll", - "serde", -] - -[[package]] -name = "ciborium-io" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05afea1e0a06c9be33d539b876f1ce3692f4afea2cb41f740e7743225ed1c757" - -[[package]] -name = "ciborium-ll" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9" -dependencies = [ - "ciborium-io", - "half 2.3.1", -] - -[[package]] -name = "cipher" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" -dependencies = [ - "generic-array", -] - -[[package]] -name = "cipher" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" -dependencies = [ - "crypto-common", - "inout", -] - -[[package]] -name = "clap" -version = "2.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" -dependencies = [ - "ansi_term", - "atty", - "bitflags 1.3.2", - "strsim 0.8.0", - "textwrap 0.11.0", - "unicode-width", - "vec_map", -] - -[[package]] -name = "clap" -version = "3.2.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" -dependencies = [ - "atty", - "bitflags 1.3.2", - "clap_lex 0.2.4", - "indexmap 1.9.3", - "strsim 0.10.0", - "termcolor", - "textwrap 0.16.0", -] - -[[package]] -name = "clap" -version = "4.4.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e578d6ec4194633722ccf9544794b71b1385c3c027efe0c55db226fc880865c" -dependencies = [ - "clap_builder", - "clap_derive", -] - -[[package]] -name = "clap_builder" -version = "4.4.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4df4df40ec50c46000231c914968278b1eb05098cf8f1b3a518a95030e71d1c7" -dependencies = [ - "anstream", - "anstyle", - "clap_lex 0.6.0", - "strsim 0.10.0", -] - -[[package]] -name = "clap_derive" -version = "4.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "clap_lex" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" -dependencies = [ - "os_str_bytes", -] - -[[package]] -name = "clap_lex" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" - -[[package]] -name = "color-eyre" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a667583cca8c4f8436db8de46ea8233c42a7d9ae424a82d338f2e4675229204" -dependencies = [ - "backtrace", - "color-spantrace", - "eyre", - "indenter", - "once_cell", - "owo-colors", - "tracing-error", -] - -[[package]] -name = "color-spantrace" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd6be1b2a7e382e2b98b43b2adcca6bb0e465af0bdd38123873ae61eb17a72c2" -dependencies = [ - "once_cell", - "owo-colors", - "tracing-core", - "tracing-error", -] - -[[package]] -name = "colorchoice" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" - -[[package]] -name = "compat" -version = "0.1.0" -dependencies = [ - "anyhow", - "beau_collector", - "clap 2.34.0", - "dashmap", - "emver", - "failure", - "imbl-value", - "indexmap 1.9.3", - "itertools 0.10.5", - "lazy_static", - "linear-map", - "log", - "nix 0.25.1", - "pest", - "pest_derive", - "rand 0.8.5", - "regex", - "rust-argon2 1.0.1", - "serde", - "serde_json", - "serde_yaml 0.8.26", - "start-os", -] - -[[package]] -name = "concurrent-queue" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "console" -version = "0.15.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" -dependencies = [ - "encode_unicode 0.3.6", - "lazy_static", - "libc", - "unicode-width", - "windows-sys 0.52.0", -] - -[[package]] -name = "const-oid" -version = "0.9.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" - -[[package]] -name = "const_format" -version = "0.2.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3a214c7af3d04997541b18d432afaff4c455e79e2029079647e72fc2bd27673" -dependencies = [ - "const_format_proc_macros", -] - -[[package]] -name = "const_format_proc_macros" -version = "0.2.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7f6ff08fd20f4f299298a28e2dfa8a8ba1036e6cd2460ac1de7b425d76f2500" -dependencies = [ - "proc-macro2", - "quote", - "unicode-xid", -] - -[[package]] -name = "constant_time_eq" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" - -[[package]] -name = "convert_case" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" - -[[package]] -name = "convert_case" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca" -dependencies = [ - "unicode-segmentation", -] - -[[package]] -name = "cookie" -version = "0.16.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e859cd57d0710d9e06c381b550c06e76992472a8c6d527aecd2fc673dcc231fb" -dependencies = [ - "percent-encoding", - "time", - "version_check", -] - -[[package]] -name = "cookie" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7efb37c3e1ccb1ff97164ad95ac1606e8ccd35b3fa0a7d99a304c7f4a428cc24" -dependencies = [ - "percent-encoding", - "time", - "version_check", -] - -[[package]] -name = "cookie" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cd91cf61412820176e137621345ee43b3f4423e589e7ae4e50d601d93e35ef8" -dependencies = [ - "time", - "version_check", -] - -[[package]] -name = "cookie_store" -version = "0.16.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d606d0fba62e13cf04db20536c05cb7f13673c161cb47a47a82b9b9e7d3f1daa" -dependencies = [ - "cookie 0.16.2", - "idna 0.2.3", - "log", - "publicsuffix", - "serde", - "serde_derive", - "serde_json", - "time", - "url", -] - -[[package]] -name = "cookie_store" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "387461abbc748185c3a6e1673d826918b450b87ff22639429c694619a83b6cf6" -dependencies = [ - "cookie 0.17.0", - "idna 0.3.0", - "log", - "publicsuffix", - "serde", - "serde_derive", - "serde_json", - "time", - "url", -] - -[[package]] -name = "core-foundation" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "core-foundation-sys" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" - -[[package]] -name = "cpufeatures" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" -dependencies = [ - "libc", -] - -[[package]] -name = "crc" -version = "3.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86ec7a15cbe22e59248fc7eadb1907dab5ba09372595da4d73dd805ed4417dfe" -dependencies = [ - "crc-catalog", -] - -[[package]] -name = "crc-catalog" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" - -[[package]] -name = "crc32fast" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "crossbeam-queue" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" - -[[package]] -name = "crossterm" -version = "0.27.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f476fe445d41c9e991fd07515a6f463074b782242ccf4a5b7b1d1012e70824df" -dependencies = [ - "bitflags 2.4.2", - "crossterm_winapi", - "futures-core", - "libc", - "mio", - "parking_lot", - "signal-hook", - "signal-hook-mio", - "winapi", -] - -[[package]] -name = "crossterm_winapi" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acdd7c62a3665c7f6830a51635d9ac9b23ed385797f70a83bb8bafe9c572ab2b" -dependencies = [ - "winapi", -] - -[[package]] -name = "crunchy" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" - -[[package]] -name = "crypto-bigint" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" -dependencies = [ - "generic-array", - "rand_core 0.6.4", - "subtle", - "zeroize", -] - -[[package]] -name = "crypto-common" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" -dependencies = [ - "generic-array", - "typenum", -] - -[[package]] -name = "crypto-mac" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25fab6889090c8133f3deb8f73ba3c65a7f456f66436fc012a1b1e272b1e103e" -dependencies = [ - "generic-array", - "subtle", -] - -[[package]] -name = "csv" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac574ff4d437a7b5ad237ef331c17ccca63c46479e5b5453eb8e10bb99a759fe" -dependencies = [ - "csv-core", - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "csv-core" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5efa2b3d7902f4b634a20cae3c9c4e6209dc4779feb6863329607560143efa70" -dependencies = [ - "memchr", -] - -[[package]] -name = "ctr" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "049bb91fb4aaf0e3c7efa6cd5ef877dbbbd15b39dad06d9948de4ec8a75761ea" -dependencies = [ - "cipher 0.3.0", -] - -[[package]] -name = "current_platform" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a74858bcfe44b22016cb49337d7b6f04618c58e5dbfdef61b06b8c434324a0bc" - -[[package]] -name = "curve25519-dalek" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" -dependencies = [ - "byteorder", - "digest 0.9.0", - "rand_core 0.5.1", - "subtle", - "zeroize", -] - -[[package]] -name = "curve25519-dalek" -version = "4.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89b8c6a2e4b1f45971ad09761aafb85514a84744b67a95e32c3cc1352d1f65c" -dependencies = [ - "cfg-if", - "cpufeatures", - "curve25519-dalek-derive", - "digest 0.10.7", - "fiat-crypto", - "platforms", - "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 2.0.48", -] - -[[package]] -name = "darling" -version = "0.20.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" -dependencies = [ - "darling_core", - "darling_macro", -] - -[[package]] -name = "darling_core" -version = "0.20.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "177e3443818124b357d8e76f53be906d60937f0d3a90773a664fa63fa253e621" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim 0.10.0", - "syn 2.0.48", -] - -[[package]] -name = "darling_macro" -version = "0.20.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" -dependencies = [ - "darling_core", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "dashmap" -version = "5.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" -dependencies = [ - "cfg-if", - "hashbrown 0.14.3", - "lock_api", - "once_cell", - "parking_lot_core", -] - -[[package]] -name = "data-encoding" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" - -[[package]] -name = "der" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" -dependencies = [ - "const-oid", - "pem-rfc7468", - "zeroize", -] - -[[package]] -name = "deranged" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" -dependencies = [ - "powerfmt", - "serde", -] - -[[package]] -name = "derive_more" -version = "0.99.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" -dependencies = [ - "convert_case 0.4.0", - "proc-macro2", - "quote", - "rustc_version", - "syn 1.0.109", -] - -[[package]] -name = "diff" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" - -[[package]] -name = "digest" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" -dependencies = [ - "generic-array", -] - -[[package]] -name = "digest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer 0.10.4", - "const-oid", - "crypto-common", - "subtle", -] - -[[package]] -name = "dirs-next" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" -dependencies = [ - "cfg-if", - "dirs-sys-next", -] - -[[package]] -name = "dirs-sys-next" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" -dependencies = [ - "libc", - "redox_users", - "winapi", -] - -[[package]] -name = "divrem" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69dde51e8fef5e12c1d65e0929b03d66e4c0c18282bc30ed2ca050ad6f44dd82" - -[[package]] -name = "dotenvy" -version = "0.15.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" - -[[package]] -name = "drain" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f1a0abf3fcefad9b4dd0e414207a7408e12b68414a01e6bb19b897d5bd7632d" -dependencies = [ - "tokio", -] - -[[package]] -name = "dyn-clone" -version = "1.0.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "545b22097d44f8a9581187cdf93de7a71e4722bf51200cfaba810865b49a495d" - -[[package]] -name = "ecdsa" -version = "0.16.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" -dependencies = [ - "der", - "digest 0.10.7", - "elliptic-curve", - "rfc6979", - "signature 2.2.0", - "spki", -] - -[[package]] -name = "ed25519" -version = "1.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" -dependencies = [ - "signature 1.6.4", -] - -[[package]] -name = "ed25519" -version = "2.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" -dependencies = [ - "pkcs8", - "serde", - "signature 2.2.0", -] - -[[package]] -name = "ed25519-dalek" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" -dependencies = [ - "curve25519-dalek 3.2.0", - "ed25519 1.5.3", - "rand 0.7.3", - "serde", - "sha2 0.9.9", - "zeroize", -] - -[[package]] -name = "ed25519-dalek" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f628eaec48bfd21b865dc2950cfa014450c01d2fa2b69a86c2fd5844ec523c0" -dependencies = [ - "curve25519-dalek 4.1.1", - "ed25519 2.2.3", - "rand_core 0.6.4", - "serde", - "sha2 0.10.8", - "signature 2.2.0", - "subtle", - "zeroize", -] - -[[package]] -name = "either" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" -dependencies = [ - "serde", -] - -[[package]] -name = "elliptic-curve" -version = "0.13.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" -dependencies = [ - "base16ct", - "crypto-bigint", - "digest 0.10.7", - "ff", - "generic-array", - "group", - "pem-rfc7468", - "pkcs8", - "rand_core 0.6.4", - "sec1", - "subtle", - "zeroize", -] - -[[package]] -name = "emver" -version = "0.1.7" -source = "git+https://github.com/Start9Labs/emver-rs.git#61cf0bc96711b4d6f3f30df8efef025e0cc02bad" -dependencies = [ - "either", - "fp-core", - "nom", - "serde", -] - -[[package]] -name = "ena" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c533630cf40e9caa44bd91aadc88a75d75a4c3a12b4cfde353cbed41daa1e1f1" -dependencies = [ - "log", -] - -[[package]] -name = "encode_unicode" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" - -[[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.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "enum-as-inner" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ffccbb6966c05b32ef8fbac435df276c4ae4d3dc55a8cd0eb9745e6c12f546a" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "equivalent" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" - -[[package]] -name = "errno" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "etcetera" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "136d1b5283a1ab77bd9257427ffd09d8667ced0570b6f938942bc7568ed5b943" -dependencies = [ - "cfg-if", - "home", - "windows-sys 0.48.0", -] - -[[package]] -name = "event-listener" -version = "2.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" - -[[package]] -name = "eyre" -version = "0.6.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6267a1fa6f59179ea4afc8e50fd8612a3cc60bc858f786ff877a4a8cb042799" -dependencies = [ - "indenter", - "once_cell", -] - -[[package]] -name = "failure" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d32e9bd16cc02eae7db7ef620b392808b89f6a5e16bb3497d159c6b92a0f4f86" -dependencies = [ - "backtrace", - "failure_derive", -] - -[[package]] -name = "failure_derive" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", - "synstructure", -] - -[[package]] -name = "fastrand" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" - -[[package]] -name = "fd-lock-rs" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef0f547e1d79e058664f2ea7d3a6d82b2ddd5fea4a6650b97b70c38979f34db3" -dependencies = [ - "nix 0.24.3", -] - -[[package]] -name = "ff" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" -dependencies = [ - "rand_core 0.6.4", - "subtle", -] - -[[package]] -name = "fiat-crypto" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27573eac26f4dd11e2b1916c3fe1baa56407c83c71a773a8ba17ec0bca03b6b7" - -[[package]] -name = "filetime" -version = "0.2.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall 0.4.1", - "windows-sys 0.52.0", -] - -[[package]] -name = "finl_unicode" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fcfdc7a0362c9f4444381a9e697c79d435fe65b52a37466fc2c1184cee9edc6" - -[[package]] -name = "fixedbitset" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" - -[[package]] -name = "flate2" -version = "1.0.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" -dependencies = [ - "crc32fast", - "miniz_oxide", -] - -[[package]] -name = "flume" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55ac459de2512911e4b674ce33cf20befaba382d05b62b008afc1c8b57cbf181" -dependencies = [ - "futures-core", - "futures-sink", - "spin 0.9.8", -] - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - -[[package]] -name = "form_urlencoded" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" -dependencies = [ - "percent-encoding", -] - -[[package]] -name = "fp-core" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "338a5feb6c7248603dfa3da758da4e99abb65e792a157fe1d657e7c2f5fbcd0b" -dependencies = [ - "itertools 0.8.2", -] - -[[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.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" -dependencies = [ - "futures-channel", - "futures-core", - "futures-executor", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-channel" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" -dependencies = [ - "futures-core", - "futures-sink", -] - -[[package]] -name = "futures-core" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" - -[[package]] -name = "futures-executor" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-intrusive" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d930c203dd0b6ff06e0201a4a2fe9149b43c684fd4420555b26d21b1a02956f" -dependencies = [ - "futures-core", - "lock_api", - "parking_lot", -] - -[[package]] -name = "futures-io" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" - -[[package]] -name = "futures-macro" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "futures-sink" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" - -[[package]] -name = "futures-task" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" - -[[package]] -name = "futures-util" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" -dependencies = [ - "futures-channel", - "futures-core", - "futures-io", - "futures-macro", - "futures-sink", - "futures-task", - "memchr", - "pin-project-lite", - "pin-utils", - "slab", -] - -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "typenum", - "version_check", - "zeroize", -] - -[[package]] -name = "getrandom" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" -dependencies = [ - "cfg-if", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", -] - -[[package]] -name = "getrandom" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" -dependencies = [ - "cfg-if", - "libc", - "wasi 0.11.0+wasi-snapshot-preview1", -] - -[[package]] -name = "gimli" -version = "0.28.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" - -[[package]] -name = "gpt" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8283e7331b8c93b9756e0cfdbcfb90312852f953c6faf9bf741e684cc3b6ad69" -dependencies = [ - "bitflags 2.4.2", - "crc", - "log", - "uuid", -] - -[[package]] -name = "group" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" -dependencies = [ - "ff", - "rand_core 0.6.4", - "subtle", -] - -[[package]] -name = "h2" -version = "0.3.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http 0.2.11", - "indexmap 2.1.0", - "slab", - "tokio", - "tokio-util", - "tracing", -] - -[[package]] -name = "h2" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31d030e59af851932b72ceebadf4a2b5986dba4c3b99dd2493f8273a0f151943" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http 1.0.0", - "indexmap 2.1.0", - "slab", - "tokio", - "tokio-util", - "tracing", -] - -[[package]] -name = "half" -version = "1.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" - -[[package]] -name = "half" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc52e53916c08643f1b56ec082790d1e86a32e58dc5268f897f313fbae7b4872" -dependencies = [ - "cfg-if", - "crunchy", -] - -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" - -[[package]] -name = "hashbrown" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" -dependencies = [ - "ahash 0.8.7", -] - -[[package]] -name = "hashbrown" -version = "0.14.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" -dependencies = [ - "ahash 0.8.7", - "allocator-api2", -] - -[[package]] -name = "hashlink" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" -dependencies = [ - "hashbrown 0.14.3", -] - -[[package]] -name = "heck" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" -dependencies = [ - "unicode-segmentation", -] - -[[package]] -name = "helpers" -version = "0.1.0" -dependencies = [ - "async-trait", - "color-eyre", - "futures", - "lazy_async_pool", - "models", - "pin-project", - "rpc-toolkit 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde", - "serde_json", - "tokio", - "tokio-stream", - "tracing", -] - -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - -[[package]] -name = "hermit-abi" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d3d0e0f38255e7fa3cf31335b3a56f05febd18025f4db5ef7a0cfb4f8da651f" - -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" - -[[package]] -name = "hifijson" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85ef6b41c333e6dd2a4aaa59125a19b633cd17e7aaf372b2260809777bcdef4a" - -[[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.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" -dependencies = [ - "crypto-mac", - "digest 0.9.0", -] - -[[package]] -name = "hmac" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" -dependencies = [ - "digest 0.10.7", -] - -[[package]] -name = "home" -version = "0.5.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" -dependencies = [ - "windows-sys 0.52.0", -] - -[[package]] -name = "http" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - -[[package]] -name = "http" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b32afd38673a8016f7c9ae69e5af41a58f81b1d31689040f2f1959594ce194ea" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - -[[package]] -name = "http-body" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" -dependencies = [ - "bytes", - "http 0.2.11", - "pin-project-lite", -] - -[[package]] -name = "http-body" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" -dependencies = [ - "bytes", - "http 1.0.0", -] - -[[package]] -name = "http-body-util" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41cb79eb393015dadd30fc252023adb0b2400a0caee0fa2a077e6e21a551e840" -dependencies = [ - "bytes", - "futures-util", - "http 1.0.0", - "http-body 1.0.0", - "pin-project-lite", -] - -[[package]] -name = "httparse" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" - -[[package]] -name = "httpdate" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" - -[[package]] -name = "hyper" -version = "0.14.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" -dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "h2 0.3.24", - "http 0.2.11", - "http-body 0.4.6", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "socket2", - "tokio", - "tower-service", - "tracing", - "want", -] - -[[package]] -name = "hyper" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5aa53871fc917b1a9ed87b683a5d86db645e23acb32c2e0785a353e522fb75" -dependencies = [ - "bytes", - "futures-channel", - "futures-util", - "h2 0.4.2", - "http 1.0.0", - "http-body 1.0.0", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "tokio", -] - -[[package]] -name = "hyper-tls" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" -dependencies = [ - "bytes", - "hyper 0.14.28", - "native-tls", - "tokio", - "tokio-native-tls", -] - -[[package]] -name = "hyper-util" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdea9aac0dbe5a9240d68cfd9501e2db94222c6dc06843e06640b9e07f0fdc67" -dependencies = [ - "bytes", - "futures-channel", - "futures-util", - "http 1.0.0", - "http-body 1.0.0", - "hyper 1.1.0", - "pin-project-lite", - "socket2", - "tokio", - "tracing", -] - -[[package]] -name = "iana-time-zone" -version = "0.1.59" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6a67363e2aa4443928ce15e57ebae94fd8949958fd1223c4cfc0cd473ad7539" -dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "wasm-bindgen", - "windows-core", -] - -[[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" -dependencies = [ - "cc", -] - -[[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - -[[package]] -name = "idna" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" -dependencies = [ - "matches", - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "idna" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "idna" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "idna" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "imbl" -version = "2.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978d142c8028edf52095703af2fad11d6f611af1246685725d6b850634647085" -dependencies = [ - "bitmaps", - "imbl-sized-chunks", - "rand_core 0.6.4", - "rand_xoshiro", - "serde", - "version_check", -] - -[[package]] -name = "imbl-sized-chunks" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "144006fb58ed787dcae3f54575ff4349755b00ccc99f4b4873860b654be1ed63" -dependencies = [ - "bitmaps", -] - -[[package]] -name = "imbl-value" -version = "0.1.0" -source = "git+https://github.com/Start9Labs/imbl-value.git#48dc39a762a3b4f9300d3b9f850cbd394e777ae0" -dependencies = [ - "imbl", - "serde", - "serde_json", - "treediff", - "yasi", -] - -[[package]] -name = "include_dir" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18762faeff7122e89e0857b02f7ce6fcc0d101d5e9ad2ad7846cc01d61b7f19e" -dependencies = [ - "include_dir_macros", -] - -[[package]] -name = "include_dir_macros" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b139284b5cf57ecfa712bcc66950bb635b31aff41c188e8a4cfc758eca374a3f" -dependencies = [ - "proc-macro2", - "quote", -] - -[[package]] -name = "indenter" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" - -[[package]] -name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", - "serde", -] - -[[package]] -name = "indexmap" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" -dependencies = [ - "equivalent", - "hashbrown 0.14.3", - "serde", -] - -[[package]] -name = "indicatif" -version = "0.17.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb28741c9db9a713d93deb3bb9515c20788cef5815265bee4980e87bde7e0f25" -dependencies = [ - "console", - "instant", - "number_prefix", - "portable-atomic", - "tokio", - "unicode-width", -] - -[[package]] -name = "inout" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" -dependencies = [ - "generic-array", -] - -[[package]] -name = "instant" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "integer-encoding" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "924df4f0e24e2e7f9cdd90babb0b96f93b20f3ecfa949ea9e6613756b8c8e1bf" -dependencies = [ - "async-trait", - "tokio", -] - -[[package]] -name = "ipnet" -version = "2.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" -dependencies = [ - "serde", -] - -[[package]] -name = "iprange" -version = "0.6.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37209be0ad225457e63814401415e748e2453a5297f9b637338f5fb8afa4ec00" -dependencies = [ - "ipnet", - "serde", -] - -[[package]] -name = "is-terminal" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bad00257d07be169d870ab665980b06cdb366d792ad690bf2e76876dc503455" -dependencies = [ - "hermit-abi 0.3.4", - "rustix", - "windows-sys 0.52.0", -] - -[[package]] -name = "isocountry" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ea1dc4bf0fb4904ba83ffdb98af3d9c325274e92e6e295e4151e86c96363e04" -dependencies = [ - "serde", - "thiserror", -] - -[[package]] -name = "itertools" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f56a2d0bc861f9165be4eb3442afd3c236d8a98afd426f65d92324ae1091a484" -dependencies = [ - "either", -] - -[[package]] -name = "itertools" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b" -dependencies = [ - "either", -] - -[[package]] -name = "itertools" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" -dependencies = [ - "either", -] - -[[package]] -name = "itertools" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25db6b064527c5d482d0423354fcd07a89a2dfe07b67892e62411946db7f07b0" -dependencies = [ - "either", -] - -[[package]] -name = "itoa" -version = "1.0.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" - -[[package]] -name = "jaq-core" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb52eeac20f256459e909bd4a03bb8c4fab6a1fdbb8ed52d00f644152df48ece" -dependencies = [ - "ahash 0.7.7", - "dyn-clone", - "hifijson", - "indexmap 1.9.3", - "itertools 0.10.5", - "jaq-parse", - "log", - "once_cell", - "regex", - "serde_json", -] - -[[package]] -name = "jaq-parse" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f0f97f01eb9e87af3cbcc843b0dfe693fc6b0a2b9093dc8980dd9fc682826b0" -dependencies = [ - "chumsky", - "serde", -] - -[[package]] -name = "jaq-std" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b261109851c8687bc55eab26e6d81e96f3fdab367e2d3d5706947c218ddaf22" -dependencies = [ - "bincode", - "jaq-parse", -] - -[[package]] -name = "josekit" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd20997283339a19226445db97d632c8dc7adb6b8172537fe0e9e540fb141df2" -dependencies = [ - "anyhow", - "base64 0.21.7", - "flate2", - "once_cell", - "openssl", - "regex", - "serde", - "serde_json", - "thiserror", - "time", -] - -[[package]] -name = "js-sys" -version = "0.3.67" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a1d36f1235bc969acba30b7f5990b864423a6068a10f7c90ae8f0112e3a59d1" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "json-patch" -version = "0.2.7-alpha.0" -dependencies = [ - "imbl-value", - "json-ptr", - "serde", - "treediff", -] - -[[package]] -name = "json-ptr" -version = "0.1.0" -dependencies = [ - "imbl", - "imbl-value", - "serde", - "thiserror", -] - -[[package]] -name = "jsonpath_lib" -version = "0.3.0" -source = "git+https://github.com/Start9Labs/jsonpath.git#1cacbd64afa2e1941a21fef06bad14317ba92f30" -dependencies = [ - "imbl-value", - "log", - "serde", - "serde_json", -] - -[[package]] -name = "keccak" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" -dependencies = [ - "cpufeatures", -] - -[[package]] -name = "lalrpop" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da4081d44f4611b66c6dd725e6de3169f9f63905421e8626fcb86b6a898998b8" -dependencies = [ - "ascii-canvas", - "bit-set", - "diff", - "ena", - "is-terminal", - "itertools 0.10.5", - "lalrpop-util", - "petgraph", - "pico-args", - "regex", - "regex-syntax 0.7.5", - "string_cache", - "term", - "tiny-keccak", - "unicode-xid", -] - -[[package]] -name = "lalrpop-util" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f35c735096c0293d313e8f2a641627472b83d01b937177fe76e5e2708d31e0d" -dependencies = [ - "regex", -] - -[[package]] -name = "lazy_async_pool" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06cf485d4867e0714e35c1652e736bcf892d28fceecca01036764575db64ba84" -dependencies = [ - "async-channel", - "futures", -] - -[[package]] -name = "lazy_format" -version = "2.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e479e99b287d578ed5f6cd4c92cdf48db219088adb9c5b14f7c155b71dfba792" - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -dependencies = [ - "spin 0.5.2", -] - -[[package]] -name = "libc" -version = "0.2.152" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7" - -[[package]] -name = "libm" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" - -[[package]] -name = "libredox" -version = "0.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" -dependencies = [ - "bitflags 2.4.2", - "libc", - "redox_syscall 0.4.1", -] - -[[package]] -name = "libsqlite3-sys" -version = "0.27.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4e226dcd58b4be396f7bd3c20da8fdee2911400705297ba7d2d7cc2c30f716" -dependencies = [ - "cc", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "linear-map" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfae20f6b19ad527b550c223fddc3077a547fc70cda94b9b566575423fd303ee" -dependencies = [ - "serde", - "serde_test", -] - -[[package]] -name = "linked-hash-map" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" - -[[package]] -name = "linux-raw-sys" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" - -[[package]] -name = "lock_api" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" -dependencies = [ - "autocfg", - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" - -[[package]] -name = "matchers" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" -dependencies = [ - "regex-automata 0.1.10", -] - -[[package]] -name = "matches" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" - -[[package]] -name = "matchit" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" - -[[package]] -name = "mbrman" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c487024623ae38584610237dd1be8932bb2b324474b23c37a25f9fbe6bf5e9e" -dependencies = [ - "bincode", - "bitvec", - "serde", - "serde-big-array", - "thiserror", -] - -[[package]] -name = "md-5" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" -dependencies = [ - "cfg-if", - "digest 0.10.7", -] - -[[package]] -name = "memchr" -version = "2.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" - -[[package]] -name = "memoffset" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" -dependencies = [ - "autocfg", -] - -[[package]] -name = "memoffset" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" -dependencies = [ - "autocfg", -] - -[[package]] -name = "mime" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" - -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - -[[package]] -name = "miniz_oxide" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" -dependencies = [ - "adler", -] - -[[package]] -name = "mio" -version = "0.8.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" -dependencies = [ - "libc", - "log", - "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.48.0", -] - -[[package]] -name = "models" -version = "0.1.0" -dependencies = [ - "base64 0.21.7", - "color-eyre", - "ed25519-dalek 2.1.0", - "emver", - "ipnet", - "lazy_static", - "mbrman", - "num_enum", - "openssl", - "patch-db", - "rand 0.8.5", - "regex", - "reqwest", - "rpc-toolkit 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde", - "serde_json", - "sqlx", - "ssh-key", - "thiserror", - "tokio", - "torut", - "tracing", - "yasi", -] - -[[package]] -name = "native-tls" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" -dependencies = [ - "lazy_static", - "libc", - "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", -] - -[[package]] -name = "new_debug_unreachable" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" - -[[package]] -name = "new_mime_guess" -version = "4.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2d684d1b59e0dc07b37e2203ef576987473288f530082512aff850585c61b1f" -dependencies = [ - "mime", - "unicase", -] - -[[package]] -name = "nix" -version = "0.24.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069" -dependencies = [ - "bitflags 1.3.2", - "cfg-if", - "libc", - "memoffset 0.6.5", -] - -[[package]] -name = "nix" -version = "0.25.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f346ff70e7dbfd675fe90590b92d59ef2de15a8779ae305ebcbfd3f0caf59be4" -dependencies = [ - "autocfg", - "bitflags 1.3.2", - "cfg-if", - "libc", - "memoffset 0.6.5", - "pin-utils", -] - -[[package]] -name = "nix" -version = "0.26.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" -dependencies = [ - "bitflags 1.3.2", - "cfg-if", - "libc", - "memoffset 0.7.1", - "pin-utils", -] - -[[package]] -name = "nix" -version = "0.27.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" -dependencies = [ - "bitflags 2.4.2", - "cfg-if", - "libc", -] - -[[package]] -name = "nom" -version = "7.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" -dependencies = [ - "memchr", - "minimal-lexical", -] - -[[package]] -name = "nu-ansi-term" -version = "0.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" -dependencies = [ - "overload", - "winapi", -] - -[[package]] -name = "num" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b05180d69e3da0e530ba2a1dae5110317e49e3b7f3d41be227dc5f92e49ee7af" -dependencies = [ - "num-bigint", - "num-complex", - "num-integer", - "num-iter", - "num-rational", - "num-traits", -] - -[[package]] -name = "num-bigint" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-bigint-dig" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc84195820f291c7697304f3cbdadd1cb7199c0efc917ff5eafd71225c136151" -dependencies = [ - "byteorder", - "lazy_static", - "libm", - "num-integer", - "num-iter", - "num-traits", - "rand 0.8.5", - "smallvec", - "zeroize", -] - -[[package]] -name = "num-complex" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ba157ca0885411de85d6ca030ba7e2a83a28636056c7c699b07c8b6f7383214" -dependencies = [ - "num-traits", -] - -[[package]] -name = "num-integer" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" -dependencies = [ - "autocfg", - "num-traits", -] - -[[package]] -name = "num-iter" -version = "0.1.43" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-rational" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" -dependencies = [ - "autocfg", - "num-bigint", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" -dependencies = [ - "autocfg", - "libm", -] - -[[package]] -name = "num_cpus" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" -dependencies = [ - "hermit-abi 0.3.4", - "libc", -] - -[[package]] -name = "num_enum" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845" -dependencies = [ - "num_enum_derive", -] - -[[package]] -name = "num_enum_derive" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" -dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "number_prefix" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" - -[[package]] -name = "object" -version = "0.32.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" -dependencies = [ - "memchr", -] - -[[package]] -name = "once_cell" -version = "1.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" - -[[package]] -name = "opaque-debug" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" - -[[package]] -name = "openssh-keys" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c75a0ec2d1b302412fb503224289325fcc0e44600176864804c7211b055cfd58" -dependencies = [ - "base64 0.21.7", - "byteorder", - "md-5", - "sha2 0.10.8", - "thiserror", -] - -[[package]] -name = "openssl" -version = "0.10.63" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15c9d69dd87a29568d4d017cfe8ec518706046a05184e5aea92d0af890b803c8" -dependencies = [ - "bitflags 2.4.2", - "cfg-if", - "foreign-types", - "libc", - "once_cell", - "openssl-macros", - "openssl-sys", -] - -[[package]] -name = "openssl-macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "openssl-probe" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" - -[[package]] -name = "openssl-src" -version = "300.2.1+3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fe476c29791a5ca0d1273c697e96085bbabbbea2ef7afd5617e78a4b40332d3" -dependencies = [ - "cc", -] - -[[package]] -name = "openssl-sys" -version = "0.9.99" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22e1bf214306098e4832460f797824c05d25aacdf896f64a985fb0fd992454ae" -dependencies = [ - "cc", - "libc", - "openssl-src", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "os_str_bytes" -version = "6.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" - -[[package]] -name = "overload" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" - -[[package]] -name = "owo-colors" -version = "3.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" - -[[package]] -name = "p256" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b" -dependencies = [ - "ecdsa", - "elliptic-curve", - "primeorder", - "sha2 0.10.8", -] - -[[package]] -name = "p384" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70786f51bcc69f6a4c0360e063a4cac5419ef7c5cd5b3c99ad70f3be5ba79209" -dependencies = [ - "ecdsa", - "elliptic-curve", - "primeorder", - "sha2 0.10.8", -] - -[[package]] -name = "p521" -version = "0.13.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fc9e2161f1f215afdfce23677034ae137bbd45016a880c2eb3ba8eb95f085b2" -dependencies = [ - "base16ct", - "ecdsa", - "elliptic-curve", - "primeorder", - "rand_core 0.6.4", - "sha2 0.10.8", -] - -[[package]] -name = "parking_lot" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall 0.4.1", - "smallvec", - "windows-targets 0.48.5", -] - -[[package]] -name = "paste" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" - -[[package]] -name = "patch-db" -version = "0.1.0" -dependencies = [ - "async-trait", - "fd-lock-rs", - "futures", - "imbl", - "imbl-value", - "json-patch", - "json-ptr", - "lazy_static", - "nix 0.26.4", - "patch-db-macro", - "serde", - "serde_cbor 0.11.1", - "thiserror", - "tokio", - "tracing", - "tracing-error", -] - -[[package]] -name = "patch-db-macro" -version = "0.1.0" -dependencies = [ - "patch-db-macro-internals", - "proc-macro2", - "syn 1.0.109", -] - -[[package]] -name = "patch-db-macro-internals" -version = "0.1.0" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[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 = "pem-rfc7468" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" -dependencies = [ - "base64ct", -] - -[[package]] -name = "percent-encoding" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" - -[[package]] -name = "pest" -version = "2.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f200d8d83c44a45b21764d1916299752ca035d15ecd46faca3e9a2a2bf6ad06" -dependencies = [ - "memchr", - "thiserror", - "ucd-trie", -] - -[[package]] -name = "pest_derive" -version = "2.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcd6ab1236bbdb3a49027e920e693192ebfe8913f6d60e294de57463a493cfde" -dependencies = [ - "pest", - "pest_generator", -] - -[[package]] -name = "pest_generator" -version = "2.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a31940305ffc96863a735bef7c7994a00b325a7138fdbc5bda0f1a0476d3275" -dependencies = [ - "pest", - "pest_meta", - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "pest_meta" -version = "2.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7ff62f5259e53b78d1af898941cdcdccfae7385cf7d793a6e55de5d05bb4b7d" -dependencies = [ - "once_cell", - "pest", - "sha2 0.10.8", -] - -[[package]] -name = "petgraph" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" -dependencies = [ - "fixedbitset", - "indexmap 2.1.0", -] - -[[package]] -name = "phf_shared" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" -dependencies = [ - "siphasher", -] - -[[package]] -name = "pico-args" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315" - -[[package]] -name = "pin-project" -version = "1.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0302c4a0442c456bd56f841aee5c3bfd17967563f6fadc9ceb9f9c23cf3807e0" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "1.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "266c042b60c9c76b8d53061e52b2e0d1116abc57cefc8c5cd671619a56ac3690" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "pin-project-lite" -version = "0.2.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" - -[[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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8ffb9f10fa047879315e6625af03c164b16962a5368d724ed16323b68ace47f" -dependencies = [ - "der", - "pkcs8", - "spki", -] - -[[package]] -name = "pkcs8" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" -dependencies = [ - "der", - "spki", -] - -[[package]] -name = "pkg-config" -version = "0.3.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2900ede94e305130c13ddd391e0ab7cbaeb783945ae07a279c268cb05109c6cb" - -[[package]] -name = "platforms" -version = "3.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "626dec3cac7cc0e1577a2ec3fc496277ec2baa084bebad95bb6fdbfae235f84c" - -[[package]] -name = "portable-atomic" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" - -[[package]] -name = "powerfmt" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" - -[[package]] -name = "ppv-lite86" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" - -[[package]] -name = "precomputed-hash" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" - -[[package]] -name = "prettytable-rs" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eea25e07510aa6ab6547308ebe3c036016d162b8da920dbb079e3ba8acf3d95a" -dependencies = [ - "csv", - "encode_unicode 1.0.0", - "is-terminal", - "lazy_static", - "term", - "unicode-width", -] - -[[package]] -name = "primeorder" -version = "0.13.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "353e1ca18966c16d9deb1c69278edbc5f194139612772bd9537af60ac231e1e6" -dependencies = [ - "elliptic-curve", -] - -[[package]] -name = "proc-macro-crate" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" -dependencies = [ - "toml_edit 0.21.0", -] - -[[package]] -name = "proc-macro2" -version = "1.0.78" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "proptest" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" -dependencies = [ - "bit-set", - "bit-vec", - "bitflags 2.4.2", - "lazy_static", - "num-traits", - "rand 0.8.5", - "rand_chacha 0.3.1", - "rand_xorshift", - "regex-syntax 0.8.2", - "rusty-fork", - "tempfile", - "unarray", -] - -[[package]] -name = "proptest-derive" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf16337405ca084e9c78985114633b6827711d22b9e6ef6c6c0d665eb3f0b6e" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "psl-types" -version = "2.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33cb294fe86a74cbcf50d4445b37da762029549ebeea341421c7c70370f86cac" - -[[package]] -name = "publicsuffix" -version = "2.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96a8c1bda5ae1af7f99a2962e49df150414a43d62404644d98dd5c3a93d07457" -dependencies = [ - "idna 0.3.0", - "psl-types", -] - -[[package]] -name = "quick-error" -version = "1.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" - -[[package]] -name = "quote" -version = "1.0.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "radium" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" - -[[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom 0.1.16", - "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc", -] - -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.4", -] - -[[package]] -name = "rand_chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -dependencies = [ - "ppv-lite86", - "rand_core 0.5.1", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core 0.6.4", -] - -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom 0.1.16", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom 0.2.12", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core 0.5.1", -] - -[[package]] -name = "rand_xorshift" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" -dependencies = [ - "rand_core 0.6.4", -] - -[[package]] -name = "rand_xoshiro" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa" -dependencies = [ - "rand_core 0.6.4", -] - -[[package]] -name = "redox_syscall" -version = "0.1.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" - -[[package]] -name = "redox_syscall" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" -dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "redox_syscall" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" -dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "redox_users" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" -dependencies = [ - "getrandom 0.2.12", - "libredox", - "thiserror", -] - -[[package]] -name = "regex" -version = "1.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata 0.4.5", - "regex-syntax 0.8.2", -] - -[[package]] -name = "regex-automata" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" -dependencies = [ - "regex-syntax 0.6.29", -] - -[[package]] -name = "regex-automata" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax 0.8.2", -] - -[[package]] -name = "regex-syntax" -version = "0.6.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" - -[[package]] -name = "regex-syntax" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" - -[[package]] -name = "regex-syntax" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" - -[[package]] -name = "reqwest" -version = "0.11.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37b1ae8d9ac08420c66222fb9096fc5de435c3c48542bc5336c51892cffafb41" -dependencies = [ - "base64 0.21.7", - "bytes", - "cookie 0.16.2", - "cookie_store 0.16.2", - "encoding_rs", - "futures-core", - "futures-util", - "h2 0.3.24", - "http 0.2.11", - "http-body 0.4.6", - "hyper 0.14.28", - "hyper-tls", - "ipnet", - "js-sys", - "log", - "mime", - "native-tls", - "once_cell", - "percent-encoding", - "pin-project-lite", - "serde", - "serde_json", - "serde_urlencoded", - "system-configuration", - "tokio", - "tokio-native-tls", - "tokio-socks", - "tokio-util", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "wasm-streams", - "web-sys", - "winreg", -] - -[[package]] -name = "reqwest_cookie_store" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba529055ea150e42e4eb9c11dcd380a41025ad4d594b0cb4904ef28b037e1061" -dependencies = [ - "bytes", - "cookie_store 0.20.0", - "reqwest", - "url", -] - -[[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.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" -dependencies = [ - "cc", - "getrandom 0.2.12", - "libc", - "spin 0.9.8", - "untrusted", - "windows-sys 0.48.0", -] - -[[package]] -name = "rpassword" -version = "7.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80472be3c897911d0137b2d2b9055faf6eeac5b14e324073d83bc17b191d7e3f" -dependencies = [ - "libc", - "rtoolbox", - "windows-sys 0.48.0", -] - -[[package]] -name = "rpc-toolkit" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c48252a30abb9426a3239fa8dfd2c8dd2647bb24db0b6145db2df04ae53fe647" -dependencies = [ - "clap 3.2.25", - "futures", - "hyper 0.14.28", - "lazy_static", - "openssl", - "reqwest", - "rpc-toolkit-macro 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde", - "serde_cbor 0.11.2", - "serde_json", - "thiserror", - "tokio", - "url", - "yajrc", -] - -[[package]] -name = "rpc-toolkit" -version = "0.2.3" -source = "git+https://github.com/Start9Labs/rpc-toolkit.git?branch=refactor/traits#9e989e23adb440bc72faa585b28e5aa2667a0a0d" -dependencies = [ - "async-stream", - "async-trait", - "axum", - "clap 4.4.18", - "futures", - "http 1.0.0", - "http-body-util", - "imbl-value", - "itertools 0.12.0", - "lazy_format", - "lazy_static", - "openssl", - "pin-project", - "reqwest", - "rpc-toolkit-macro 0.2.2 (git+https://github.com/Start9Labs/rpc-toolkit.git?branch=refactor/traits)", - "serde", - "serde_json", - "thiserror", - "tokio", - "tokio-stream", - "url", - "yajrc", -] - -[[package]] -name = "rpc-toolkit-macro" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8e4b9cb00baf2d61bcd35e98d67dcb760382a3b4540df7e63b38d053c8a7b8b" -dependencies = [ - "proc-macro2", - "rpc-toolkit-macro-internals 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.109", -] - -[[package]] -name = "rpc-toolkit-macro" -version = "0.2.2" -source = "git+https://github.com/Start9Labs/rpc-toolkit.git?branch=refactor/traits#9e989e23adb440bc72faa585b28e5aa2667a0a0d" -dependencies = [ - "proc-macro2", - "rpc-toolkit-macro-internals 0.2.2 (git+https://github.com/Start9Labs/rpc-toolkit.git?branch=refactor/traits)", - "syn 1.0.109", -] - -[[package]] -name = "rpc-toolkit-macro-internals" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3e2ce21b936feaecdab9c9a8e75b9dca64374ccc11951a58045ad6559b75f42" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "rpc-toolkit-macro-internals" -version = "0.2.2" -source = "git+https://github.com/Start9Labs/rpc-toolkit.git?branch=refactor/traits#9e989e23adb440bc72faa585b28e5aa2667a0a0d" -dependencies = [ - "itertools 0.12.0", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "rsa" -version = "0.9.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d0e5124fcb30e76a7e79bfee683a2746db83784b86289f6251b54b7950a0dfc" -dependencies = [ - "const-oid", - "digest 0.10.7", - "num-bigint-dig", - "num-integer", - "num-traits", - "pkcs1", - "pkcs8", - "rand_core 0.6.4", - "sha2 0.10.8", - "signature 2.2.0", - "spki", - "subtle", - "zeroize", -] - -[[package]] -name = "rtoolbox" -version = "0.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c247d24e63230cdb56463ae328478bd5eac8b8faa8c69461a77e8e323afac90e" -dependencies = [ - "libc", - "windows-sys 0.48.0", -] - -[[package]] -name = "rust-argon2" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5885493fdf0be6cdff808d1533ce878d21cfa49c7086fa00c66355cd9141bfc" -dependencies = [ - "base64 0.21.7", - "blake2b_simd", - "constant_time_eq", - "crossbeam-utils", -] - -[[package]] -name = "rust-argon2" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d9848531d60c9cbbcf9d166c885316c24bc0e2a9d3eba0956bb6cbbd79bc6e8" -dependencies = [ - "base64 0.21.7", - "blake2b_simd", - "constant_time_eq", -] - -[[package]] -name = "rustc-demangle" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" - -[[package]] -name = "rustc_version" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" -dependencies = [ - "semver", -] - -[[package]] -name = "rustix" -version = "0.38.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "322394588aaf33c24007e8bb3238ee3e4c5c09c084ab32bc73890b99ff326bca" -dependencies = [ - "bitflags 2.4.2", - "errno", - "libc", - "linux-raw-sys", - "windows-sys 0.52.0", -] - -[[package]] -name = "rustls" -version = "0.21.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" -dependencies = [ - "ring", - "rustls-webpki 0.101.7", - "sct", -] - -[[package]] -name = "rustls" -version = "0.22.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e87c9956bd9807afa1f77e0f7594af32566e830e088a5576d27c5b6f30f49d41" -dependencies = [ - "log", - "ring", - "rustls-pki-types", - "rustls-webpki 0.102.1", - "subtle", - "zeroize", -] - -[[package]] -name = "rustls-pemfile" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" -dependencies = [ - "base64 0.21.7", -] - -[[package]] -name = "rustls-pki-types" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e9d979b3ce68192e42760c7810125eb6cf2ea10efae545a156063e61f314e2a" - -[[package]] -name = "rustls-webpki" -version = "0.101.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "rustls-webpki" -version = "0.102.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef4ca26037c909dedb327b48c3327d0ba91d3dd3c4e05dad328f210ffb68e95b" -dependencies = [ - "ring", - "rustls-pki-types", - "untrusted", -] - -[[package]] -name = "rustversion" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" - -[[package]] -name = "rusty-fork" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" -dependencies = [ - "fnv", - "quick-error", - "tempfile", - "wait-timeout", -] - -[[package]] -name = "rustyline-async" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9eca4447465ceb8c01c253cc81660b242547c58e4a59c85b13294a6e70de8b9e" -dependencies = [ - "crossterm", - "futures-channel", - "futures-util", - "pin-project", - "thingbuf", - "thiserror", - "unicode-segmentation", - "unicode-width", -] - -[[package]] -name = "ryu" -version = "1.0.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" - -[[package]] -name = "schannel" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" -dependencies = [ - "windows-sys 0.52.0", -] - -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - -[[package]] -name = "sct" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "sec1" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" -dependencies = [ - "base16ct", - "der", - "generic-array", - "pkcs8", - "subtle", - "zeroize", -] - -[[package]] -name = "security-framework" -version = "2.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "core-foundation-sys", - "libc", - "security-framework-sys", -] - -[[package]] -name = "security-framework-sys" -version = "2.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "semver" -version = "1.0.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" -dependencies = [ - "serde", -] - -[[package]] -name = "serde" -version = "1.0.195" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63261df402c67811e9ac6def069e4786148c4563f4b50fd4bf30aa370d626b02" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde-big-array" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3323f09a748af288c3dc2474ea6803ee81f118321775bffa3ac8f7e65c5e90e7" -dependencies = [ - "serde", -] - -[[package]] -name = "serde_cbor" -version = "0.11.1" -dependencies = [ - "half 1.8.2", - "serde", -] - -[[package]] -name = "serde_cbor" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5" -dependencies = [ - "half 1.8.2", - "serde", -] - -[[package]] -name = "serde_derive" -version = "1.0.195" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46fe8f8603d81ba86327b23a2e9cdf49e1255fb94a4c5f297f6ee0547178ea2c" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "serde_json" -version = "1.0.111" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "176e46fa42316f18edd598015a5166857fc835ec732f5215eac6b7bdbf0a84f4" -dependencies = [ - "indexmap 2.1.0", - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "serde_path_to_error" -version = "0.1.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebd154a240de39fdebcf5775d2675c204d7c13cf39a4c697be6493c8e734337c" -dependencies = [ - "itoa", - "serde", -] - -[[package]] -name = "serde_spanned" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" -dependencies = [ - "serde", -] - -[[package]] -name = "serde_test" -version = "1.0.176" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a2f49ace1498612d14f7e0b8245519584db8299541dfe31a06374a828d620ab" -dependencies = [ - "serde", -] - -[[package]] -name = "serde_urlencoded" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" -dependencies = [ - "form_urlencoded", - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "serde_with" -version = "3.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5c9fdb6b00a489875b22efd4b78fe2b363b72265cc5f6eb2e2b9ee270e6140c" -dependencies = [ - "base64 0.21.7", - "chrono", - "hex", - "indexmap 1.9.3", - "indexmap 2.1.0", - "serde", - "serde_json", - "serde_with_macros", - "time", -] - -[[package]] -name = "serde_with_macros" -version = "3.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbff351eb4b33600a2e138dfa0b10b65a238ea8ff8fb2387c422c5022a3e8298" -dependencies = [ - "darling", - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "serde_yaml" -version = "0.8.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578a7433b776b56a35785ed5ce9a7e777ac0598aac5a6dd1b4b18a307c7fc71b" -dependencies = [ - "indexmap 1.9.3", - "ryu", - "serde", - "yaml-rust", -] - -[[package]] -name = "serde_yaml" -version = "0.9.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1bf28c79a99f70ee1f1d83d10c875d2e70618417fda01ad1785e027579d9d38" -dependencies = [ - "indexmap 2.1.0", - "itoa", - "ryu", - "serde", - "unsafe-libyaml", -] - -[[package]] -name = "sha1" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest 0.10.7", -] - -[[package]] -name = "sha2" -version = "0.9.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" -dependencies = [ - "block-buffer 0.9.0", - "cfg-if", - "cpufeatures", - "digest 0.9.0", - "opaque-debug", -] - -[[package]] -name = "sha2" -version = "0.10.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest 0.10.7", -] - -[[package]] -name = "sha3" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809" -dependencies = [ - "block-buffer 0.9.0", - "digest 0.9.0", - "keccak", - "opaque-debug", -] - -[[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.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" - -[[package]] -name = "signal-hook" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" -dependencies = [ - "libc", - "signal-hook-registry", -] - -[[package]] -name = "signal-hook-mio" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29ad2e15f37ec9a6cc544097b78a1ec90001e9f71b81338ca39f430adaca99af" -dependencies = [ - "libc", - "mio", - "signal-hook", -] - -[[package]] -name = "signal-hook-registry" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" -dependencies = [ - "libc", -] - -[[package]] -name = "signature" -version = "1.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" - -[[package]] -name = "signature" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" -dependencies = [ - "digest 0.10.7", - "rand_core 0.6.4", -] - -[[package]] -name = "simple-logging" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b00d48e85675326bb182a2286ea7c1a0b264333ae10f27a937a72be08628b542" -dependencies = [ - "lazy_static", - "log", - "thread-id", -] - -[[package]] -name = "siphasher" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" - -[[package]] -name = "slab" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] - -[[package]] -name = "smallvec" -version = "1.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" - -[[package]] -name = "socket2" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" -dependencies = [ - "libc", - "windows-sys 0.48.0", -] - -[[package]] -name = "spin" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" - -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" -dependencies = [ - "lock_api", -] - -[[package]] -name = "spki" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" -dependencies = [ - "base64ct", - "der", -] - -[[package]] -name = "sqlformat" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce81b7bd7c4493975347ef60d8c7e8b742d4694f4c49f93e0a12ea263938176c" -dependencies = [ - "itertools 0.12.0", - "nom", - "unicode_categories", -] - -[[package]] -name = "sqlx" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dba03c279da73694ef99763320dea58b51095dfe87d001b1d4b5fe78ba8763cf" -dependencies = [ - "sqlx-core", - "sqlx-macros", - "sqlx-mysql", - "sqlx-postgres", - "sqlx-sqlite", -] - -[[package]] -name = "sqlx-core" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d84b0a3c3739e220d94b3239fd69fb1f74bc36e16643423bd99de3b43c21bfbd" -dependencies = [ - "ahash 0.8.7", - "atoi", - "byteorder", - "bytes", - "chrono", - "crc", - "crossbeam-queue", - "dotenvy", - "either", - "event-listener", - "futures-channel", - "futures-core", - "futures-intrusive", - "futures-io", - "futures-util", - "hashlink", - "hex", - "indexmap 2.1.0", - "log", - "memchr", - "once_cell", - "paste", - "percent-encoding", - "rustls 0.21.10", - "rustls-pemfile", - "serde", - "serde_json", - "sha2 0.10.8", - "smallvec", - "sqlformat", - "thiserror", - "tokio", - "tokio-stream", - "tracing", - "url", - "webpki-roots", -] - -[[package]] -name = "sqlx-macros" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89961c00dc4d7dffb7aee214964b065072bff69e36ddb9e2c107541f75e4f2a5" -dependencies = [ - "proc-macro2", - "quote", - "sqlx-core", - "sqlx-macros-core", - "syn 1.0.109", -] - -[[package]] -name = "sqlx-macros-core" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0bd4519486723648186a08785143599760f7cc81c52334a55d6a83ea1e20841" -dependencies = [ - "atomic-write-file", - "dotenvy", - "either", - "heck", - "hex", - "once_cell", - "proc-macro2", - "quote", - "serde", - "serde_json", - "sha2 0.10.8", - "sqlx-core", - "sqlx-mysql", - "sqlx-postgres", - "sqlx-sqlite", - "syn 1.0.109", - "tempfile", - "tokio", - "url", -] - -[[package]] -name = "sqlx-mysql" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e37195395df71fd068f6e2082247891bc11e3289624bbc776a0cdfa1ca7f1ea4" -dependencies = [ - "atoi", - "base64 0.21.7", - "bitflags 2.4.2", - "byteorder", - "bytes", - "chrono", - "crc", - "digest 0.10.7", - "dotenvy", - "either", - "futures-channel", - "futures-core", - "futures-io", - "futures-util", - "generic-array", - "hex", - "hkdf", - "hmac 0.12.1", - "itoa", - "log", - "md-5", - "memchr", - "once_cell", - "percent-encoding", - "rand 0.8.5", - "rsa", - "serde", - "sha1", - "sha2 0.10.8", - "smallvec", - "sqlx-core", - "stringprep", - "thiserror", - "tracing", - "whoami", -] - -[[package]] -name = "sqlx-postgres" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6ac0ac3b7ccd10cc96c7ab29791a7dd236bd94021f31eec7ba3d46a74aa1c24" -dependencies = [ - "atoi", - "base64 0.21.7", - "bitflags 2.4.2", - "byteorder", - "chrono", - "crc", - "dotenvy", - "etcetera", - "futures-channel", - "futures-core", - "futures-io", - "futures-util", - "hex", - "hkdf", - "hmac 0.12.1", - "home", - "itoa", - "log", - "md-5", - "memchr", - "once_cell", - "rand 0.8.5", - "serde", - "serde_json", - "sha1", - "sha2 0.10.8", - "smallvec", - "sqlx-core", - "stringprep", - "thiserror", - "tracing", - "whoami", -] - -[[package]] -name = "sqlx-sqlite" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "210976b7d948c7ba9fced8ca835b11cbb2d677c59c79de41ac0d397e14547490" -dependencies = [ - "atoi", - "chrono", - "flume", - "futures-channel", - "futures-core", - "futures-executor", - "futures-intrusive", - "futures-util", - "libsqlite3-sys", - "log", - "percent-encoding", - "serde", - "sqlx-core", - "tracing", - "url", - "urlencoding", -] - -[[package]] -name = "sscanf" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c713ebd15ce561dd4a13ed62bc2a0368e16806fc30dcaf66ecf1256b2a3fdde6" -dependencies = [ - "const_format", - "lazy_static", - "regex", - "sscanf_macro", -] - -[[package]] -name = "sscanf_macro" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84955aa74a157e5834d58a07be11af7f0ab923f0194a0bb2ea6b3db8b5d1611d" -dependencies = [ - "convert_case 0.6.0", - "proc-macro2", - "quote", - "regex-syntax 0.6.29", - "strsim 0.10.0", - "syn 2.0.48", - "unicode-width", -] - -[[package]] -name = "ssh-cipher" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "caac132742f0d33c3af65bfcde7f6aa8f62f0e991d80db99149eb9d44708784f" -dependencies = [ - "cipher 0.4.4", - "ssh-encoding", -] - -[[package]] -name = "ssh-encoding" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb9242b9ef4108a78e8cd1a2c98e193ef372437f8c22be363075233321dd4a15" -dependencies = [ - "base64ct", - "pem-rfc7468", - "sha2 0.10.8", -] - -[[package]] -name = "ssh-key" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01f8f4ea73476c0aa5d5e6a75ce1e8634e2c3f82005ef3bbed21547ac57f2bf7" -dependencies = [ - "ed25519-dalek 2.1.0", - "p256", - "p384", - "p521", - "rand_core 0.6.4", - "rsa", - "sec1", - "sha2 0.10.8", - "signature 2.2.0", - "ssh-cipher", - "ssh-encoding", - "subtle", - "zeroize", -] - -[[package]] -name = "start-os" -version = "0.3.5-rev.1" -dependencies = [ - "aes", - "async-compression", - "async-stream", - "async-trait", - "axum", - "axum-server", - "base32", - "base64 0.21.7", - "base64ct", - "basic-cookies", - "blake3", - "bytes", - "chrono", - "ciborium", - "clap 4.4.18", - "color-eyre", - "console", - "cookie 0.18.0", - "cookie_store 0.20.0", - "current_platform", - "digest 0.10.7", - "divrem", - "ed25519 2.2.3", - "ed25519-dalek 1.0.1", - "ed25519-dalek 2.1.0", - "emver", - "fd-lock-rs", - "futures", - "gpt", - "helpers", - "hex", - "hmac 0.12.1", - "http 1.0.0", - "imbl", - "imbl-value", - "include_dir", - "indexmap 2.1.0", - "indicatif", - "integer-encoding", - "ipnet", - "iprange", - "isocountry", - "itertools 0.12.0", - "jaq-core", - "jaq-std", - "josekit", - "jsonpath_lib", - "lazy_async_pool", - "lazy_format", - "lazy_static", - "libc", - "log", - "mbrman", - "models", - "new_mime_guess", - "nix 0.27.1", - "nom", - "num", - "num_enum", - "once_cell", - "openssh-keys", - "openssl", - "p256", - "patch-db", - "pbkdf2", - "pin-project", - "pkcs8", - "prettytable-rs", - "proptest", - "proptest-derive", - "rand 0.8.5", - "regex", - "reqwest", - "reqwest_cookie_store", - "rpassword", - "rpc-toolkit 0.2.3 (git+https://github.com/Start9Labs/rpc-toolkit.git?branch=refactor/traits)", - "rust-argon2 2.1.0", - "rustyline-async", - "semver", - "serde", - "serde_json", - "serde_with", - "serde_yaml 0.9.30", - "sha2 0.10.8", - "shell-words", - "simple-logging", - "sqlx", - "sscanf", - "ssh-key", - "stderrlog", - "tar", - "thiserror", - "tokio", - "tokio-rustls", - "tokio-socks", - "tokio-stream", - "tokio-tar", - "tokio-tungstenite", - "tokio-util", - "toml 0.8.8", - "torut", - "tracing", - "tracing-error", - "tracing-futures", - "tracing-journald", - "tracing-subscriber", - "trust-dns-server", - "typed-builder", - "url", - "urlencoding", - "uuid", - "zeroize", -] - -[[package]] -name = "stderrlog" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69a26bbf6de627d389164afa9783739b56746c6c72c4ed16539f4ff54170327b" -dependencies = [ - "atty", - "chrono", - "log", - "termcolor", - "thread_local", -] - -[[package]] -name = "string_cache" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" -dependencies = [ - "new_debug_unreachable", - "once_cell", - "parking_lot", - "phf_shared", - "precomputed-hash", -] - -[[package]] -name = "stringprep" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb41d74e231a107a1b4ee36bd1214b11285b77768d2e3824aedafa988fd36ee6" -dependencies = [ - "finl_unicode", - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "strsim" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" - -[[package]] -name = "strsim" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" - -[[package]] -name = "subtle" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" - -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "2.0.48" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "sync_wrapper" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" - -[[package]] -name = "synstructure" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", - "unicode-xid", -] - -[[package]] -name = "system-configuration" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "system-configuration-sys", -] - -[[package]] -name = "system-configuration-sys" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "tap" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" - -[[package]] -name = "tar" -version = "0.4.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b16afcea1f22891c49a00c751c7b63b2233284064f11a200fc624137c51e2ddb" -dependencies = [ - "filetime", - "libc", - "xattr 1.3.1", -] - -[[package]] -name = "tempfile" -version = "3.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01ce4141aa927a6d1bd34a041795abd0db1cccba5d5f24b009f694bdf3a1f3fa" -dependencies = [ - "cfg-if", - "fastrand", - "redox_syscall 0.4.1", - "rustix", - "windows-sys 0.52.0", -] - -[[package]] -name = "term" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f" -dependencies = [ - "dirs-next", - "rustversion", - "winapi", -] - -[[package]] -name = "termcolor" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "textwrap" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" -dependencies = [ - "unicode-width", -] - -[[package]] -name = "textwrap" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" - -[[package]] -name = "thingbuf" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4706f1bfb859af03f099ada2de3cea3e515843c2d3e93b7893f16d94a37f9415" -dependencies = [ - "parking_lot", - "pin-project", -] - -[[package]] -name = "thiserror" -version = "1.0.56" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54378c645627613241d077a3a79db965db602882668f9136ac42af9ecb730ad" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.56" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "thread-id" -version = "3.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7fbf4c9d56b320106cd64fd024dadfa0be7cb4706725fc44a7d7ce952d820c1" -dependencies = [ - "libc", - "redox_syscall 0.1.57", - "winapi", -] - -[[package]] -name = "thread_local" -version = "1.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" -dependencies = [ - "cfg-if", - "once_cell", -] - -[[package]] -name = "time" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f657ba42c3f86e7680e53c8cd3af8abbe56b5491790b46e22e19c0d57463583e" -dependencies = [ - "deranged", - "itoa", - "powerfmt", - "serde", - "time-core", - "time-macros", -] - -[[package]] -name = "time-core" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" - -[[package]] -name = "time-macros" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26197e33420244aeb70c3e8c78376ca46571bc4e701e4791c2cd9f57dcb3a43f" -dependencies = [ - "time-core", -] - -[[package]] -name = "tiny-keccak" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" -dependencies = [ - "crunchy", -] - -[[package]] -name = "tinyvec" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" -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.35.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c89b4efa943be685f629b149f53829423f8f5531ea21249408e8e2f8671ec104" -dependencies = [ - "backtrace", - "bytes", - "libc", - "mio", - "num_cpus", - "parking_lot", - "pin-project-lite", - "signal-hook-registry", - "socket2", - "tokio-macros", - "windows-sys 0.48.0", -] - -[[package]] -name = "tokio-macros" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "tokio-native-tls" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" -dependencies = [ - "native-tls", - "tokio", -] - -[[package]] -name = "tokio-rustls" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f" -dependencies = [ - "rustls 0.22.2", - "rustls-pki-types", - "tokio", -] - -[[package]] -name = "tokio-socks" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51165dfa029d2a65969413a6cc96f354b86b464498702f174a4efa13608fd8c0" -dependencies = [ - "either", - "futures-util", - "thiserror", - "tokio", -] - -[[package]] -name = "tokio-stream" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" -dependencies = [ - "futures-core", - "pin-project-lite", - "tokio", - "tokio-util", -] - -[[package]] -name = "tokio-tar" -version = "0.3.0" -source = "git+https://github.com/dr-bonez/tokio-tar.git#071db00962a66f8552d418d60be7bdf1c8ed8216" -dependencies = [ - "filetime", - "futures-core", - "libc", - "redox_syscall 0.2.16", - "tokio", - "tokio-stream", - "xattr 0.2.3", -] - -[[package]] -name = "tokio-tungstenite" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c83b561d025642014097b66e6c1bb422783339e0909e4429cde4749d1990bc38" -dependencies = [ - "futures-util", - "log", - "native-tls", - "tokio", - "tokio-native-tls", - "tungstenite", -] - -[[package]] -name = "tokio-util" -version = "0.7.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "pin-project-lite", - "tokio", - "tracing", -] - -[[package]] -name = "toml" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" -dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit 0.19.15", -] - -[[package]] -name = "toml" -version = "0.8.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1a195ec8c9da26928f773888e0742ca3ca1040c6cd859c919c9f59c1954ab35" -dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit 0.21.0", -] - -[[package]] -name = "toml_datetime" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" -dependencies = [ - "serde", -] - -[[package]] -name = "toml_edit" -version = "0.19.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" -dependencies = [ - "indexmap 2.1.0", - "serde", - "serde_spanned", - "toml_datetime", - "winnow", -] - -[[package]] -name = "toml_edit" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03" -dependencies = [ - "indexmap 2.1.0", - "serde", - "serde_spanned", - "toml_datetime", - "winnow", -] - -[[package]] -name = "torut" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99febc413f26cf855b3a309c5872edff5c31e0ffe9c2fce5681868761df36f69" -dependencies = [ - "base32", - "base64 0.13.1", - "derive_more", - "ed25519-dalek 1.0.1", - "hex", - "hmac 0.11.0", - "rand 0.7.3", - "serde", - "serde_derive", - "sha2 0.9.9", - "sha3", - "tokio", -] - -[[package]] -name = "tower" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" -dependencies = [ - "futures-core", - "futures-util", - "pin-project", - "pin-project-lite", - "tokio", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "tower-layer" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" - -[[package]] -name = "tower-service" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" - -[[package]] -name = "tracing" -version = "0.1.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" -dependencies = [ - "log", - "pin-project-lite", - "tracing-attributes", - "tracing-core", -] - -[[package]] -name = "tracing-attributes" -version = "0.1.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "tracing-core" -version = "0.1.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" -dependencies = [ - "once_cell", - "valuable", -] - -[[package]] -name = "tracing-error" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d686ec1c0f384b1277f097b2f279a2ecc11afe8c133c1aabf036a27cb4cd206e" -dependencies = [ - "tracing", - "tracing-subscriber", -] - -[[package]] -name = "tracing-futures" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" -dependencies = [ - "pin-project", - "tracing", -] - -[[package]] -name = "tracing-journald" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba316a74e8fc3c3896a850dba2375928a9fa171b085ecddfc7c054d39970f3fd" -dependencies = [ - "libc", - "tracing-core", - "tracing-subscriber", -] - -[[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.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" -dependencies = [ - "matchers", - "nu-ansi-term", - "once_cell", - "regex", - "sharded-slab", - "smallvec", - "thread_local", - "tracing", - "tracing-core", - "tracing-log", -] - -[[package]] -name = "treediff" -version = "4.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52984d277bdf2a751072b5df30ec0377febdb02f7696d64c2d7d54630bac4303" -dependencies = [ - "serde_json", -] - -[[package]] -name = "trust-dns-proto" -version = "0.23.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3119112651c157f4488931a01e586aa459736e9d6046d3bd9105ffb69352d374" -dependencies = [ - "async-trait", - "cfg-if", - "data-encoding", - "enum-as-inner", - "futures-channel", - "futures-io", - "futures-util", - "idna 0.4.0", - "ipnet", - "once_cell", - "rand 0.8.5", - "smallvec", - "thiserror", - "tinyvec", - "tokio", - "tracing", - "url", -] - -[[package]] -name = "trust-dns-server" -version = "0.23.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c540f73c2b2ec2f6c54eabd0900e7aafb747a820224b742f556e8faabb461bc7" -dependencies = [ - "async-trait", - "bytes", - "cfg-if", - "drain", - "enum-as-inner", - "futures-executor", - "futures-util", - "serde", - "thiserror", - "time", - "tokio", - "toml 0.7.8", - "tracing", - "trust-dns-proto", -] - -[[package]] -name = "try-lock" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" - -[[package]] -name = "tungstenite" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ef1a641ea34f399a848dea702823bbecfb4c486f911735368f1f137cb8257e1" -dependencies = [ - "byteorder", - "bytes", - "data-encoding", - "http 1.0.0", - "httparse", - "log", - "native-tls", - "rand 0.8.5", - "sha1", - "thiserror", - "url", - "utf-8", -] - -[[package]] -name = "typed-builder" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "444d8748011b93cb168770e8092458cb0f8854f931ff82fdf6ddfbd72a9c933e" -dependencies = [ - "typed-builder-macro", -] - -[[package]] -name = "typed-builder-macro" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "563b3b88238ec95680aef36bdece66896eaa7ce3c0f1b4f39d38fb2435261352" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "typenum" -version = "1.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" - -[[package]] -name = "ucd-trie" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" - -[[package]] -name = "unarray" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" - -[[package]] -name = "unicase" -version = "2.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" -dependencies = [ - "version_check", -] - -[[package]] -name = "unicode-bidi" -version = "0.3.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" - -[[package]] -name = "unicode-ident" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" - -[[package]] -name = "unicode-normalization" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" -dependencies = [ - "tinyvec", -] - -[[package]] -name = "unicode-segmentation" -version = "1.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" - -[[package]] -name = "unicode-width" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" - -[[package]] -name = "unicode-xid" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" - -[[package]] -name = "unicode_categories" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" - -[[package]] -name = "unsafe-libyaml" -version = "0.2.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab4c90930b95a82d00dc9e9ac071b4991924390d46cbd0dfe566148667605e4b" - -[[package]] -name = "untrusted" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" - -[[package]] -name = "url" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" -dependencies = [ - "form_urlencoded", - "idna 0.5.0", - "percent-encoding", - "serde", -] - -[[package]] -name = "urlencoding" -version = "2.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" - -[[package]] -name = "utf-8" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" - -[[package]] -name = "utf8parse" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" - -[[package]] -name = "uuid" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f00cc9702ca12d3c81455259621e676d0f7251cec66a21e98fe2e9a37db93b2a" -dependencies = [ - "getrandom 0.2.12", -] - -[[package]] -name = "valuable" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" - -[[package]] -name = "vcpkg" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" - -[[package]] -name = "vec_map" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" - -[[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "wait-timeout" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" -dependencies = [ - "libc", -] - -[[package]] -name = "want" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" -dependencies = [ - "try-lock", -] - -[[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "wasm-bindgen" -version = "0.2.90" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1223296a201415c7fad14792dbefaace9bd52b62d33453ade1c5b5f07555406" -dependencies = [ - "cfg-if", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.90" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcdc935b63408d58a32f8cc9738a0bffd8f05cc7c002086c6ef20b7312ad9dcd" -dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn 2.0.48", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bde2032aeb86bdfaecc8b261eef3cba735cc426c1f3a3416d1e0791be95fc461" -dependencies = [ - "cfg-if", - "js-sys", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.90" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e4c238561b2d428924c49815533a8b9121c664599558a5d9ec51f8a1740a999" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.90" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bae1abb6806dc1ad9e560ed242107c0f6c84335f1749dd4e8ddb012ebd5e25a7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.90" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d91413b1c31d7539ba5ef2451af3f0b833a005eb27a631cec32bc0635a8602b" - -[[package]] -name = "wasm-streams" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4609d447824375f43e1ffbc051b50ad8f4b3ae8219680c94452ea05eb240ac7" -dependencies = [ - "futures-util", - "js-sys", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - -[[package]] -name = "web-sys" -version = "0.3.67" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58cd2333b6e0be7a39605f0e255892fd7418a682d8da8fe042fe25128794d2ed" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "webpki-roots" -version = "0.25.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10" - -[[package]] -name = "whoami" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22fc3756b8a9133049b26c7f61ab35416c130e8c09b660f5b3958b446f52cc50" - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-util" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" -dependencies = [ - "winapi", -] - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "windows-core" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" -dependencies = [ - "windows-targets 0.52.0", -] - -[[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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets 0.52.0", -] - -[[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.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" -dependencies = [ - "windows_aarch64_gnullvm 0.52.0", - "windows_aarch64_msvc 0.52.0", - "windows_i686_gnu 0.52.0", - "windows_i686_msvc 0.52.0", - "windows_x86_64_gnu 0.52.0", - "windows_x86_64_gnullvm 0.52.0", - "windows_x86_64_msvc 0.52.0", -] - -[[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.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" - -[[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.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" - -[[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.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" - -[[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.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" - -[[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.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" - -[[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.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" - -[[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.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" - -[[package]] -name = "winnow" -version = "0.5.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7cf47b659b318dccbd69cc4797a39ae128f533dce7902a1096044d1967b9c16" -dependencies = [ - "memchr", -] - -[[package]] -name = "winreg" -version = "0.50.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] - -[[package]] -name = "wyz" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" -dependencies = [ - "tap", -] - -[[package]] -name = "xattr" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d1526bbe5aaeb5eb06885f4d987bcdfa5e23187055de9b83fe00156a821fabc" -dependencies = [ - "libc", -] - -[[package]] -name = "xattr" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8da84f1a25939b27f6820d92aed108f83ff920fdf11a7b19366c27c4cda81d4f" -dependencies = [ - "libc", - "linux-raw-sys", - "rustix", -] - -[[package]] -name = "yajrc" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce7af47ad983c2f8357333ef87d859e66deb7eef4bf6f9e1ae7b5e99044a48bf" -dependencies = [ - "anyhow", - "serde", - "serde_json", - "thiserror", -] - -[[package]] -name = "yaml-rust" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" -dependencies = [ - "linked-hash-map", -] - -[[package]] -name = "yasi" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f355ab62ebe30b758c1f4ab096a306722c4b7dbfb9d8c07d18c70d71a945588" -dependencies = [ - "ahash 0.8.7", - "hashbrown 0.13.2", - "lazy_static", - "serde", -] - -[[package]] -name = "zerocopy" -version = "0.7.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" -dependencies = [ - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.7.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "zeroize" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" -dependencies = [ - "zeroize_derive", -] - -[[package]] -name = "zeroize_derive" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] diff --git a/system-images/compat/Cargo.toml b/system-images/compat/Cargo.toml deleted file mode 100644 index d5fb24161..000000000 --- a/system-images/compat/Cargo.toml +++ /dev/null @@ -1,33 +0,0 @@ -[package] -authors = ["Aiden McClelland "] -edition = "2018" -name = "compat" -version = "0.1.0" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -anyhow = { version = "1.0.40", features = ["backtrace"] } -beau_collector = "0.2.1" -clap = "2.33.3" -dashmap = "5.3.2" -start-os = { path = "../../core/startos", default-features = false } -emver = { version = "0.1.7", git = "https://github.com/Start9Labs/emver-rs.git", features = [ - "serde", -] } -failure = "0.1.8" -indexmap = { version = "1.6.2", features = ["serde"] } -imbl-value = "0.1.2" -itertools = "0.10.0" -lazy_static = "1.4" -linear-map = { version = "1.2", features = ["serde_impl"] } -log = "0.4.11" -nix = "0.25.0" -pest = "2.1" -pest_derive = "2.1" -rand = "0.8.5" -regex = "1.4.2" -rust-argon2 = "1.0.0" -serde = { version = "1.0.118", features = ["derive", "rc"] } -serde_json = "1.0.67" -serde_yaml = "0.8.17" diff --git a/system-images/compat/Dockerfile b/system-images/compat/Dockerfile deleted file mode 100644 index c01248b04..000000000 --- a/system-images/compat/Dockerfile +++ /dev/null @@ -1 +0,0 @@ -FROM start9/compat \ No newline at end of file diff --git a/system-images/compat/Makefile b/system-images/compat/Makefile deleted file mode 100644 index b6cd1bfec..000000000 --- a/system-images/compat/Makefile +++ /dev/null @@ -1,24 +0,0 @@ -COMPAT_SRC := $(shell find ./src) Cargo.toml Cargo.lock - -.DELETE_ON_ERROR: - -all: docker-images/aarch64.tar docker-images/x86_64.tar - -clean: - cargo clean - rm -rf docker-images - -docker-images: - mkdir docker-images - -docker-images/aarch64.tar: Dockerfile docker-images - docker buildx build --build-arg ARCH=aarch64 --tag start9/x_system/compat --platform=linux/arm64 -o type=docker,dest=docker-images/aarch64.tar . - -docker-images/x86_64.tar: Dockerfile docker-images - docker buildx build --build-arg ARCH=x86_64 --tag start9/x_system/compat --platform=linux/amd64 -o type=docker,dest=docker-images/x86_64.tar . - -target/aarch64-unknown-linux-musl/release/compat: $(COMPAT_SRC) ../../core/Cargo.lock - ARCH=aarch64 ./build.sh - -target/x86_64-unknown-linux-musl/release/compat: $(COMPAT_SRC) ../../core/Cargo.lock - ARCH=x86_64 ./build.sh diff --git a/system-images/compat/build.sh b/system-images/compat/build.sh deleted file mode 100755 index d84f2657b..000000000 --- a/system-images/compat/build.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash - -set -e -shopt -s expand_aliases - -if [ -z "$ARCH" ]; then - ARCH=$(uname -m) -fi - -if [ "$0" != "./build.sh" ]; then - >&2 echo "Must be run from compat directory" - exit 1 -fi - -USE_TTY= -if tty -s; then - USE_TTY="-it" -fi - -alias 'rust-musl-builder'='docker run $USE_TTY --rm -v "$HOME"/.cargo/registry:/root/.cargo/registry -v "$(pwd)":/home/rust/src messense/rust-musl-cross:${ARCH}-musl' - -cd ../.. -rust-musl-builder sh -c "(git config --global --add safe.directory '*'; cd system-images/compat && cargo build --release --target=${ARCH}-unknown-linux-musl --no-default-features)" -cd system-images/compat - -sudo chown -R $USER target -sudo chown -R $USER ~/.cargo \ No newline at end of file diff --git a/system-images/compat/src/backup.rs b/system-images/compat/src/backup.rs deleted file mode 100644 index 9e54100f8..000000000 --- a/system-images/compat/src/backup.rs +++ /dev/null @@ -1,79 +0,0 @@ -use std::{path::Path, process::Stdio}; - -use startos::disk::main::DEFAULT_PASSWORD; - -pub fn create_backup( - mountpoint: impl AsRef, - data_path: impl AsRef, -) -> Result<(), anyhow::Error> { - let mountpoint = std::fs::canonicalize(mountpoint)?; - let data_path = std::fs::canonicalize(data_path)?; - - let ignore_path = data_path.join(".backupignore"); - let exclude = if ignore_path.is_file() { - std::fs::read_to_string(ignore_path)? - } else { - String::new() - }; - - let mut data_cmd = std::process::Command::new("duplicity"); - for exclude in exclude.lines().map(|s| s.trim()).filter(|s| !s.is_empty()) { - if exclude.to_string().starts_with('!') { - data_cmd - .arg(format!( - "--include={}", - data_path - .join(exclude.to_string().trim_start_matches('!')) - .display() - )) - .arg("--allow-source-mismatch"); - } else { - data_cmd - .arg(format!( - "--exclude={}", - data_path.join(exclude.to_string()).display() - )) - .arg("--allow-source-mismatch"); - } - } - let data_output = data_cmd - .env("PASSPHRASE", DEFAULT_PASSWORD) - .arg(data_path) - .arg(format!("file://{}", mountpoint.display().to_string())) - .arg("--allow-source-mismatch") - .stderr(Stdio::piped()) - .output()?; - if !data_output.status.success() { - return Err(anyhow::anyhow!( - "duplicity error: {}", - String::from_utf8(data_output.stderr).unwrap() - )); - } - - Ok(()) -} - -pub fn restore_backup( - mountpoint: impl AsRef, - data_path: impl AsRef, -) -> Result<(), anyhow::Error> { - let mountpoint = std::fs::canonicalize(mountpoint)?; - let data_path = std::fs::canonicalize(data_path)?; - - let data_output = std::process::Command::new("duplicity") - .arg("--allow-source-mismatch") - .env("PASSPHRASE", DEFAULT_PASSWORD) - .arg("--force") - .arg(format!("file://{}", mountpoint.display().to_string())) - .arg(&data_path) - .stderr(Stdio::piped()) - .output()?; - if !data_output.status.success() { - return Err(anyhow::anyhow!( - "duplicity error: {}", - String::from_utf8(data_output.stderr).unwrap() - )); - } - - Ok(()) -} diff --git a/system-images/compat/src/config/mod.rs b/system-images/compat/src/config/mod.rs deleted file mode 100644 index c677dd3d5..000000000 --- a/system-images/compat/src/config/mod.rs +++ /dev/null @@ -1,117 +0,0 @@ -use std::borrow::Cow; -use std::collections::{BTreeMap, BTreeSet, HashMap}; -use std::path::Path; - -use beau_collector::BeauCollector; -use linear_map::LinearMap; -use startos::config::action::SetResult; -use startos::config::{spec, Config}; -use startos::s9pk::manifest::PackageId; -use startos::status::health_check::HealthCheckId; - -pub mod rules; - -use anyhow::anyhow; -pub use rules::{ConfigRuleEntry, ConfigRuleEntryWithSuggestions}; - -use self::rules::ConfigRule; -pub type DepInfo = HashMap; -#[derive(Clone, Debug, serde::Deserialize)] -pub struct DepRuleInfo { - condition: ConfigRule, - health_checks: BTreeSet, -} - -pub fn validate_configuration( - name: &str, - config: Config, - rules_path: &Path, - config_path: &Path, - maybe_deps_path: Option<&str>, -) -> Result { - let rules: Vec = serde_yaml::from_reader(std::fs::File::open(rules_path)?)?; - let mut cfgs = LinearMap::new(); - cfgs.insert(name, Cow::Borrowed(&config)); - - let mut depends_on = BTreeMap::new(); - if let Some(deps_path) = maybe_deps_path.map(Path::new) { - if deps_path.exists() { - let deps: DepInfo = serde_yaml::from_reader(std::fs::File::open(deps_path)?)?; - // check if new config is set to depend on any optional dependencies - depends_on.extend( - deps.into_iter() - .filter(|(_, data)| (data.condition.compiled)(&config, &cfgs)) - .map(|(pkg_id, data)| (pkg_id, data.health_checks)), - ); - }; - } - - // check that all configuration rules - let rule_check = rules - .into_iter() - .map(|r| r.check(&config, &cfgs)) - .bcollect::>(); - match rule_check { - Ok(_) => { - // create temp config file - serde_yaml::to_writer( - std::fs::create_file(config_path.with_extension("tmp"))?, - &config, - )?; - std::fs::rename(config_path.with_extension("tmp"), config_path)?; - // return set result - Ok(SetResult { depends_on }) - } - Err(e) => Err(anyhow!("{}", e)), - } -} - -pub fn validate_dependency_configuration( - name: &str, - config: &Option, - parent_name: &str, - parent_config: Config, - rules_path: &Path, -) -> Result<(), anyhow::Error> { - let rules: Vec = serde_yaml::from_reader(std::fs::File::open(rules_path)?)?; - let mut cfgs = LinearMap::new(); - cfgs.insert(parent_name, Cow::Borrowed(&parent_config)); - if let Some(config) = config { - cfgs.insert(name, Cow::Borrowed(&config)) - } else { - cfgs.insert(name, Cow::Owned(imbl_value::InOMap::new())) - }; - let rule_check = rules - .into_iter() - .map(|r| r.check(&parent_config, &cfgs)) - .bcollect::>(); - match rule_check { - Ok(_) => Ok(()), - Err(e) => Err(anyhow!("{}", e)), - } -} - -pub fn apply_dependency_configuration( - package_id: &str, - config: Option, - dependency_id: &str, - mut dep_config: Config, - rules_path: &Path, -) -> Result { - let rules: Vec = - serde_yaml::from_reader(std::fs::File::open(rules_path)?)?; - let mut cfgs = LinearMap::new(); - cfgs.insert(dependency_id, Cow::Owned(dep_config.clone())); - match config { - Some(config) => cfgs.insert(package_id, Cow::Owned(config.clone())), - None => cfgs.insert(package_id, Cow::Owned(imbl_value::InOMap::new())), - }; - let rule_check = rules - .into_iter() - .map(|r| r.apply(dependency_id, &mut dep_config, &mut cfgs)) - .bcollect::>(); - match rule_check { - Ok(_) => Ok(dep_config), - Err(e) => Err(anyhow!("{}", e)), - } -} diff --git a/system-images/compat/src/config/rule_parser.pest b/system-images/compat/src/config/rule_parser.pest deleted file mode 100644 index 53be53252..000000000 --- a/system-images/compat/src/config/rule_parser.pest +++ /dev/null @@ -1,76 +0,0 @@ -num = @{ int ~ ("." ~ ASCII_DIGIT*)? ~ (^"e" ~ int)? } - int = @{ ("+" | "-")? ~ ASCII_DIGIT+ } - -raw_string = @{ (!("\\" | "\"") ~ ANY)+ } -predefined = @{ "n" | "r" | "t" | "\\" | "0" | "\"" | "'" } -escape = @{ "\\" ~ predefined } -str = @{ "\"" ~ (raw_string | escape)* ~ "\"" } - -ident_char = @{ ASCII_ALPHANUMERIC | "-" } -sub_ident = _{ sub_ident_regular | sub_ident_index | sub_ident_any | sub_ident_all | sub_ident_fn } - sub_ident_regular = { sub_ident_regular_base | sub_ident_regular_expr } - sub_ident_regular_base = @{ ASCII_ALPHA ~ ident_char* } - sub_ident_regular_expr = ${ "[" ~ str_expr ~ "]" } - sub_ident_index = { sub_ident_index_base | sub_ident_index_expr } - sub_ident_index_base = @{ ASCII_DIGIT+ } - sub_ident_index_expr = ${ "[" ~ num_expr ~ "]" } - sub_ident_any = @{ "*" } - sub_ident_all = @{ "&" } - sub_ident_fn = ${ "[" ~ list_access_function ~ "]"} - list_access_function = _{ list_access_function_first | list_access_function_last | list_access_function_any | list_access_function_all } - list_access_function_first = !{ "first" ~ "(" ~ sub_ident_regular ~ "=>" ~ bool_expr ~ ")" } - list_access_function_last = !{ "last" ~ "(" ~ sub_ident_regular ~ "=>" ~ bool_expr ~ ")" } - list_access_function_any = !{ "any" ~ "(" ~ sub_ident_regular ~ "=>" ~ bool_expr ~ ")" } - list_access_function_all = !{ "all" ~ "(" ~ sub_ident_regular ~ "=>" ~ bool_expr ~ ")" } - -app_id = ${ "[" ~ sub_ident_regular ~ "]" } -ident = _{ (app_id ~ ".")? ~ sub_ident_regular ~ ("." ~ sub_ident)* } -bool_var = ${ ident ~ "?" } -num_var = ${ "#" ~ ident } -str_var = ${ "'" ~ ident } -any_var = ${ ident } - -bool_op = _{ and | or | xor } - and = { "AND" } - or = { "OR" } - xor = { "XOR" } - -num_cmp_op = _{ lt | lte | eq | neq | gt | gte } -str_cmp_op = _{ lt | lte | eq | neq | gt | gte } - lt = { "<" } - lte = { "<=" } - eq = { "=" } - neq = { "!=" } - gt = { ">" } - gte = { ">=" } - -num_op = _{ add | sub | mul | div | pow } -str_op = _{ add } - add = { "+" } - sub = { "-" } - mul = { "*" } - div = { "/" } - pow = { "^" } - -num_expr = !{ num_term ~ (num_op ~ num_term)* } -num_term = _{ num | num_var | "(" ~ num_expr ~ ")" } - -str_expr = !{ str_term ~ (str_op ~ str_term)* } -str_term = _{ str | str_var | "(" ~ str_expr ~ ")" } - -num_cmp_expr = { num_expr ~ num_cmp_op ~ num_expr } -str_cmp_expr = { str_expr ~ str_cmp_op ~ str_expr } - -bool_expr = !{ bool_term ~ (bool_op ~ bool_term)* } -inv_bool_expr = { "!(" ~ bool_expr ~ ")" } -bool_term = _{ bool_var | "(" ~ bool_expr ~ ")" | inv_bool_expr | num_cmp_expr | str_cmp_expr } - -val_expr = _{ any_var | str_expr | num_expr | bool_expr } - -rule = _{ SOI ~ bool_expr ~ EOI } -reference = _{ SOI ~ any_var ~ EOI } -value = _{ SOI ~ val_expr ~ EOI } -del_action = _{ SOI ~ "FROM" ~ any_var ~ "AS" ~ sub_ident_regular ~ "WHERE" ~ bool_expr ~ EOI } -obj_key = _{ SOI ~ sub_ident_regular ~ EOI } - -WHITESPACE = _{ " " | "\t" } \ No newline at end of file diff --git a/system-images/compat/src/config/rules.rs b/system-images/compat/src/config/rules.rs deleted file mode 100644 index a74ae195c..000000000 --- a/system-images/compat/src/config/rules.rs +++ /dev/null @@ -1,1261 +0,0 @@ -use std::borrow::Cow; -use std::sync::Arc; - -use imbl_value::{InternedString, Value}; -use linear_map::LinearMap; -use pest::iterators::Pairs; -use pest::Parser; -use rand::SeedableRng; - -use startos::config::util::STATIC_NULL; -use startos::config::Config; - -#[derive(Parser)] -#[grammar = "config/rule_parser.pest"] -struct RuleParser; - -lazy_static::lazy_static! { - static ref NUM_PREC_CLIMBER: pest::prec_climber::PrecClimber = { - use pest::prec_climber::*; - use Rule::*; - use Assoc::*; - - PrecClimber::new(vec![ - Operator::new(add, Left) | Operator::new(sub, Left), - Operator::new(mul, Left) | Operator::new(div, Left), - Operator::new(pow, Right) - ]) - }; - - static ref STR_PREC_CLIMBER: pest::prec_climber::PrecClimber = { - use pest::prec_climber::*; - use Rule::*; - use Assoc::*; - - PrecClimber::new(vec![ - Operator::new(add, Left) - ]) - }; - - static ref BOOL_PREC_CLIMBER: pest::prec_climber::PrecClimber = { - use pest::prec_climber::*; - use Rule::*; - use Assoc::*; - - PrecClimber::new(vec![ - Operator::new(or, Left), - Operator::new(xor, Left), - Operator::new(and, Left) - ]) - }; -} - -pub type Accessor = Box< - dyn for<'a> Fn(&'a Value, &LinearMap<&str, Cow>) -> VarRes<&'a Value> + Send + Sync, ->; -pub type AccessorMut = Box< - dyn for<'a> Fn(&'a mut Value, &LinearMap<&str, Cow>) -> Option<&'a mut Value> - + Send - + Sync, ->; -pub type CompiledExpr = Box>) -> T + Send + Sync>; -pub type CompiledReference = Box< - dyn for<'a> Fn(&'a mut Config, &LinearMap<&str, Cow>) -> Option<&'a mut Value> - + Send - + Sync, ->; -pub type Mutator = Box>) + Send + Sync>; -pub type CompiledRule = Box>) -> bool + Send + Sync>; -pub type CompiledRuleRes = Result; - -#[derive(Clone)] -pub struct ConfigRule { - pub src: String, - pub compiled: Arc, -} -impl std::fmt::Debug for ConfigRule { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - f.debug_struct("ConfigRule") - .field("src", &self.src) - .field("compiled", &"Fn(&Config, &Config) -> bool") - .finish() - } -} -impl<'de> serde::de::Deserialize<'de> for ConfigRule { - fn deserialize(deserializer: D) -> Result - where - D: serde::de::Deserializer<'de>, - { - let src = String::deserialize(deserializer)?; - let compiled = compile(&src).map_err(serde::de::Error::custom)?; - Ok(ConfigRule { - src, - compiled: Arc::new(compiled), - }) - } -} -impl serde::ser::Serialize for ConfigRule { - fn serialize(&self, serializer: S) -> Result - where - S: serde::ser::Serializer, - { - serializer.serialize_str(&self.src) - } -} -#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)] -pub struct ConfigRuleEntry { - pub rule: ConfigRule, - pub description: String, -} -impl ConfigRuleEntry { - pub fn check( - &self, - cfg: &Config, - cfgs: &LinearMap<&str, Cow>, - ) -> Result<(), anyhow::Error> { - if !(self.rule.compiled)(cfg, cfgs) { - return Err(anyhow::anyhow!("{}", self.description)); - } - Ok(()) - } -} - -#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)] -#[serde(rename_all = "kebab-case")] -pub enum SetVariant { - To(String), - ToValue(Value), - ToEntropy(super::spec::Entropy), -} - -#[derive(Clone)] -pub enum SuggestionVariant { - Set { - var: String, - to: SetVariant, - compiled: Arc, - }, - Delete { - src: String, - compiled: Arc, - }, - Push { - to: String, - value: Value, - compiled: Arc, - }, -} -impl SuggestionVariant { - pub fn apply<'a>( - &self, - id: &'a str, - cfg: &mut Config, - cfgs: &mut LinearMap<&'a str, Cow>, - ) { - match self { - SuggestionVariant::Set { ref compiled, .. } => compiled(cfg, cfgs), - SuggestionVariant::Delete { ref compiled, .. } => compiled(cfg, cfgs), - SuggestionVariant::Push { ref compiled, .. } => compiled(cfg, cfgs), - } - cfgs.insert(id, Cow::Owned(cfg.clone())); - } -} -impl std::fmt::Debug for SuggestionVariant { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - SuggestionVariant::Set { - ref var, ref to, .. - } => f - .debug_struct("SuggestionVariant::Set") - .field("var", var) - .field("to", to) - .field("compiled", &"Fn(&mut Config, Config)") - .finish(), - SuggestionVariant::Delete { ref src, .. } => f - .debug_struct("SuggestionVariant::Delete") - .field("src", src) - .field("compiled", &"Fn(&mut Config, Config)") - .finish(), - SuggestionVariant::Push { - ref to, ref value, .. - } => f - .debug_struct("SuggestionVariant::Delete") - .field("to", to) - .field("value", value) - .field("compiled", &"Fn(&mut Config, Config)") - .finish(), - } - } -} -impl<'de> serde::de::Deserialize<'de> for SuggestionVariant { - fn deserialize(deserializer: D) -> Result - where - D: serde::de::Deserializer<'de>, - { - #[derive(serde::Deserialize)] - enum _SuggestionVariant { - SET { - var: String, - #[serde(flatten)] - to: SetVariant, - }, - DELETE(String), - PUSH { - to: String, - value: Value, - }, - } - let raw = _SuggestionVariant::deserialize(deserializer)?; - Ok(match raw { - _SuggestionVariant::SET { var, to } => SuggestionVariant::Set { - compiled: Arc::new( - compile_set_action(&var, &to).map_err(serde::de::Error::custom)?, - ), - to: to, - var: var, - }, - _SuggestionVariant::DELETE(src) => SuggestionVariant::Delete { - compiled: Arc::new( - compile_del_action( - RuleParser::parse(Rule::del_action, &src) - .map_err(serde::de::Error::custom)?, - ) - .map_err(serde::de::Error::custom)?, - ), - src, - }, - _SuggestionVariant::PUSH { to, value } => SuggestionVariant::Push { - compiled: Arc::new( - compile_push_action( - RuleParser::parse(Rule::reference, &to) - .map_err(serde::de::Error::custom)?, - value.clone(), - ) - .map_err(serde::de::Error::custom)?, - ), - to, - value, - }, - }) - } -} -impl serde::ser::Serialize for SuggestionVariant { - fn serialize(&self, serializer: S) -> Result - where - S: serde::ser::Serializer, - { - #[derive(serde::Serialize)] - enum _SuggestionVariant<'a> { - SET { - var: &'a str, - #[serde(flatten)] - to: &'a SetVariant, - }, - DELETE(&'a str), - PUSH { - to: &'a str, - value: &'a Value, - }, - } - match self { - SuggestionVariant::Set { - ref var, ref to, .. - } => serde::ser::Serialize::serialize(&_SuggestionVariant::SET { var, to }, serializer), - SuggestionVariant::Delete { ref src, .. } => { - serde::ser::Serialize::serialize(&_SuggestionVariant::DELETE(src), serializer) - } - SuggestionVariant::Push { - ref to, ref value, .. - } => serde::ser::Serialize::serialize( - &_SuggestionVariant::PUSH { to, value }, - serializer, - ), - } - } -} -#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)] -#[serde(rename_all = "kebab-case")] -pub struct Suggestion { - #[serde(rename = "if")] - #[serde(skip_serializing_if = "Option::is_none")] - #[serde(default)] - pub condition: Option, - #[serde(flatten)] - pub variant: SuggestionVariant, -} -impl Suggestion { - pub fn apply<'a>( - &self, - id: &'a str, - cfg: &mut Config, - cfgs: &mut LinearMap<&'a str, Cow>, - ) { - match &self.condition { - Some(condition) if !(condition.compiled)(cfg, cfgs) => (), - _ => self.variant.apply(id, cfg, cfgs), - } - } -} -#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)] -#[serde(rename_all = "kebab-case")] -pub struct ConfigRuleEntryWithSuggestions { - #[serde(flatten)] - pub entry: ConfigRuleEntry, - pub suggestions: Vec, -} -impl ConfigRuleEntryWithSuggestions { - pub fn apply<'a>( - &self, - id: &'a str, - cfg: &mut Config, - cfgs: &mut LinearMap<&'a str, Cow>, - ) -> Result<(), anyhow::Error> { - if self.entry.check(cfg, cfgs).is_err() { - for suggestion in &self.suggestions { - suggestion.apply(id, cfg, cfgs); - } - self.entry.check(cfg, cfgs) - } else { - Ok(()) - } - } -} - -#[derive(Clone, Debug, PartialEq, Eq)] -pub enum VarRes { - Exactly(T), - Any(Vec>), - All(Vec>), -} -impl VarRes { - fn map U>(self, mut f: F) -> VarRes { - fn map_rec U>(s: VarRes, f: &mut F) -> VarRes { - match s { - VarRes::Exactly(a) => VarRes::Exactly(f(a)), - VarRes::Any(a) => VarRes::Any(a.into_iter().map(|a| map_rec(a, f)).collect()), - VarRes::All(a) => VarRes::All(a.into_iter().map(|a| map_rec(a, f)).collect()), - } - } - map_rec(self, &mut f) - } - fn and_then VarRes>(self, mut f: F) -> VarRes { - fn and_then_rec VarRes>(s: VarRes, f: &mut F) -> VarRes { - match s { - VarRes::Exactly(a) => f(a), - VarRes::Any(a) => VarRes::Any(a.into_iter().map(|a| and_then_rec(a, f)).collect()), - VarRes::All(a) => VarRes::All(a.into_iter().map(|a| and_then_rec(a, f)).collect()), - } - } - and_then_rec(self, &mut f) - } -} -impl VarRes { - fn resolve(self) -> bool { - match self { - VarRes::Exactly(a) => a, - VarRes::Any(a) => a.into_iter().any(|a| a.resolve()), - VarRes::All(a) => a.into_iter().all(|a| a.resolve()), - } - } -} - -fn compile_var_rec(mut ident: Pairs) -> Option { - let idx = ident.next(); - if let Some(idx) = idx { - let deref: Accessor = match idx.as_rule() { - Rule::sub_ident_any => Box::new(|v, _| match v { - Value::Array(l) => VarRes::Any(l.iter().map(VarRes::Exactly).collect()), - Value::Object(o) => { - VarRes::Any(o.iter().map(|(_, a)| VarRes::Exactly(a)).collect()) - } - _ => VarRes::Exactly(&STATIC_NULL), - }), - Rule::sub_ident_all => Box::new(|v, _| match v { - Value::Array(l) => VarRes::All(l.iter().map(VarRes::Exactly).collect()), - Value::Object(o) => { - VarRes::All(o.iter().map(|(_, a)| VarRes::Exactly(a)).collect()) - } - _ => VarRes::Exactly(&STATIC_NULL), - }), - Rule::sub_ident_fn => { - let idx = idx.into_inner().next().unwrap(); - match idx.as_rule() { - Rule::list_access_function_first => { - let mut pred_iter = idx.into_inner(); - let item_var: InternedString = pred_iter.next().unwrap().as_str().into(); - let predicate = compile_bool_expr(pred_iter.next().unwrap().into_inner()); - Box::new(move |v, cfgs| match v { - Value::Array(l) => VarRes::Exactly( - l.iter() - .filter(|item| { - let mut cfg = Config::default(); - cfg.insert(item_var.clone(), (*item).clone()); - predicate(&cfg, cfgs) - }) - .next() - .unwrap_or(&STATIC_NULL), - ), - Value::Object(o) => VarRes::Exactly( - &o.iter() - .map(|(_, item)| item) - .filter(|item| { - let mut cfg = Config::default(); - cfg.insert(item_var.clone(), (*item).clone()); - predicate(&cfg, cfgs) - }) - .next() - .unwrap_or(&STATIC_NULL), - ), - _ => VarRes::Exactly(&STATIC_NULL), - }) - } - Rule::list_access_function_last => { - let mut pred_iter = idx.into_inner(); - let item_var: InternedString = pred_iter.next().unwrap().as_str().into(); - let predicate = compile_bool_expr(pred_iter.next().unwrap().into_inner()); - Box::new(move |v, cfgs| match v { - Value::Array(l) => VarRes::Exactly( - l.iter() - .filter(|item| { - let mut cfg = Config::default(); - cfg.insert(item_var.clone(), (*item).clone()); - predicate(&cfg, cfgs) - }) - .next_back() - .unwrap_or(&STATIC_NULL), - ), - Value::Object(o) => VarRes::Exactly( - &o.iter() - .map(|(_, item)| item) - .filter(|item| { - let mut cfg = Config::default(); - cfg.insert(item_var.clone(), (*item).clone()); - predicate(&cfg, cfgs) - }) - .next_back() - .unwrap_or(&STATIC_NULL), - ), - _ => VarRes::Exactly(&STATIC_NULL), - }) - } - Rule::list_access_function_any => { - let mut pred_iter = idx.into_inner(); - let item_var: InternedString = pred_iter.next().unwrap().as_str().into(); - let predicate = compile_bool_expr(pred_iter.next().unwrap().into_inner()); - Box::new(move |v, cfgs| match v { - Value::Array(l) => VarRes::Any( - l.iter() - .filter(|item| { - let mut cfg = Config::default(); - cfg.insert(item_var.clone(), (*item).clone()); - predicate(&cfg, cfgs) - }) - .map(VarRes::Exactly) - .collect(), - ), - Value::Object(o) => VarRes::Any( - o.iter() - .map(|(_, item)| item) - .filter(|item| { - let mut cfg = Config::default(); - cfg.insert(item_var.clone(), (*item).clone()); - predicate(&cfg, cfgs) - }) - .map(VarRes::Exactly) - .collect(), - ), - _ => VarRes::Exactly(&STATIC_NULL), - }) - } - Rule::list_access_function_all => { - let mut pred_iter = idx.into_inner(); - let item_var: InternedString = pred_iter.next().unwrap().as_str().into(); - let predicate = compile_bool_expr(pred_iter.next().unwrap().into_inner()); - Box::new(move |v, cfgs| match v { - Value::Array(l) => VarRes::All( - l.iter() - .filter(|item| { - let mut cfg = Config::default(); - cfg.insert(item_var.clone(), (*item).clone()); - predicate(&cfg, cfgs) - }) - .map(VarRes::Exactly) - .collect(), - ), - Value::Object(o) => VarRes::All( - o.iter() - .map(|(_, item)| item) - .filter(|item| { - let mut cfg = Config::default(); - cfg.insert(item_var.clone(), (*item).clone()); - predicate(&cfg, cfgs) - }) - .map(VarRes::Exactly) - .collect(), - ), - _ => VarRes::Exactly(&STATIC_NULL), - }) - } - _ => unreachable!(), - } - } - Rule::sub_ident_regular => { - let idx = idx.into_inner().next().unwrap(); - match idx.as_rule() { - Rule::sub_ident_regular_base => { - let idx = idx.as_str().to_owned(); - Box::new(move |v, _| match v { - Value::Object(o) => { - VarRes::Exactly(o.get(&*idx).unwrap_or(&STATIC_NULL)) - } - _ => VarRes::Exactly(&STATIC_NULL), - }) - } - Rule::sub_ident_regular_expr => { - let idx = compile_str_expr(idx.into_inner().next().unwrap().into_inner()); - Box::new(move |v, dep_cfg| match v { - Value::Object(o) => idx(&Config::default(), dep_cfg).map(|idx| { - idx.and_then(|idx| o.get(&*idx)).unwrap_or(&STATIC_NULL) - }), - _ => VarRes::Exactly(&STATIC_NULL), - }) - } - _ => unreachable!(), - } - } - Rule::sub_ident_index => { - let idx = idx.into_inner().next().unwrap(); - match idx.as_rule() { - Rule::sub_ident_index_base => { - let idx: usize = idx.as_str().parse().unwrap(); - Box::new(move |v, _| match v { - Value::Array(l) => VarRes::Exactly(l.get(idx).unwrap_or(&STATIC_NULL)), - _ => VarRes::Exactly(&STATIC_NULL), - }) - } - Rule::sub_ident_index_expr => { - let idx = compile_num_expr(idx.into_inner().next().unwrap().into_inner()); - Box::new(move |v, dep_cfg| match v { - Value::Array(l) => idx(&Config::default(), dep_cfg) - .map(|idx| l.get(idx as usize).unwrap_or(&STATIC_NULL)), - _ => VarRes::Exactly(&STATIC_NULL), - }) - } - _ => unreachable!(), - } - } - _ => unreachable!(), - }; - Some(if let Some(rest) = compile_var_rec(ident) { - Box::new(move |v, cfgs| deref(v, cfgs).and_then(|v| rest(v, cfgs))) - } else { - deref - }) - } else { - None - } -} - -fn compile_var(mut var: Pairs) -> CompiledExpr> { - let mut first_seg = var.next().unwrap(); - let app_id = if first_seg.as_rule() == Rule::app_id { - let app_id = first_seg.into_inner().next().unwrap().as_str().to_owned(); - first_seg = var.next().unwrap(); - Some(app_id) - } else { - None - }; - let first_seg_string = first_seg.as_str().to_owned(); - let accessor = compile_var_rec(var); - Box::new(move |cfg, cfgs| { - let mut cfg: &Config = cfg; - if let Some(ref app_id) = app_id { - cfg = if let Some(cfg) = cfgs.get(&app_id.as_str()) { - cfg - } else { - return VarRes::Exactly(Value::Null); - }; - } - let val = cfg.get(&*first_seg_string).unwrap_or(&STATIC_NULL); - if let Some(accessor) = &accessor { - accessor(val, cfgs).map(|v| v.clone()) - } else { - VarRes::Exactly(val.clone()) - } - }) -} - -fn compile_var_mut_rec(mut ident: Pairs) -> Result, failure::Error> { - let idx = ident.next(); - Ok(if let Some(idx) = idx { - let deref: AccessorMut = match idx.as_rule() { - Rule::sub_ident_fn => { - let idx = idx.into_inner().next().unwrap(); - match idx.as_rule() { - Rule::list_access_function_first => { - let mut pred_iter = idx.into_inner(); - let item_var: InternedString = pred_iter.next().unwrap().as_str().into(); - let predicate = compile_bool_expr(pred_iter.next().unwrap().into_inner()); - Box::new(move |v, cfgs| match v { - Value::Array(l) => l - .iter_mut() - .filter(|item| { - let mut cfg = Config::default(); - cfg.insert(item_var.clone(), (*item).clone()); - predicate(&cfg, cfgs) - }) - .next(), - Value::Object(o) => o - .iter_mut() - .map(|(_, item)| item) - .filter(|item| { - let mut cfg = Config::default(); - cfg.insert(item_var.clone(), (*item).clone()); - predicate(&cfg, cfgs) - }) - .next(), - _ => None, - }) - } - Rule::list_access_function_last => { - let mut pred_iter = idx.into_inner(); - let item_var: InternedString = pred_iter.next().unwrap().as_str().into(); - let predicate = compile_bool_expr(pred_iter.next().unwrap().into_inner()); - Box::new(move |v, cfgs| match v { - Value::Array(l) => l - .iter_mut() - .filter(|item| { - let mut cfg = Config::default(); - cfg.insert(item_var.clone(), (*item).clone()); - predicate(&cfg, cfgs) - }) - .next_back(), - Value::Object(o) => o - .iter_mut() - .map(|(_, item)| item) - .filter(|item| { - let mut cfg = Config::default(); - cfg.insert(item_var.clone(), (*item).clone()); - predicate(&cfg, cfgs) - }) - .next_back(), - _ => None, - }) - } - Rule::list_access_function_any | Rule::list_access_function_all => { - failure::bail!("Any and All are immutable") - } - _ => unreachable!(), - } - } - Rule::sub_ident_regular => { - let idx = idx.into_inner().next().unwrap(); - match idx.as_rule() { - Rule::sub_ident_regular_base => { - let idx: InternedString = idx.as_str().into(); - Box::new(move |v, _| match v { - Value::Object(ref mut o) => { - if o.contains_key(&*idx) { - o.get_mut(&*idx) - } else { - o.insert(idx.clone(), Value::Null); - o.get_mut(&*idx) - } - } - _ => None, - }) - } - Rule::sub_ident_regular_expr => { - let idx = compile_str_expr(idx.into_inner().next().unwrap().into_inner()); - Box::new( - move |v, dep_cfg| match (v, idx(&Config::default(), dep_cfg)) { - (Value::Object(ref mut o), VarRes::Exactly(Some(ref idx))) => { - if o.contains_key(&**idx) { - o.get_mut(&**idx) - } else { - o.insert(idx.clone(), Value::Null); - o.get_mut(&**idx) - } - } - _ => None, - }, - ) - } - _ => unreachable!(), - } - } - Rule::sub_ident_index => { - let idx = idx.into_inner().next().unwrap(); - match idx.as_rule() { - Rule::sub_ident_index_base => { - let idx: usize = idx.as_str().parse().unwrap(); - Box::new(move |v, _| match v { - Value::Array(l) => { - if l.len() > idx { - l.get_mut(idx) - } else if idx == l.len() { - l.push_back(Value::Null); - l.get_mut(idx) - } else { - None - } - } - _ => None, - }) - } - Rule::sub_ident_index_expr => { - let idx = compile_num_expr(idx.into_inner().next().unwrap().into_inner()); - Box::new( - move |v, dep_cfg| match (v, idx(&Config::default(), dep_cfg)) { - (Value::Array(l), VarRes::Exactly(idx)) => { - let idx = idx as usize; - if l.len() > idx { - l.get_mut(idx) - } else if idx == l.len() { - l.push_back(Value::Null); - l.get_mut(idx) - } else { - None - } - } - _ => None, - }, - ) - } - _ => unreachable!(), - } - } - _ => failure::bail!("invalid token: {:?}", idx.as_rule()), - }; - Some(if let Some(rest) = compile_var_mut_rec(ident)? { - Box::new(move |v, cfgs| deref(v, cfgs).and_then(|v| rest(v, cfgs))) - } else { - deref - }) - } else { - None - }) -} - -fn compile_var_mut(mut var: Pairs) -> Result { - let first_seg = var.next().unwrap(); - if first_seg.as_rule() == Rule::app_id { - failure::bail!("Can only assign to relative path"); - } - let first_seg_string: InternedString = first_seg.as_str().into(); - let accessor_mut = compile_var_mut_rec(var)?; - Ok(Box::new(move |cfg, cfgs| { - let var = if cfg.contains_key(&*first_seg_string) { - cfg.get_mut(&*first_seg_string).unwrap() - } else { - cfg.insert(first_seg_string.clone(), Value::Null); - cfg.get_mut(&first_seg_string).unwrap() - }; - if let Some(accessor_mut) = &accessor_mut { - accessor_mut(var, cfgs) - } else { - Some(var) - } - })) -} - -fn compile_bool_var(var: Pairs) -> CompiledRule { - let var = compile_var(var); - Box::new(move |cfg, cfgs| { - var(cfg, cfgs) - .map(|a| match a { - Value::Bool(false) | Value::Null => false, - _ => true, - }) - .resolve() - }) -} - -fn compile_num_var(var: Pairs) -> CompiledExpr> { - let var = compile_var(var); - Box::new(move |cfg, cfgs| { - var(cfg, cfgs).map(|a| match a { - Value::Number(n) => n.as_f64().unwrap(), - Value::String(s) => match s.parse() { - Ok(n) => n, - Err(_) => panic!("string cannot be parsed as an f64"), - }, - Value::Bool(b) => { - if b { - 1.0 - } else { - 0.0 - } - } - _ => panic!("object or list cannot be parsed as an f64"), - }) - }) -} - -fn compile_num(num_str: &str) -> CompiledExpr> { - let num = VarRes::Exactly(num_str.parse().unwrap()); - Box::new(move |_, _| num.clone()) -} - -fn compile_num_expr(pairs: Pairs) -> CompiledExpr> { - NUM_PREC_CLIMBER.climb( - pairs, - |pair| match pair.as_rule() { - Rule::num_var => compile_num_var(pair.into_inner()), - Rule::num => compile_num(pair.as_str()), - Rule::num_expr => compile_num_expr(pair.into_inner()), - _ => unreachable!(), - }, - |lhs, op, rhs| match op.as_rule() { - Rule::add => Box::new(move |cfg, cfgs| { - lhs(cfg, cfgs).and_then(|lhs| rhs(cfg, cfgs).map(|rhs| lhs + rhs)) - }), - Rule::sub => Box::new(move |cfg, cfgs| { - lhs(cfg, cfgs).and_then(|lhs| rhs(cfg, cfgs).map(|rhs| lhs - rhs)) - }), - Rule::mul => Box::new(move |cfg, cfgs| { - lhs(cfg, cfgs).and_then(|lhs| rhs(cfg, cfgs).map(|rhs| lhs * rhs)) - }), - Rule::div => Box::new(move |cfg, cfgs| { - lhs(cfg, cfgs).and_then(|lhs| rhs(cfg, cfgs).map(|rhs| lhs / rhs)) - }), - Rule::pow => Box::new(move |cfg, cfgs| { - lhs(cfg, cfgs).and_then(|lhs| rhs(cfg, cfgs).map(|rhs| lhs.powf(rhs))) - }), - _ => unreachable!(), - }, - ) -} - -fn compile_num_cmp_expr(mut pairs: Pairs) -> CompiledRule { - let lhs = compile_num_expr(pairs.next().unwrap().into_inner()); - let op = pairs.next().unwrap(); - let rhs = compile_num_expr(pairs.next().unwrap().into_inner()); - match op.as_rule() { - Rule::lt => Box::new(move |cfg, cfgs| { - lhs(cfg, cfgs) - .and_then(|lhs| rhs(cfg, cfgs).map(|rhs| lhs < rhs)) - .resolve() - }), - Rule::lte => Box::new(move |cfg, cfgs| { - lhs(cfg, cfgs) - .and_then(|lhs| rhs(cfg, cfgs).map(|rhs| lhs <= rhs)) - .resolve() - }), - Rule::eq => Box::new(move |cfg, cfgs| { - lhs(cfg, cfgs) - .and_then(|lhs| rhs(cfg, cfgs).map(|rhs| lhs == rhs)) - .resolve() - }), - Rule::neq => Box::new(move |cfg, cfgs| { - lhs(cfg, cfgs) - .and_then(|lhs| rhs(cfg, cfgs).map(|rhs| lhs != rhs)) - .resolve() - }), - Rule::gt => Box::new(move |cfg, cfgs| { - lhs(cfg, cfgs) - .and_then(|lhs| rhs(cfg, cfgs).map(|rhs| lhs > rhs)) - .resolve() - }), - Rule::gte => Box::new(move |cfg, cfgs| { - lhs(cfg, cfgs) - .and_then(|lhs| rhs(cfg, cfgs).map(|rhs| lhs >= rhs)) - .resolve() - }), - _ => unreachable!(), - } -} - -fn compile_str_var(var: Pairs) -> CompiledExpr>> { - let var = compile_var(var); - Box::new(move |cfg, cfgs| { - var(cfg, cfgs).map(|a| match a { - Value::String(s) => Some(InternedString::from(&*s)), - Value::Number(n) => Some(InternedString::from_display(&n)), - Value::Bool(b) => Some(InternedString::from_display(&b)), - _ => None, - }) - }) -} - -fn compile_str(str_str: &str) -> CompiledExpr>> { - let str_str = &str_str[1..str_str.len() - 1]; - let mut out = String::with_capacity(str_str.len()); - let mut escape = false; - for c in str_str.chars() { - match c { - '\\' => { - if escape { - out.push('\\'); - } else { - escape = true; - } - } - 'n' if escape => out.push('\n'), - 'r' if escape => out.push('\r'), - 't' if escape => out.push('\t'), - '0' if escape => out.push('\0'), - '"' if escape => out.push('"'), - '\'' if escape => out.push('\''), - _ => { - if escape { - out.push('\\') - } - out.push(c) - } - } - } - let res = VarRes::Exactly(Some(out.into())); - Box::new(move |_, _| res.clone()) -} - -fn compile_str_expr(pairs: Pairs) -> CompiledExpr>> { - STR_PREC_CLIMBER.climb( - pairs, - |pair| match pair.as_rule() { - Rule::str_var => compile_str_var(pair.into_inner()), - Rule::str => compile_str(pair.as_str()), - Rule::str_expr => compile_str_expr(pair.into_inner()), - _ => unreachable!(), - }, - |lhs, op, rhs| match op.as_rule() { - Rule::add => Box::new(move |cfg, cfgs| { - lhs(cfg, cfgs).and_then(|lhs| { - rhs(cfg, cfgs).map(|rhs| { - let lhs = lhs.as_ref()?.to_string(); - let rhs = rhs?; - Some(InternedString::from(lhs + &*rhs)) - }) - }) - }), - _ => unreachable!(), - }, - ) -} - -fn compile_str_cmp_expr(mut pairs: Pairs) -> CompiledRule { - let lhs = compile_str_expr(pairs.next().unwrap().into_inner()); - let op = pairs.next().unwrap(); - let rhs = compile_str_expr(pairs.next().unwrap().into_inner()); - match op.as_rule() { - Rule::lt => Box::new(move |cfg, cfgs| { - lhs(cfg, cfgs) - .and_then(|lhs| { - rhs(cfg, cfgs).map(|rhs| match (&lhs, &rhs) { - (Some(lhs), Some(rhs)) => rhs.contains(&**lhs) && lhs.len() < rhs.len(), - _ => false, - }) - }) - .resolve() - }), - Rule::lte => Box::new(move |cfg, cfgs| { - lhs(cfg, cfgs) - .and_then(|lhs| { - rhs(cfg, cfgs).map(|rhs| match (&lhs, &rhs) { - (Some(lhs), Some(rhs)) => rhs.contains(&**lhs), - _ => false, - }) - }) - .resolve() - }), - Rule::eq => Box::new(move |cfg, cfgs| { - lhs(cfg, cfgs) - .and_then(|lhs| { - rhs(cfg, cfgs).map(|rhs| match (&lhs, &rhs) { - (Some(lhs), Some(rhs)) => lhs == rhs, - (None, None) => true, - _ => false, - }) - }) - .resolve() - }), - Rule::neq => Box::new(move |cfg, cfgs| { - lhs(cfg, cfgs) - .and_then(|lhs| { - rhs(cfg, cfgs).map(|rhs| match (&lhs, &rhs) { - (Some(lhs), Some(rhs)) => lhs != rhs, - (None, None) => false, - _ => true, - }) - }) - .resolve() - }), - Rule::gt => Box::new(move |cfg, cfgs| { - lhs(cfg, cfgs) - .and_then(|lhs| { - rhs(cfg, cfgs).map(|rhs| match (&lhs, &rhs) { - (Some(lhs), Some(rhs)) => lhs.contains(&**rhs) && lhs.len() > rhs.len(), - _ => true, - }) - }) - .resolve() - }), - Rule::gte => Box::new(move |cfg, cfgs| { - lhs(cfg, cfgs) - .and_then(|lhs| { - rhs(cfg, cfgs).map(|rhs| match (&lhs, &rhs) { - (Some(lhs), Some(rhs)) => lhs.contains(&**rhs), - _ => true, - }) - }) - .resolve() - }), - _ => unreachable!(), - } -} - -fn compile_inv_bool_expr(mut pairs: Pairs) -> CompiledRule { - let expr = compile_bool_expr(pairs.next().unwrap().into_inner()); - Box::new(move |cfg, cfgs| !expr(cfg, cfgs)) -} - -fn compile_bool_expr(pairs: Pairs) -> CompiledRule { - BOOL_PREC_CLIMBER.climb( - pairs, - |pair| match pair.as_rule() { - Rule::bool_var => compile_bool_var(pair.into_inner()), - Rule::bool_expr => compile_bool_expr(pair.into_inner()), - Rule::inv_bool_expr => compile_inv_bool_expr(pair.into_inner()), - Rule::num_cmp_expr => compile_num_cmp_expr(pair.into_inner()), - Rule::str_cmp_expr => compile_str_cmp_expr(pair.into_inner()), - _ => unreachable!(), - }, - |lhs, op, rhs| -> CompiledRule { - match op.as_rule() { - Rule::and => Box::new(move |cfg, cfgs| lhs(cfg, cfgs) && rhs(cfg, cfgs)), - Rule::or => Box::new(move |cfg, cfgs| lhs(cfg, cfgs) || rhs(cfg, cfgs)), - Rule::xor => Box::new(move |cfg, cfgs| lhs(cfg, cfgs) ^ rhs(cfg, cfgs)), - _ => unreachable!(), - } - }, - ) -} - -fn compile_value_expr(mut pairs: Pairs) -> CompiledExpr> { - let expr = pairs.next().unwrap(); - match expr.as_rule() { - Rule::any_var => compile_var(expr.into_inner()), - Rule::str_expr => { - let expr = compile_str_expr(expr.into_inner()); - Box::new(move |cfg, cfgs| { - expr(cfg, cfgs).map(|s| { - s.map(|s| Value::String(Arc::new(s.to_string()))) - .unwrap_or(Value::Null) - }) - }) - } - Rule::num_expr => { - let expr = compile_num_expr(expr.into_inner()); - Box::new(move |cfg, cfgs| { - expr(cfg, cfgs).map(|n| match serde_json::Number::from_f64(n) { - Some(a) => Value::Number(a), - None => panic!("cannot coerce f64 into numberc type"), - }) - }) - } - Rule::bool_expr => { - let expr = compile_bool_expr(expr.into_inner()); - Box::new(move |cfg, cfgs| VarRes::Exactly(expr(cfg, cfgs)).map(Value::Bool)) - } - _ => unreachable!(), - } -} - -fn compile_del_action(mut pairs: Pairs) -> Result { - let list_mut = compile_var_mut(pairs.next().unwrap().into_inner())?; - let var: InternedString = pairs.next().unwrap().as_str().into(); - let predicate = compile_bool_expr(pairs.next().unwrap().into_inner()); - Ok(Box::new(move |cfg, cfgs| match (&list_mut)(cfg, cfgs) { - Some(Value::Array(ref mut l)) => { - *l = std::mem::take(l) - .into_iter() - .filter(|item| { - let mut obj = Config::default(); - obj.insert(var.clone(), item.clone()); - !predicate(&obj, cfgs) - }) - .collect(); - } - Some(Value::Object(ref mut o)) => { - *o = std::mem::take(o) - .into_iter() - .filter(|(_, item)| { - let mut obj = Config::default(); - obj.insert(var.clone(), item.clone()); - !predicate(&obj, cfgs) - }) - .collect(); - } - _ => return, - })) -} - -fn compile_push_action(mut pairs: Pairs, value: Value) -> Result { - let list_mut = compile_var_mut(pairs.next().unwrap().into_inner())?; - Ok(Box::new(move |cfg, cfgs| { - let vec = match (&list_mut)(cfg, cfgs) { - Some(Value::Array(ref mut a)) => a, - _ => return, - }; - vec.push_back(value.clone()) - })) -} - -fn compile_set_action(var: &str, to: &SetVariant) -> Result { - let mut var = RuleParser::parse(Rule::reference, var)?; - let get_mut = compile_var_mut(var.next().unwrap().into_inner())?; - Ok(match to { - SetVariant::To(expr) => { - let expr = compile_expr(&expr)?; - Box::new(move |cfg, cfgs| { - let val = expr(cfg, cfgs); - if let Some(var) = get_mut(cfg, cfgs) { - *var = val; - } - }) - } - SetVariant::ToValue(val) => { - let val = val.clone(); - Box::new(move |cfg, cfgs| { - if let Some(var) = get_mut(cfg, cfgs) { - *var = val.clone() - } - }) - } - SetVariant::ToEntropy(entropy) => { - let entropy = entropy.clone(); - Box::new(move |cfg, cfgs| { - if let Some(var) = get_mut(cfg, cfgs) { - *var = Value::String(Arc::new( - entropy.gen(&mut rand::rngs::StdRng::from_entropy()), - )); - } - }) - } - }) -} - -pub fn validate_key(key: &str) -> Result<(), pest::error::Error> { - RuleParser::parse(Rule::obj_key, key)?; - Ok(()) -} - -pub fn parse_and) -> T>( - rule: &str, - f: F, -) -> Result> { - let mut parsed = RuleParser::parse(Rule::rule, rule)?; - let pairs = parsed.next().unwrap().into_inner(); - Ok(f(pairs)) -} - -pub fn compile(rule: &str) -> Result { - parse_and(rule, compile_bool_expr).map_err(From::from) -} - -pub fn compile_expr(expr: &str) -> Result, failure::Error> { - let compiled = compile_value_expr(RuleParser::parse(Rule::value, expr)?); - Ok(Box::new(move |cfg, cfgs| match compiled(cfg, cfgs) { - VarRes::Exactly(v) => v, - _ => Value::Null, - })) -} - -#[cfg(test)] -mod test { - use serde_json::json; - - use super::*; - - #[test] - fn test_compile_str() { - assert_eq!( - compile_str("\"foo\"")(&Default::default(), &Default::default()), - VarRes::Exactly(Some("foo".to_owned())) - ); - } - - #[test] - fn test_access_expr() { - let mut cfg = Config::default(); - let mut cfgs = LinearMap::new(); - let mut foo = Config::default(); - foo.insert("bar!\"".to_owned(), json!(3.0)); - cfg.insert( - "foo".to_owned(), - Value::Array(vec![Value::Null, Value::Object(foo), json!(3)]), - ); - cfgs.insert("my-app", Cow::Borrowed(&cfg)); - assert!((compile("#[my-app].foo.1.[\"ba\" + \"r!\\\"\"] = 3") - .map_err(|e| eprintln!("{}", e)) - .expect("compile failed"))(&cfg, &cfgs)); - assert!((compile("#[my-app].foo.[0 + 1].[\"bar!\\\"\"] = 3") - .map_err(|e| eprintln!("{}", e)) - .expect("compile failed"))(&cfg, &cfgs)); - } - - #[test] - fn test_any_all() { - let mut cfg = Config::default(); - let mut cfgs = LinearMap::new(); - let mut foo = Config::default(); - foo.insert("bar".to_owned(), json!(3.0)); - cfg.insert( - "foo".to_owned(), - Value::Array(vec![Value::Null, Value::Object(foo), json!(3.0)]), - ); - cfgs.insert("my-app", Cow::Borrowed(&cfg)); - // NOTE: these now fail due to added panic for parsing f64's - // assert!((compile("#[my-app].foo.*.bar = 3") - // .map_err(|e| eprintln!("{}", e)) - // .expect("compile failed"))(&cfg, &cfgs)); - // assert!(!(compile("#[my-app].foo.&.bar = 3") - // .map_err(|e| eprintln!("{}", e)) - // .expect("compile failed"))(&cfg, &cfgs)); - } - - #[test] - fn test_first_last() { - let mut cfg = Config::default(); - let mut cfgs = LinearMap::new(); - let mut foo = Config::default(); - foo.insert("bar".to_owned(), json!(3.0)); - foo.insert("baz".to_owned(), json!(4.0)); - let mut qux = Config::default(); - qux.insert("bar".to_owned(), json!(7.0)); - qux.insert("baz".to_owned(), json!(4.0)); - cfg.insert( - "foo".to_owned(), - Value::Array(vec![ - Value::Null, - Value::Object(foo), - Value::Object(qux), - json!(3.0), - ]), - ); - cfgs.insert("my-app", Cow::Borrowed(&cfg)); - // NOTE: these now fail due to added panic for parsing f64's - // assert!((compile("#foo.[first(item => #item.baz = 4)].bar = 3") - // .map_err(|e| eprintln!("{}", e)) - // .expect("compile failed"))(&cfg, &cfgs)); - // assert!((compile("#foo.[last(item => #item.baz = 4)].bar = 7") - // .map_err(|e| eprintln!("{}", e)) - // .expect("compile failed"))(&cfg, &cfgs)); - } - - #[test] - fn test_app_id() { - let mut dependent_cfg = Config::default(); - let mut dependency_cfg = Config::default(); - let mut cfgs = LinearMap::new(); - dependent_cfg.insert("foo".to_owned(), Value::String("bar".to_owned())); - dependency_cfg.insert("foo".to_owned(), Value::String("bar!".to_owned())); - cfgs.insert("my-dependent", Cow::Borrowed(&dependent_cfg)); - cfgs.insert("my-dependency", Cow::Borrowed(&dependency_cfg)); - assert!((compile("'foo = '[my-dependent].foo + \"!\"") - .map_err(|e| eprintln!("{}", e)) - .expect("compile failed"))( - &dependency_cfg, &cfgs - )) - } -} diff --git a/system-images/compat/src/main.rs b/system-images/compat/src/main.rs deleted file mode 100644 index 338e01f5b..000000000 --- a/system-images/compat/src/main.rs +++ /dev/null @@ -1,337 +0,0 @@ -use std::{ - env, - fs::File, - io::{stdin, stdout}, - path::Path, -}; - -#[macro_use] -extern crate failure; -extern crate pest; -#[macro_use] -extern crate pest_derive; - -mod backup; -mod config; -use anyhow::anyhow; -use backup::{create_backup, restore_backup}; -use clap::{App, Arg, SubCommand}; -use config::{ - apply_dependency_configuration, validate_configuration, validate_dependency_configuration, -}; -use serde_json::json; -use startos::config::action::ConfigRes; - -const PROPERTIES_FALLBACK_MESSAGE: &str = - "Could not find properties. The service might still be starting"; -pub enum CompatRes { - SetResult, - ConfigRes, -} - -fn main() { - match inner_main() { - Ok(a) => a, - Err(e) => { - eprintln!("{}", e); - log::debug!("{:?}", e.backtrace()); - drop(e); - std::process::exit(1) - } - } -} - -fn inner_main() -> Result<(), anyhow::Error> { - let app = App::new("compat") - .subcommand( - SubCommand::with_name("config") - .subcommand( - SubCommand::with_name("get") - .arg( - Arg::with_name("mountpoint") - .help("Path to the data mountpoint") - .required(true), - ) - .arg( - Arg::with_name("spec") - .help("The path to the config spec in the container") - .required(true), - ), - ) - .subcommand( - SubCommand::with_name("set") - .arg( - Arg::with_name("package_id") - .help("The `id` field from the manifest file") - .required(true), - ) - .arg( - Arg::with_name("mountpoint") - .help("Path to the data mountpoint") - .required(true), - ) - .arg( - Arg::with_name("assets") - .help("Path to the rules file") - .required(true), - ) - .arg( - Arg::with_name("dependencies") - .help("Path to rules for optional dependency config") - ), - ), - ) - .subcommand( - SubCommand::with_name("dependency") - .subcommand( - SubCommand::with_name("check") - .arg( - Arg::with_name("dependent_package_id") - .help("Package identifier of this package (the child/depdendent)") - .required(true), - ) - .arg( - Arg::with_name("dependency_package_id") - .help("Identifier of the dependency") - .required(true), - ) - .arg( - Arg::with_name("mountpoint") - .help(" ountpoint for the dependent's config file") - .required(true), - ) - .arg( - Arg::with_name("assets") - .help("Path to the dependency's config rules file") - .required(true), - ), - ) - .subcommand( - SubCommand::with_name("auto-configure") - .arg( - Arg::with_name("dependent_package_id") - .help("Package identifier of this package (the child/depdendent)") - .required(true), - ) - .arg( - Arg::with_name("dependency_package_id") - .help("Package identifier of the parent/dependency") - .required(true), - ) - .arg( - Arg::with_name("mountpoint") - .help("Mountpoint for the dependent's config file") - .required(true), - ) - .arg( - Arg::with_name("assets") - .help("Path to the dependency's config rules file") - .required(true), - ), - ), - ) - .subcommand( - SubCommand::with_name("duplicity") - .subcommand( - SubCommand::with_name("create") - .arg( - Arg::with_name("mountpoint") - .help("The backups mount point") - .required(true), - ) - .arg( - Arg::with_name("datapath") - .help("The path to the data to be backed up in the container") - .required(true), - ), - ) - .subcommand( - SubCommand::with_name("restore") - .arg( - Arg::with_name("mountpoint") - .help("The backups mount point") - .required(true), - ) - .arg( - Arg::with_name("datapath") - .help("The path to the data to be restored to the container") - .required(true), - ), - ), - ) - .subcommand( - SubCommand::with_name("properties").arg( - Arg::with_name("mountpoint") - .help("The data directory of the service to mount to.") - .required(true), - ).arg( - Arg::with_name("fallbackMessage") - .help("The message to indicate that the startup is still working, or stats.yaml couldn't be found") - .required(false), - ), - ); - let matches = app.get_matches(); - match matches.subcommand() { - ("config", Some(sub_m)) => match sub_m.subcommand() { - ("get", Some(sub_m)) => { - let cfg_path = - Path::new(sub_m.value_of("mountpoint").unwrap()).join("start9/config.yaml"); - let cfg = if cfg_path.exists() { - Some(serde_yaml::from_reader(File::open(cfg_path).unwrap()).unwrap()) - } else { - None - }; - let spec_path = Path::new(sub_m.value_of("spec").unwrap()); - let spec = serde_yaml::from_reader(File::open(spec_path).unwrap()).unwrap(); - serde_yaml::to_writer(stdout(), &ConfigRes { config: cfg, spec })?; - Ok(()) - } - ("set", Some(sub_m)) => { - let config = serde_yaml::from_reader(stdin())?; - let cfg_path = Path::new(sub_m.value_of("mountpoint").unwrap()).join("start9"); - if !cfg_path.exists() { - std::fs::create_dir_all(&cfg_path).unwrap(); - }; - let rules_path = Path::new(sub_m.value_of("assets").unwrap()); - let name = sub_m.value_of("package_id").unwrap(); - let deps_path = sub_m.value_of("dependencies"); - match validate_configuration( - &name, - config, - rules_path, - &cfg_path.join("config.yaml"), - deps_path, - ) { - Ok(a) => { - serde_yaml::to_writer(stdout(), &a)?; - Ok(()) - } - Err(e) => Err(e), - } - } - (subcmd, _) => { - panic!("Unknown subcommand: {}", subcmd); - } - }, - ("dependency", Some(sub_m)) => match sub_m.subcommand() { - ("check", Some(sub_m)) => { - let parent_config = serde_yaml::from_reader(stdin())?; - let cfg_path = - Path::new(sub_m.value_of("mountpoint").unwrap()).join("start9/config.yaml"); - let config = if cfg_path.exists() { - Some(serde_yaml::from_reader(File::open(cfg_path).unwrap()).unwrap()) - } else { - None - }; - let rules_path = Path::new(sub_m.value_of("assets").unwrap()); - let name = sub_m.value_of("dependent_package_id").unwrap(); - let parent_name = sub_m.value_of("dependency_package_id").unwrap(); - match validate_dependency_configuration( - name, - &config, - parent_name, - parent_config, - rules_path, - ) { - Ok(a) => { - serde_yaml::to_writer(stdout(), &a)?; - Ok(()) - } - Err(e) => { - // error string is configs rules failure description - Err(e) - } - } - } - ("auto-configure", Some(sub_m)) => { - let dep_config = serde_yaml::from_reader(stdin())?; - let cfg_path = - Path::new(sub_m.value_of("mountpoint").unwrap()).join("start9/config.yaml"); - let config = if cfg_path.exists() { - Some(serde_yaml::from_reader(File::open(cfg_path).unwrap()).unwrap()) - } else { - None - }; - let rules_path = Path::new(sub_m.value_of("assets").unwrap()); - let package_id = sub_m.value_of("dependent_package_id").unwrap(); - let dependency_id = sub_m.value_of("dependency_package_id").unwrap(); - match apply_dependency_configuration( - package_id, - config, - dependency_id, - dep_config, - rules_path, - ) { - Ok(a) => { - serde_yaml::to_writer(stdout(), &a)?; - Ok(()) - } - Err(e) => Err(e), - } - } - (subcmd, _) => { - panic!("Unknown subcommand: {}", subcmd); - } - }, - ("duplicity", Some(sub_m)) => match sub_m.subcommand() { - ("create", Some(sub_m)) => { - let res = create_backup( - sub_m.value_of("mountpoint").unwrap(), - sub_m.value_of("datapath").unwrap(), - ); - match res { - Ok(r) => { - serde_yaml::to_writer(stdout(), &r)?; - Ok(()) - } - Err(e) => Err(anyhow!("Could not create backup: {}", e)), - } - } - ("restore", Some(sub_m)) => { - let res = restore_backup( - sub_m.value_of("mountpoint").unwrap(), - sub_m.value_of("datapath").unwrap(), - ); - match res { - Ok(r) => { - serde_yaml::to_writer(stdout(), &r)?; - Ok(()) - } - Err(e) => Err(anyhow!("Could not restore backup: {}", e)), - } - } - (subcmd, _) => { - panic!("Unknown subcommand: {}", subcmd); - } - }, - ("properties", Some(sub_m)) => { - let stats_path = - Path::new(sub_m.value_of("mountpoint").unwrap()).join("start9/stats.yaml"); - let stats: serde_json::Value = if stats_path.exists() { - serde_yaml::from_reader(File::open(stats_path).unwrap()).unwrap() - } else { - let fallback_message: &str = sub_m - .value_of("fallbackMessage") - .unwrap_or_else(|| PROPERTIES_FALLBACK_MESSAGE); - json!({ - "version": 2i64, - "data": { - "Not Ready": { - "type": "string", - "value": fallback_message, - "qr": false, - "copyable": false, - "masked": false, - "description":"Fallback Message When Properties could not be found" - } - } - }) - }; - serde_json::to_writer(stdout(), &stats)?; - Ok(()) - } - (subcmd, _) => { - panic!("Unknown subcommand: {}", subcmd); - } - } -} diff --git a/system-images/utils/.gitignore b/system-images/utils/.gitignore deleted file mode 100644 index 9ea8ef8d2..000000000 --- a/system-images/utils/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/docker-images \ No newline at end of file diff --git a/system-images/utils/Dockerfile b/system-images/utils/Dockerfile deleted file mode 100644 index d2a7129f5..000000000 --- a/system-images/utils/Dockerfile +++ /dev/null @@ -1,3 +0,0 @@ -FROM alpine:latest - -RUN apk update && apk add --no-cache yq jq curl bash diff --git a/system-images/utils/Makefile b/system-images/utils/Makefile deleted file mode 100644 index ffb8c0779..000000000 --- a/system-images/utils/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -.DELETE_ON_ERROR: - -all: docker-images/aarch64.tar docker-images/x86_64.tar - -clean: - rm -rf docker-images - -docker-images: - mkdir docker-images - -docker-images/aarch64.tar: Dockerfile docker-images - docker buildx build --tag start9/x_system/utils --platform=linux/arm64 -o type=docker,dest=docker-images/aarch64.tar . - -docker-images/x86_64.tar: Dockerfile docker-images - docker buildx build --tag start9/x_system/utils --platform=linux/amd64 -o type=docker,dest=docker-images/x86_64.tar . \ No newline at end of file