From 6990f90c2eb58fccaee9292668c1a8a448a13c44 Mon Sep 17 00:00:00 2001
From: David Zhong <91637806+davnotdev@users.noreply.github.com>
Date: Thu, 25 Jan 2024 22:10:24 -0800
Subject: [PATCH 01/32] Implement Gtk Network Status (#165)
Implemented
- Switch reacts to burrow socket and network changes
- meson as build system
- Basic diagnostics to ensure burrow is installed properly
- Flatpak / Meson Building
---
.github/workflows/build-flatpak.yml | 2 +-
burrow-gtk/.cargo/config.toml | 2 +
burrow-gtk/Cargo.lock | 1259 ++++++++++-------
burrow-gtk/Cargo.toml | 11 +-
.../com.hackclub.burrow.devel.json | 9 +-
.../{ => build-aux}/com.hackclub.burrow.json | 9 +-
burrow-gtk/build.rs | 16 +
...ub.burrow.desktop.in => app.desktop.in.in} | 6 +-
burrow-gtk/data/app.gschema.xml.in | 5 +
burrow-gtk/data/app.metainfo.xml.in | 16 +
.../data/com.hackclub.burrow.appdata.xml.in | 8 -
.../data/com.hackclub.burrow.gschema.xml | 5 -
...com.hackclub.burrow.svg => burrow-gtk.svg} | 0
...w-symbolic.svg => burrow-gtk-symbolic.svg} | 2 +-
burrow-gtk/data/icons/meson.build | 13 -
burrow-gtk/data/meson.build | 105 +-
burrow-gtk/data/resources.gresource.xml | 5 +
burrow-gtk/meson.build | 56 +
burrow-gtk/po/POTFILES | 5 +-
burrow-gtk/po/meson.build | 2 +-
burrow-gtk/src/.gitignore | 1 +
burrow-gtk/src/components/app.rs | 136 ++
burrow-gtk/src/components/mod.rs | 20 +
.../src/components/settings/diag_group.rs | 126 ++
burrow-gtk/src/components/settings/mod.rs | 5 +
burrow-gtk/src/components/settings_screen.rs | 44 +
burrow-gtk/src/components/switch_screen.rs | 158 +++
burrow-gtk/src/config.rs.in | 8 +
burrow-gtk/src/diag.rs | 80 ++
burrow-gtk/src/main.rs | 88 +-
burrow-gtk/src/meson.build | 34 +
31 files changed, 1571 insertions(+), 665 deletions(-)
create mode 100644 burrow-gtk/.cargo/config.toml
rename burrow-gtk/{ => build-aux}/com.hackclub.burrow.devel.json (84%)
rename burrow-gtk/{ => build-aux}/com.hackclub.burrow.json (83%)
create mode 100644 burrow-gtk/build.rs
rename burrow-gtk/data/{com.hackclub.burrow.desktop.in => app.desktop.in.in} (60%)
create mode 100644 burrow-gtk/data/app.gschema.xml.in
create mode 100644 burrow-gtk/data/app.metainfo.xml.in
delete mode 100644 burrow-gtk/data/com.hackclub.burrow.appdata.xml.in
delete mode 100644 burrow-gtk/data/com.hackclub.burrow.gschema.xml
rename burrow-gtk/data/icons/hicolor/scalable/apps/{com.hackclub.burrow.svg => burrow-gtk.svg} (100%)
rename burrow-gtk/data/icons/hicolor/symbolic/apps/{com.hackclub.burrow-symbolic.svg => burrow-gtk-symbolic.svg} (97%)
delete mode 100644 burrow-gtk/data/icons/meson.build
create mode 100644 burrow-gtk/data/resources.gresource.xml
create mode 100644 burrow-gtk/meson.build
create mode 100644 burrow-gtk/src/.gitignore
create mode 100644 burrow-gtk/src/components/app.rs
create mode 100644 burrow-gtk/src/components/mod.rs
create mode 100644 burrow-gtk/src/components/settings/diag_group.rs
create mode 100644 burrow-gtk/src/components/settings/mod.rs
create mode 100644 burrow-gtk/src/components/settings_screen.rs
create mode 100644 burrow-gtk/src/components/switch_screen.rs
create mode 100644 burrow-gtk/src/config.rs.in
create mode 100644 burrow-gtk/src/diag.rs
create mode 100644 burrow-gtk/src/meson.build
diff --git a/.github/workflows/build-flatpak.yml b/.github/workflows/build-flatpak.yml
index 8a70613..e0e804e 100644
--- a/.github/workflows/build-flatpak.yml
+++ b/.github/workflows/build-flatpak.yml
@@ -15,5 +15,5 @@ jobs:
- uses: flatpak/flatpak-github-actions/flatpak-builder@v6
with:
bundle: Burrow.flatpak
- manifest-path: burrow-gtk/com.hackclub.burrow.devel.json
+ manifest-path: burrow-gtk/build-aux/com.hackclub.burrow.devel.json
cache-key: flatpak-builder-${{ github.sha }}
diff --git a/burrow-gtk/.cargo/config.toml b/burrow-gtk/.cargo/config.toml
new file mode 100644
index 0000000..87e5dd7
--- /dev/null
+++ b/burrow-gtk/.cargo/config.toml
@@ -0,0 +1,2 @@
+[target.'cfg(unix)']
+runner = "sh -c"
diff --git a/burrow-gtk/Cargo.lock b/burrow-gtk/Cargo.lock
index 3d8f154..d0b7009 100644
--- a/burrow-gtk/Cargo.lock
+++ b/burrow-gtk/Cargo.lock
@@ -17,6 +17,16 @@ version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
+[[package]]
+name = "aead"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0"
+dependencies = [
+ "crypto-common",
+ "generic-array",
+]
+
[[package]]
name = "aes"
version = "0.8.3"
@@ -39,9 +49,9 @@ dependencies = [
[[package]]
name = "anstream"
-version = "0.6.4"
+version = "0.6.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44"
+checksum = "6e2e1ebcb11de5c03c67de28a7df593d32191b44939c482e97702baaaa6ab6a5"
dependencies = [
"anstyle",
"anstyle-parse",
@@ -59,58 +69,60 @@ checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87"
[[package]]
name = "anstyle-parse"
-version = "0.2.2"
+version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "317b9a89c1868f5ea6ff1d9539a69f45dffc21ce321ac1fd1160dfa48c8e2140"
+checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c"
dependencies = [
"utf8parse",
]
[[package]]
name = "anstyle-query"
-version = "1.0.0"
+version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b"
+checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648"
dependencies = [
- "windows-sys",
+ "windows-sys 0.52.0",
]
[[package]]
name = "anstyle-wincon"
-version = "3.0.1"
+version = "3.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628"
+checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7"
dependencies = [
"anstyle",
- "windows-sys",
+ "windows-sys 0.52.0",
]
[[package]]
name = "anyhow"
-version = "1.0.75"
+version = "1.0.79"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6"
+checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca"
[[package]]
name = "async-channel"
-version = "1.9.0"
+version = "2.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35"
+checksum = "1ca33f4bc4ed1babef42cad36cc1f51fa88be00420404e5b1e80ab1b18f7678c"
dependencies = [
"concurrent-queue",
"event-listener",
+ "event-listener-strategy",
"futures-core",
+ "pin-project-lite",
]
[[package]]
name = "async-trait"
-version = "0.1.74"
+version = "0.1.77"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9"
+checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.39",
+ "syn 2.0.48",
]
[[package]]
@@ -136,9 +148,9 @@ dependencies = [
[[package]]
name = "base64"
-version = "0.21.5"
+version = "0.21.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9"
+checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567"
[[package]]
name = "base64ct"
@@ -187,7 +199,7 @@ dependencies = [
"regex",
"rustc-hash",
"shlex",
- "syn 2.0.39",
+ "syn 2.0.48",
"which",
]
@@ -199,9 +211,24 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]]
name = "bitflags"
-version = "2.4.1"
+version = "2.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07"
+checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf"
+
+[[package]]
+name = "blake2"
+version = "0.10.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe"
+dependencies = [
+ "digest",
+]
+
+[[package]]
+name = "block"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a"
[[package]]
name = "block-buffer"
@@ -222,34 +249,52 @@ checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec"
name = "burrow"
version = "0.1.0"
dependencies = [
+ "aead",
"anyhow",
"async-channel",
+ "base64",
+ "blake2",
"caps",
+ "chacha20poly1305",
"clap",
"env_logger",
+ "fehler",
+ "futures",
+ "hmac",
+ "ip_network",
+ "ip_network_table",
+ "ipnet",
"libsystemd",
"log",
"nix",
+ "parking_lot",
+ "rand",
+ "rand_core",
+ "ring",
"schemars",
"serde",
"serde_json",
"tokio",
"tracing",
"tracing-journald",
- "tracing-log",
+ "tracing-log 0.1.4",
"tracing-oslog",
"tracing-subscriber",
"tun",
+ "uuid",
+ "x25519-dalek",
]
[[package]]
name = "burrow-gtk"
version = "0.1.0"
dependencies = [
+ "anyhow",
"burrow",
+ "gettext-rs",
+ "glib-build-tools",
"relm4",
- "relm4-components",
- "relm4-icons",
+ "tokio",
]
[[package]]
@@ -287,11 +332,11 @@ dependencies = [
[[package]]
name = "cairo-rs"
-version = "0.17.10"
+version = "0.18.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ab3603c4028a5e368d09b51c8b624b9a46edcd7c3778284077a6125af73c9f0a"
+checksum = "8ca26ef0159422fb77631dc9d17b102f253b876fe1586b03b803e63a309b4ee2"
dependencies = [
- "bitflags 1.3.2",
+ "bitflags 2.4.2",
"cairo-sys-rs",
"glib",
"libc",
@@ -301,9 +346,9 @@ dependencies = [
[[package]]
name = "cairo-sys-rs"
-version = "0.17.10"
+version = "0.18.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "691d0c66b1fb4881be80a760cb8fe76ea97218312f9dfe2c9cc0f496ca279cb1"
+checksum = "685c9fa8e590b8b3d678873528d83411db17242a73fccaed827770ea0fedda51"
dependencies = [
"glib-sys",
"libc",
@@ -341,9 +386,9 @@ dependencies = [
[[package]]
name = "cfg-expr"
-version = "0.15.5"
+version = "0.15.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "03915af431787e6ffdcc74c645077518c6b6e01f80b761e0fbbfa288536311b3"
+checksum = "6100bc57b6209840798d95cb2775684849d332f7bd788db2a8c8caf7ef82a41a"
dependencies = [
"smallvec",
"target-lexicon",
@@ -355,6 +400,30 @@ version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
+[[package]]
+name = "chacha20"
+version = "0.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c3613f74bd2eac03dad61bd53dbe620703d4371614fe0bc3b9f04dd36fe4e818"
+dependencies = [
+ "cfg-if",
+ "cipher",
+ "cpufeatures",
+]
+
+[[package]]
+name = "chacha20poly1305"
+version = "0.10.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "10cd79432192d1c0f4e1a0fef9527696cc039165d729fb41b3f4f4f354c2dc35"
+dependencies = [
+ "aead",
+ "chacha20",
+ "cipher",
+ "poly1305",
+ "zeroize",
+]
+
[[package]]
name = "cipher"
version = "0.4.4"
@@ -363,24 +432,25 @@ checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad"
dependencies = [
"crypto-common",
"inout",
+ "zeroize",
]
[[package]]
name = "clang-sys"
-version = "1.6.1"
+version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c688fc74432808e3eb684cae8830a86be1d66a2bd58e1f248ed0960a590baf6f"
+checksum = "67523a3b4be3ce1989d607a828d036249522dd9c1c8de7f4dd2dae43a37369d1"
dependencies = [
"glob",
"libc",
- "libloading",
+ "libloading 0.8.1",
]
[[package]]
name = "clap"
-version = "4.4.8"
+version = "4.4.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2275f18819641850fa26c89acc84d465c1bf91ce57bc2748b28c420473352f64"
+checksum = "1e578d6ec4194633722ccf9544794b71b1385c3c027efe0c55db226fc880865c"
dependencies = [
"clap_builder",
"clap_derive",
@@ -388,9 +458,9 @@ dependencies = [
[[package]]
name = "clap_builder"
-version = "4.4.8"
+version = "4.4.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "07cdf1b148b25c1e1f7a42225e30a0d99a615cd4637eae7365548dd4529b95bc"
+checksum = "4df4df40ec50c46000231c914968278b1eb05098cf8f1b3a518a95030e71d1c7"
dependencies = [
"anstream",
"anstyle",
@@ -407,7 +477,7 @@ dependencies = [
"heck",
"proc-macro2",
"quote",
- "syn 2.0.39",
+ "syn 2.0.48",
]
[[package]]
@@ -424,9 +494,9 @@ checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7"
[[package]]
name = "concurrent-queue"
-version = "2.3.0"
+version = "2.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f057a694a54f12365049b0958a1685bb52d567f5593b355fbf685838e873d400"
+checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363"
dependencies = [
"crossbeam-utils",
]
@@ -439,9 +509,9 @@ checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc"
[[package]]
name = "core-foundation"
-version = "0.9.3"
+version = "0.9.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146"
+checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f"
dependencies = [
"core-foundation-sys",
"libc",
@@ -449,15 +519,15 @@ dependencies = [
[[package]]
name = "core-foundation-sys"
-version = "0.8.4"
+version = "0.8.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa"
+checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f"
[[package]]
name = "cpufeatures"
-version = "0.2.11"
+version = "0.2.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0"
+checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504"
dependencies = [
"libc",
]
@@ -473,12 +543,9 @@ dependencies = [
[[package]]
name = "crossbeam-utils"
-version = "0.8.16"
+version = "0.8.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294"
-dependencies = [
- "cfg-if",
-]
+checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345"
[[package]]
name = "crypto-common"
@@ -487,14 +554,42 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3"
dependencies = [
"generic-array",
+ "rand_core",
"typenum",
]
[[package]]
-name = "deranged"
-version = "0.3.9"
+name = "curve25519-dalek"
+version = "4.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0f32d04922c60427da6f9fef14d042d9edddef64cb9d4ce0d64d0685fbeb1fd3"
+checksum = "e89b8c6a2e4b1f45971ad09761aafb85514a84744b67a95e32c3cc1352d1f65c"
+dependencies = [
+ "cfg-if",
+ "cpufeatures",
+ "curve25519-dalek-derive",
+ "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 = "deranged"
+version = "0.3.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4"
dependencies = [
"powerfmt",
]
@@ -533,9 +628,9 @@ dependencies = [
[[package]]
name = "env_logger"
-version = "0.10.1"
+version = "0.10.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "95b3f3e67048839cb0d0781f445682a35113da7121f7c949db0e2be96a4fbece"
+checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580"
dependencies = [
"humantime",
"is-terminal",
@@ -552,19 +647,34 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
[[package]]
name = "errno"
-version = "0.3.6"
+version = "0.3.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7c18ee0ed65a5f1f81cac6b1d213b69c35fa47d4252ad41f1486dbd8226fe36e"
+checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245"
dependencies = [
"libc",
- "windows-sys",
+ "windows-sys 0.52.0",
]
[[package]]
name = "event-listener"
-version = "2.5.3"
+version = "4.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0"
+checksum = "67b215c49b2b248c855fb73579eb1f4f26c38ffdc12973e20e07b91d78d5646e"
+dependencies = [
+ "concurrent-queue",
+ "parking",
+ "pin-project-lite",
+]
+
+[[package]]
+name = "event-listener-strategy"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3"
+dependencies = [
+ "event-listener",
+ "pin-project-lite",
+]
[[package]]
name = "fastrand"
@@ -592,6 +702,12 @@ dependencies = [
"syn 1.0.109",
]
+[[package]]
+name = "fiat-crypto"
+version = "0.2.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "27573eac26f4dd11e2b1916c3fe1baa56407c83c71a773a8ba17ec0bca03b6b7"
+
[[package]]
name = "field-offset"
version = "0.3.6"
@@ -614,14 +730,13 @@ dependencies = [
[[package]]
name = "flume"
-version = "0.10.14"
+version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1657b4441c3403d9f7b3409e47575237dac27b1b5726df654a6ecbf92f0f7577"
+checksum = "55ac459de2512911e4b674ce33cf20befaba382d05b62b008afc1c8b57cbf181"
dependencies = [
"futures-core",
"futures-sink",
"nanorand",
- "pin-project",
"spin",
]
@@ -648,9 +763,9 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
[[package]]
name = "form_urlencoded"
-version = "1.2.0"
+version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652"
+checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456"
dependencies = [
"percent-encoding",
]
@@ -663,9 +778,9 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa"
[[package]]
name = "futures"
-version = "0.3.29"
+version = "0.3.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "da0290714b38af9b4a7b094b8a37086d1b4e61f2df9122c3cad2577669145335"
+checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0"
dependencies = [
"futures-channel",
"futures-core",
@@ -678,9 +793,9 @@ dependencies = [
[[package]]
name = "futures-channel"
-version = "0.3.29"
+version = "0.3.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb"
+checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78"
dependencies = [
"futures-core",
"futures-sink",
@@ -688,15 +803,15 @@ dependencies = [
[[package]]
name = "futures-core"
-version = "0.3.29"
+version = "0.3.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c"
+checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d"
[[package]]
name = "futures-executor"
-version = "0.3.29"
+version = "0.3.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0f4fb8693db0cf099eadcca0efe2a5a22e4550f98ed16aba6c48700da29597bc"
+checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d"
dependencies = [
"futures-core",
"futures-task",
@@ -705,38 +820,38 @@ dependencies = [
[[package]]
name = "futures-io"
-version = "0.3.29"
+version = "0.3.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa"
+checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1"
[[package]]
name = "futures-macro"
-version = "0.3.29"
+version = "0.3.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb"
+checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.39",
+ "syn 2.0.48",
]
[[package]]
name = "futures-sink"
-version = "0.3.29"
+version = "0.3.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817"
+checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5"
[[package]]
name = "futures-task"
-version = "0.3.29"
+version = "0.3.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2"
+checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004"
[[package]]
name = "futures-util"
-version = "0.3.29"
+version = "0.3.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104"
+checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48"
dependencies = [
"futures-channel",
"futures-core",
@@ -752,11 +867,10 @@ dependencies = [
[[package]]
name = "gdk-pixbuf"
-version = "0.17.10"
+version = "0.18.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "695d6bc846438c5708b07007537b9274d883373dd30858ca881d7d71b5540717"
+checksum = "50e1f5f1b0bfb830d6ccc8066d18db35c487b1b2b1e8589b5dfe9f07e8defaec"
dependencies = [
- "bitflags 1.3.2",
"gdk-pixbuf-sys",
"gio",
"glib",
@@ -766,9 +880,9 @@ dependencies = [
[[package]]
name = "gdk-pixbuf-sys"
-version = "0.17.10"
+version = "0.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9285ec3c113c66d7d0ab5676599176f1f42f4944ca1b581852215bf5694870cb"
+checksum = "3f9839ea644ed9c97a34d129ad56d38a25e6756f99f3a88e15cd39c20629caf7"
dependencies = [
"gio-sys",
"glib-sys",
@@ -779,11 +893,10 @@ dependencies = [
[[package]]
name = "gdk4"
-version = "0.6.3"
+version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c3abf96408a26e3eddf881a7f893a1e111767137136e347745e8ea6ed12731ff"
+checksum = "7edb019ad581f8ecf8ea8e4baa6df7c483a95b5a59be3140be6a9c3b0c632af6"
dependencies = [
- "bitflags 1.3.2",
"cairo-rs",
"gdk-pixbuf",
"gdk4-sys",
@@ -795,9 +908,9 @@ dependencies = [
[[package]]
name = "gdk4-sys"
-version = "0.6.3"
+version = "0.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1bc92aa1608c089c49393d014c38ac0390d01e4841e1fedaa75dbcef77aaed64"
+checksum = "dbab43f332a3cf1df9974da690b5bb0e26720ed09a228178ce52175372dcfef0"
dependencies = [
"cairo-sys-rs",
"gdk-pixbuf-sys",
@@ -822,9 +935,9 @@ dependencies = [
[[package]]
name = "getrandom"
-version = "0.2.11"
+version = "0.2.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f"
+checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5"
dependencies = [
"cfg-if",
"js-sys",
@@ -834,18 +947,37 @@ dependencies = [
]
[[package]]
-name = "gimli"
-version = "0.28.0"
+name = "gettext-rs"
+version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0"
+checksum = "e49ea8a8fad198aaa1f9655a2524b64b70eb06b2f3ff37da407566c93054f364"
+dependencies = [
+ "gettext-sys",
+ "locale_config",
+]
+
+[[package]]
+name = "gettext-sys"
+version = "0.21.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c63ce2e00f56a206778276704bbe38564c8695249fdc8f354b4ef71c57c3839d"
+dependencies = [
+ "cc",
+ "temp-dir",
+]
+
+[[package]]
+name = "gimli"
+version = "0.28.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253"
[[package]]
name = "gio"
-version = "0.17.10"
+version = "0.18.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a6973e92937cf98689b6a054a9e56c657ed4ff76de925e36fc331a15f0c5d30a"
+checksum = "d4fc8f532f87b79cbc51a79748f16a6828fb784be93145a322fa14d06d354c73"
dependencies = [
- "bitflags 1.3.2",
"futures-channel",
"futures-core",
"futures-io",
@@ -861,9 +993,9 @@ dependencies = [
[[package]]
name = "gio-sys"
-version = "0.17.10"
+version = "0.18.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0ccf87c30a12c469b6d958950f6a9c09f2be20b7773f7e70d20b867fdf2628c3"
+checksum = "37566df850baf5e4cb0dfb78af2e4b9898d817ed9263d1090a2df958c64737d2"
dependencies = [
"glib-sys",
"gobject-sys",
@@ -874,11 +1006,11 @@ dependencies = [
[[package]]
name = "glib"
-version = "0.17.10"
+version = "0.18.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d3fad45ba8d4d2cea612b432717e834f48031cd8853c8aaf43b2c79fec8d144b"
+checksum = "233daaf6e83ae6a12a52055f568f9d7cf4671dabb78ff9560ab6da230ce00ee5"
dependencies = [
- "bitflags 1.3.2",
+ "bitflags 2.4.2",
"futures-channel",
"futures-core",
"futures-executor",
@@ -896,25 +1028,30 @@ dependencies = [
]
[[package]]
-name = "glib-macros"
-version = "0.17.10"
+name = "glib-build-tools"
+version = "0.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eca5c79337338391f1ab8058d6698125034ce8ef31b72a442437fa6c8580de26"
+checksum = "3431c56f463443cba9bc3600248bc6d680cb614c2ee1cdd39dab5415bd12ac5c"
+
+[[package]]
+name = "glib-macros"
+version = "0.18.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0bb0228f477c0900c880fd78c8759b95c7636dbd7842707f49e132378aa2acdc"
dependencies = [
- "anyhow",
"heck",
- "proc-macro-crate",
+ "proc-macro-crate 2.0.1",
"proc-macro-error",
"proc-macro2",
"quote",
- "syn 1.0.109",
+ "syn 2.0.48",
]
[[package]]
name = "glib-sys"
-version = "0.17.10"
+version = "0.18.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d80aa6ea7bba0baac79222204aa786a6293078c210abe69ef1336911d4bdc4f0"
+checksum = "063ce2eb6a8d0ea93d2bf8ba1957e78dbab6be1c2220dd3daca57d5a9d869898"
dependencies = [
"libc",
"system-deps",
@@ -928,9 +1065,9 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
[[package]]
name = "gobject-sys"
-version = "0.17.10"
+version = "0.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cd34c3317740a6358ec04572c1bcfd3ac0b5b6529275fae255b237b314bb8062"
+checksum = "0850127b514d1c4a4654ead6dedadb18198999985908e6ffe4436f53c785ce44"
dependencies = [
"glib-sys",
"libc",
@@ -939,9 +1076,9 @@ dependencies = [
[[package]]
name = "graphene-rs"
-version = "0.17.10"
+version = "0.18.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "def4bb01265b59ed548b05455040d272d989b3012c42d4c1bbd39083cb9b40d9"
+checksum = "3b2228cda1505613a7a956cca69076892cfbda84fc2b7a62b94a41a272c0c401"
dependencies = [
"glib",
"graphene-sys",
@@ -950,9 +1087,9 @@ dependencies = [
[[package]]
name = "graphene-sys"
-version = "0.17.10"
+version = "0.18.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1856fc817e6a6675e36cea0bd9a3afe296f5d9709d1e2d3182803ac77f0ab21d"
+checksum = "cc4144cee8fc8788f2a9b73dc5f1d4e1189d1f95305c4cb7bd9c1af1cfa31f59"
dependencies = [
"glib-sys",
"libc",
@@ -962,11 +1099,10 @@ dependencies = [
[[package]]
name = "gsk4"
-version = "0.6.3"
+version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6f01ef44fa7cac15e2da9978529383e6bee03e570ba5bf7036b4c10a15cc3a3c"
+checksum = "0d958e351d2f210309b32d081c832d7de0aca0b077aa10d88336c6379bd01f7e"
dependencies = [
- "bitflags 1.3.2",
"cairo-rs",
"gdk4",
"glib",
@@ -978,9 +1114,9 @@ dependencies = [
[[package]]
name = "gsk4-sys"
-version = "0.6.3"
+version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c07a84fb4dcf1323d29435aa85e2f5f58bef564342bef06775ec7bd0da1f01b0"
+checksum = "12bd9e3effea989f020e8f1ff3fa3b8c63ba93d43b899c11a118868853a56d55"
dependencies = [
"cairo-sys-rs",
"gdk4-sys",
@@ -994,11 +1130,10 @@ dependencies = [
[[package]]
name = "gtk4"
-version = "0.6.6"
+version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b28a32a04cd75cef14a0983f8b0c669e0fe152a0a7725accdeb594e2c764c88b"
+checksum = "5aeb51aa3e9728575a053e1f43543cd9992ac2477e1b186ad824fd4adfb70842"
dependencies = [
- "bitflags 1.3.2",
"cairo-rs",
"field-offset",
"futures-channel",
@@ -1011,18 +1146,17 @@ dependencies = [
"gtk4-macros",
"gtk4-sys",
"libc",
- "once_cell",
"pango",
]
[[package]]
name = "gtk4-macros"
-version = "0.6.6"
+version = "0.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6a4d6b61570f76d3ee542d984da443b1cd69b6105264c61afec3abed08c2500f"
+checksum = "d57ec49cf9b657f69a05bca8027cff0a8dfd0c49e812be026fc7311f2163832f"
dependencies = [
"anyhow",
- "proc-macro-crate",
+ "proc-macro-crate 1.3.1",
"proc-macro-error",
"proc-macro2",
"quote",
@@ -1031,9 +1165,9 @@ dependencies = [
[[package]]
name = "gtk4-sys"
-version = "0.6.3"
+version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5f8283f707b07e019e76c7f2934bdd4180c277e08aa93f4c0d8dd07b7a34e22f"
+checksum = "54d8c4aa23638ce9faa2caf7e2a27d4a1295af2155c8e8d28c4d4eeca7a65eb8"
dependencies = [
"cairo-sys-rs",
"gdk-pixbuf-sys",
@@ -1048,29 +1182,11 @@ dependencies = [
"system-deps",
]
-[[package]]
-name = "gvdb"
-version = "0.4.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a7139233c0ecb66f285c47a3c1c02b35c8d52a42ca4c7448d0163e5637bb4bd3"
-dependencies = [
- "byteorder",
- "flate2",
- "lazy_static",
- "memmap2",
- "quick-xml",
- "safe-transmute",
- "serde",
- "serde_json",
- "walkdir",
- "zvariant",
-]
-
[[package]]
name = "h2"
-version = "0.3.21"
+version = "0.3.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833"
+checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9"
dependencies = [
"bytes",
"fnv",
@@ -1078,7 +1194,7 @@ dependencies = [
"futures-sink",
"futures-util",
"http",
- "indexmap 1.9.3",
+ "indexmap",
"slab",
"tokio",
"tokio-util",
@@ -1087,15 +1203,9 @@ dependencies = [
[[package]]
name = "hashbrown"
-version = "0.12.3"
+version = "0.14.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
-
-[[package]]
-name = "hashbrown"
-version = "0.14.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156"
+checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604"
[[package]]
name = "heck"
@@ -1105,9 +1215,9 @@ checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
[[package]]
name = "hermit-abi"
-version = "0.3.3"
+version = "0.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7"
+checksum = "5d3d0e0f38255e7fa3cf31335b3a56f05febd18025f4db5ef7a0cfb4f8da651f"
[[package]]
name = "hex"
@@ -1126,18 +1236,18 @@ dependencies = [
[[package]]
name = "home"
-version = "0.5.5"
+version = "0.5.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb"
+checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5"
dependencies = [
- "windows-sys",
+ "windows-sys 0.52.0",
]
[[package]]
name = "http"
-version = "0.2.10"
+version = "0.2.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f95b9abcae896730d42b78e09c155ed4ddf82c07b4de772c64aee5b2d8b7c150"
+checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb"
dependencies = [
"bytes",
"fnv",
@@ -1146,9 +1256,9 @@ dependencies = [
[[package]]
name = "http-body"
-version = "0.4.5"
+version = "0.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1"
+checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2"
dependencies = [
"bytes",
"http",
@@ -1175,9 +1285,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"
[[package]]
name = "hyper"
-version = "0.14.27"
+version = "0.14.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468"
+checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80"
dependencies = [
"bytes",
"futures-channel",
@@ -1190,7 +1300,7 @@ dependencies = [
"httpdate",
"itoa",
"pin-project-lite",
- "socket2 0.4.10",
+ "socket2 0.5.5",
"tokio",
"tower-service",
"tracing",
@@ -1212,24 +1322,14 @@ dependencies = [
[[package]]
name = "idna"
-version = "0.4.0"
+version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c"
+checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6"
dependencies = [
"unicode-bidi",
"unicode-normalization",
]
-[[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",
-]
-
[[package]]
name = "indexmap"
version = "2.1.0"
@@ -1237,7 +1337,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f"
dependencies = [
"equivalent",
- "hashbrown 0.14.2",
+ "hashbrown",
]
[[package]]
@@ -1249,28 +1349,53 @@ dependencies = [
"generic-array",
]
+[[package]]
+name = "ip_network"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "aa2f047c0a98b2f299aa5d6d7088443570faae494e9ae1305e48be000c9e0eb1"
+
+[[package]]
+name = "ip_network_table"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4099b7cfc5c5e2fe8c5edf3f6f7adf7a714c9cc697534f63a5a5da30397cb2c0"
+dependencies = [
+ "ip_network",
+ "ip_network_table-deps-treebitmap",
+]
+
+[[package]]
+name = "ip_network_table-deps-treebitmap"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8e537132deb99c0eb4b752f0346b6a836200eaaa3516dd7e5514b63930a09e5d"
+
[[package]]
name = "ipnet"
version = "2.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3"
+dependencies = [
+ "serde",
+]
[[package]]
name = "is-terminal"
-version = "0.4.9"
+version = "0.4.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b"
+checksum = "0bad00257d07be169d870ab665980b06cdb366d792ad690bf2e76876dc503455"
dependencies = [
"hermit-abi",
"rustix",
- "windows-sys",
+ "windows-sys 0.52.0",
]
[[package]]
name = "itoa"
-version = "1.0.9"
+version = "1.0.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38"
+checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c"
[[package]]
name = "jobserver"
@@ -1283,9 +1408,9 @@ dependencies = [
[[package]]
name = "js-sys"
-version = "0.3.65"
+version = "0.3.67"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "54c0c35952f67de54bb584e9fd912b3023117cbafc0a77d8f3dee1fb5f572fe8"
+checksum = "9a1d36f1235bc969acba30b7f5990b864423a6068a10f7c90ae8f0112e3a59d1"
dependencies = [
"wasm-bindgen",
]
@@ -1304,11 +1429,10 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
[[package]]
name = "libadwaita"
-version = "0.4.4"
+version = "0.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1ab9c0843f9f23ff25634df2743690c3a1faffe0a190e60c490878517eb81abf"
+checksum = "2fe7e70c06507ed10a16cda707f358fbe60fe0dc237498f78c686ade92fd979c"
dependencies = [
- "bitflags 1.3.2",
"gdk-pixbuf",
"gdk4",
"gio",
@@ -1321,9 +1445,9 @@ dependencies = [
[[package]]
name = "libadwaita-sys"
-version = "0.4.4"
+version = "0.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4231cb2499a9f0c4cdfa4885414b33e39901ddcac61150bc0bb4ff8a57ede404"
+checksum = "5e10aaa38de1d53374f90deeb4535209adc40cc5dba37f9704724169bceec69a"
dependencies = [
"gdk4-sys",
"gio-sys",
@@ -1337,9 +1461,9 @@ dependencies = [
[[package]]
name = "libc"
-version = "0.2.150"
+version = "0.2.152"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c"
+checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7"
[[package]]
name = "libloading"
@@ -1351,6 +1475,16 @@ dependencies = [
"winapi",
]
+[[package]]
+name = "libloading"
+version = "0.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c571b676ddfc9a8c12f1f3d3085a7b163966a8fd8098a90640953ce5f6170161"
+dependencies = [
+ "cfg-if",
+ "windows-sys 0.48.0",
+]
+
[[package]]
name = "libsystemd"
version = "0.6.0"
@@ -1371,9 +1505,22 @@ dependencies = [
[[package]]
name = "linux-raw-sys"
-version = "0.4.11"
+version = "0.4.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829"
+checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c"
+
+[[package]]
+name = "locale_config"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "08d2c35b16f4483f6c26f0e4e9550717a2f6575bcd6f12a53ff0c490a94a6934"
+dependencies = [
+ "lazy_static",
+ "objc",
+ "objc-foundation",
+ "regex",
+ "winapi",
+]
[[package]]
name = "lock_api"
@@ -1391,6 +1538,15 @@ version = "0.4.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f"
+[[package]]
+name = "malloc_buf"
+version = "0.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb"
+dependencies = [
+ "libc",
+]
+
[[package]]
name = "matchers"
version = "0.1.0"
@@ -1402,18 +1558,9 @@ dependencies = [
[[package]]
name = "memchr"
-version = "2.6.4"
+version = "2.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167"
-
-[[package]]
-name = "memmap2"
-version = "0.7.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f49388d20533534cd19360ad3d6a7dadc885944aa802ba3995040c5ec11288c6"
-dependencies = [
- "libc",
-]
+checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149"
[[package]]
name = "memoffset"
@@ -1453,7 +1600,7 @@ checksum = "49e7bc1560b95a3c4a25d03de42fe76ca718ab92d1a22a55b9b4cf67b3ae635c"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.39",
+ "syn 2.0.48",
]
[[package]]
@@ -1479,13 +1626,13 @@ dependencies = [
[[package]]
name = "mio"
-version = "0.8.9"
+version = "0.8.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3dce281c5e46beae905d4de1870d8b1509a9142b62eedf18b443b011ca8343d0"
+checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09"
dependencies = [
"libc",
"wasi",
- "windows-sys",
+ "windows-sys 0.48.0",
]
[[package]]
@@ -1559,27 +1706,62 @@ dependencies = [
]
[[package]]
-name = "object"
-version = "0.32.1"
+name = "objc"
+version = "0.2.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0"
+checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1"
+dependencies = [
+ "malloc_buf",
+]
+
+[[package]]
+name = "objc-foundation"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1add1b659e36c9607c7aab864a76c7a4c2760cd0cd2e120f3fb8b952c7e22bf9"
+dependencies = [
+ "block",
+ "objc",
+ "objc_id",
+]
+
+[[package]]
+name = "objc_id"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c92d4ddb4bd7b50d730c215ff871754d0da6b2178849f8a2a2ab69712d0c073b"
+dependencies = [
+ "objc",
+]
+
+[[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.18.0"
+version = "1.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d"
+checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92"
+
+[[package]]
+name = "opaque-debug"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5"
[[package]]
name = "openssl"
-version = "0.10.59"
+version = "0.10.63"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7a257ad03cd8fb16ad4172fedf8094451e1af1c4b70097636ef2eac9a5f0cc33"
+checksum = "15c9d69dd87a29568d4d017cfe8ec518706046a05184e5aea92d0af890b803c8"
dependencies = [
- "bitflags 2.4.1",
+ "bitflags 2.4.2",
"cfg-if",
"foreign-types",
"libc",
@@ -1596,7 +1778,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.39",
+ "syn 2.0.48",
]
[[package]]
@@ -1607,9 +1789,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
[[package]]
name = "openssl-sys"
-version = "0.9.95"
+version = "0.9.99"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "40a4130519a360279579c2053038317e40eff64d13fd3f004f9e1b72b8a6aaf9"
+checksum = "22e1bf214306098e4832460f797824c05d25aacdf896f64a985fb0fd992454ae"
dependencies = [
"cc",
"libc",
@@ -1625,11 +1807,10 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39"
[[package]]
name = "pango"
-version = "0.17.10"
+version = "0.18.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "35be456fc620e61f62dff7ff70fbd54dcbaf0a4b920c0f16de1107c47d921d48"
+checksum = "7ca27ec1eb0457ab26f3036ea52229edbdb74dee1edd29063f5b9b010e7ebee4"
dependencies = [
- "bitflags 1.3.2",
"gio",
"glib",
"libc",
@@ -1639,9 +1820,9 @@ dependencies = [
[[package]]
name = "pango-sys"
-version = "0.17.10"
+version = "0.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3da69f9f3850b0d8990d462f8c709561975e95f689c1cdf0fecdebde78b35195"
+checksum = "436737e391a843e5933d6d9aa102cb126d501e815b83601365a948a518555dc5"
dependencies = [
"glib-sys",
"gobject-sys",
@@ -1649,6 +1830,12 @@ dependencies = [
"system-deps",
]
+[[package]]
+name = "parking"
+version = "2.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae"
+
[[package]]
name = "parking_lot"
version = "0.12.1"
@@ -1669,7 +1856,7 @@ dependencies = [
"libc",
"redox_syscall",
"smallvec",
- "windows-targets",
+ "windows-targets 0.48.5",
]
[[package]]
@@ -1703,29 +1890,9 @@ checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099"
[[package]]
name = "percent-encoding"
-version = "2.3.0"
+version = "2.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94"
-
-[[package]]
-name = "pin-project"
-version = "1.1.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422"
-dependencies = [
- "pin-project-internal",
-]
-
-[[package]]
-name = "pin-project-internal"
-version = "1.1.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.39",
-]
+checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e"
[[package]]
name = "pin-project-lite"
@@ -1741,9 +1908,26 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
[[package]]
name = "pkg-config"
-version = "0.3.27"
+version = "0.3.29"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964"
+checksum = "2900ede94e305130c13ddd391e0ab7cbaeb783945ae07a279c268cb05109c6cb"
+
+[[package]]
+name = "platforms"
+version = "3.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "626dec3cac7cc0e1577a2ec3fc496277ec2baa084bebad95bb6fdbfae235f84c"
+
+[[package]]
+name = "poly1305"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf"
+dependencies = [
+ "cpufeatures",
+ "opaque-debug",
+ "universal-hash",
+]
[[package]]
name = "powerfmt"
@@ -1752,13 +1936,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"
[[package]]
-name = "prettyplease"
-version = "0.2.15"
+name = "ppv-lite86"
+version = "0.2.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d"
+checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"
+
+[[package]]
+name = "prettyplease"
+version = "0.2.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a41cf62165e97c7f814d2221421dbb9afcbcdb0a88068e5ea206e19951c2cbb5"
dependencies = [
"proc-macro2",
- "syn 2.0.39",
+ "syn 2.0.48",
]
[[package]]
@@ -1771,6 +1961,16 @@ dependencies = [
"toml_edit 0.19.15",
]
+[[package]]
+name = "proc-macro-crate"
+version = "2.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "97dc5fea232fc28d2f597b37c4876b348a40e33f3b02cc975c8d006d78d94b1a"
+dependencies = [
+ "toml_datetime",
+ "toml_edit 0.20.2",
+]
+
[[package]]
name = "proc-macro-error"
version = "1.0.4"
@@ -1797,30 +1997,41 @@ dependencies = [
[[package]]
name = "proc-macro2"
-version = "1.0.69"
+version = "1.0.78"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da"
+checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae"
dependencies = [
"unicode-ident",
]
[[package]]
-name = "quick-xml"
-version = "0.29.0"
+name = "quote"
+version = "1.0.35"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "81b9228215d82c7b61490fec1de287136b5de6f5700f6e58ea9ad61a7964ca51"
+checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef"
dependencies = [
- "memchr",
- "serde",
+ "proc-macro2",
]
[[package]]
-name = "quote"
-version = "1.0.33"
+name = "rand"
+version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae"
+checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
dependencies = [
- "proc-macro2",
+ "libc",
+ "rand_chacha",
+ "rand_core",
+]
+
+[[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",
]
[[package]]
@@ -1828,6 +2039,9 @@ name = "rand_core"
version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
+dependencies = [
+ "getrandom",
+]
[[package]]
name = "redox_syscall"
@@ -1840,13 +2054,13 @@ dependencies = [
[[package]]
name = "regex"
-version = "1.10.2"
+version = "1.10.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343"
+checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15"
dependencies = [
"aho-corasick",
"memchr",
- "regex-automata 0.4.3",
+ "regex-automata 0.4.4",
"regex-syntax 0.8.2",
]
@@ -1861,9 +2075,9 @@ dependencies = [
[[package]]
name = "regex-automata"
-version = "0.4.3"
+version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f"
+checksum = "3b7fa1134405e2ec9353fd416b17f8dacd46c473d7d3fd1cf202706a14eb792a"
dependencies = [
"aho-corasick",
"memchr",
@@ -1884,9 +2098,8 @@ checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f"
[[package]]
name = "relm4"
-version = "0.6.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0c16f3fad883034773b7f5af4d7e865532b8f3641e5a8bab2a34561a8d960d81"
+version = "0.7.0-beta.2"
+source = "git+https://github.com/Relm4/Relm4#e189eee06b887470e0fd65cbaf6d7c0161bed5ea"
dependencies = [
"async-trait",
"flume",
@@ -1900,43 +2113,21 @@ dependencies = [
"tracing",
]
-[[package]]
-name = "relm4-components"
-version = "0.6.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5485d72dc94c12a59c571d80cf9a545e5b9a2f0ebc90ea5fd234929a9376f66d"
-dependencies = [
- "once_cell",
- "relm4",
- "tracker",
-]
-
-[[package]]
-name = "relm4-icons"
-version = "0.6.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6e28bcc718a587bcfa31b034e0b8f4efe5b70e945b7de9d7d154b45357a0dadc"
-dependencies = [
- "gtk4",
- "gvdb",
-]
-
[[package]]
name = "relm4-macros"
-version = "0.6.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9340e2553c0a184a80a0bfa1dcf73c47f3d48933aa6be90724b202f9fbd24735"
+version = "0.7.0-beta.2"
+source = "git+https://github.com/Relm4/Relm4#e189eee06b887470e0fd65cbaf6d7c0161bed5ea"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.39",
+ "syn 2.0.48",
]
[[package]]
name = "reqwest"
-version = "0.11.22"
+version = "0.11.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "046cd98826c46c2ac8ddecae268eb5c2e58628688a5fc7a2643704a73faba95b"
+checksum = "37b1ae8d9ac08420c66222fb9096fc5de435c3c48542bc5336c51892cffafb41"
dependencies = [
"base64",
"bytes",
@@ -1970,6 +2161,20 @@ dependencies = [
"winreg",
]
+[[package]]
+name = "ring"
+version = "0.17.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74"
+dependencies = [
+ "cc",
+ "getrandom",
+ "libc",
+ "spin",
+ "untrusted",
+ "windows-sys 0.48.0",
+]
+
[[package]]
name = "rustc-demangle"
version = "0.1.23"
@@ -1993,52 +2198,37 @@ dependencies = [
[[package]]
name = "rustix"
-version = "0.38.21"
+version = "0.38.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2b426b0506e5d50a7d8dafcf2e81471400deb602392c7dd110815afb4eaf02a3"
+checksum = "322394588aaf33c24007e8bb3238ee3e4c5c09c084ab32bc73890b99ff326bca"
dependencies = [
- "bitflags 2.4.1",
+ "bitflags 2.4.2",
"errno",
"libc",
"linux-raw-sys",
- "windows-sys",
+ "windows-sys 0.52.0",
]
[[package]]
name = "ryu"
-version = "1.0.15"
+version = "1.0.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741"
-
-[[package]]
-name = "safe-transmute"
-version = "0.11.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "98a01dab6acf992653be49205bdd549f32f17cb2803e8eacf1560bf97259aae8"
-
-[[package]]
-name = "same-file"
-version = "1.0.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
-dependencies = [
- "winapi-util",
-]
+checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c"
[[package]]
name = "schannel"
-version = "0.1.22"
+version = "0.1.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88"
+checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534"
dependencies = [
- "windows-sys",
+ "windows-sys 0.52.0",
]
[[package]]
name = "schemars"
-version = "0.8.15"
+version = "0.8.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1f7b0ce13155372a76ee2e1c5ffba1fe61ede73fbea5630d61eee6fac4929c0c"
+checksum = "45a28f4c49489add4ce10783f7911893516f15afe45d015608d41faca6bc4d29"
dependencies = [
"dyn-clone",
"schemars_derive",
@@ -2048,9 +2238,9 @@ dependencies = [
[[package]]
name = "schemars_derive"
-version = "0.8.15"
+version = "0.8.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e85e2a16b12bdb763244c69ab79363d71db2b4b918a2def53f80b02e0574b13c"
+checksum = "c767fd6fa65d9ccf9cf026122c1b555f2ef9a4f0cea69da4d7dbc3e258d30967"
dependencies = [
"proc-macro2",
"quote",
@@ -2089,28 +2279,28 @@ dependencies = [
[[package]]
name = "semver"
-version = "1.0.20"
+version = "1.0.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090"
+checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0"
[[package]]
name = "serde"
-version = "1.0.192"
+version = "1.0.195"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bca2a08484b285dcb282d0f67b26cadc0df8b19f8c12502c13d966bf9482f001"
+checksum = "63261df402c67811e9ac6def069e4786148c4563f4b50fd4bf30aa370d626b02"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
-version = "1.0.192"
+version = "1.0.195"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d6c7207fbec9faa48073f3e3074cbe553af6ea512d7c21ba46e434e70ea9fbc1"
+checksum = "46fe8f8603d81ba86327b23a2e9cdf49e1255fb94a4c5f297f6ee0547178ea2c"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.39",
+ "syn 2.0.48",
]
[[package]]
@@ -2126,9 +2316,9 @@ dependencies = [
[[package]]
name = "serde_json"
-version = "1.0.108"
+version = "1.0.111"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b"
+checksum = "176e46fa42316f18edd598015a5166857fc835ec732f5215eac6b7bdbf0a84f4"
dependencies = [
"itoa",
"ryu",
@@ -2137,9 +2327,9 @@ dependencies = [
[[package]]
name = "serde_spanned"
-version = "0.6.4"
+version = "0.6.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "12022b835073e5b11e90a14f86838ceb1c8fb0325b72416845c487ac0fa95e80"
+checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1"
dependencies = [
"serde",
]
@@ -2200,9 +2390,9 @@ dependencies = [
[[package]]
name = "shlex"
-version = "1.2.0"
+version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a7cee0529a6d40f580e7a5e6c495c8fbfe21b7b52795ed4bb5e62cdf92bc6380"
+checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
[[package]]
name = "slab"
@@ -2215,9 +2405,9 @@ dependencies = [
[[package]]
name = "smallvec"
-version = "1.11.2"
+version = "1.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970"
+checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7"
[[package]]
name = "socket2"
@@ -2236,7 +2426,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9"
dependencies = [
"libc",
- "windows-sys",
+ "windows-sys 0.48.0",
]
[[package]]
@@ -2264,12 +2454,6 @@ dependencies = [
"xxhash-rust",
]
-[[package]]
-name = "static_assertions"
-version = "1.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
-
[[package]]
name = "strsim"
version = "0.10.0"
@@ -2295,9 +2479,9 @@ dependencies = [
[[package]]
name = "syn"
-version = "2.0.39"
+version = "2.0.48"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a"
+checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f"
dependencies = [
"proc-macro2",
"quote",
@@ -2340,50 +2524,56 @@ dependencies = [
[[package]]
name = "target-lexicon"
-version = "0.12.12"
+version = "0.12.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "14c39fd04924ca3a864207c66fc2cd7d22d7c016007f9ce846cbb9326331930a"
+checksum = "69758bda2e78f098e4ccb393021a0963bb3442eac05f135c30f61b7370bbafae"
+
+[[package]]
+name = "temp-dir"
+version = "0.1.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dd16aa9ffe15fe021c6ee3766772132c6e98dfa395a167e16864f61a9cfb71d6"
[[package]]
name = "tempfile"
-version = "3.8.1"
+version = "3.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5"
+checksum = "01ce4141aa927a6d1bd34a041795abd0db1cccba5d5f24b009f694bdf3a1f3fa"
dependencies = [
"cfg-if",
"fastrand",
"redox_syscall",
"rustix",
- "windows-sys",
+ "windows-sys 0.52.0",
]
[[package]]
name = "termcolor"
-version = "1.3.0"
+version = "1.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6093bad37da69aab9d123a8091e4be0aa4a03e4d601ec641c327398315f62b64"
+checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755"
dependencies = [
"winapi-util",
]
[[package]]
name = "thiserror"
-version = "1.0.50"
+version = "1.0.56"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2"
+checksum = "d54378c645627613241d077a3a79db965db602882668f9136ac42af9ecb730ad"
dependencies = [
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
-version = "1.0.50"
+version = "1.0.56"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8"
+checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.39",
+ "syn 2.0.48",
]
[[package]]
@@ -2398,9 +2588,9 @@ dependencies = [
[[package]]
name = "time"
-version = "0.3.30"
+version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5"
+checksum = "f657ba42c3f86e7680e53c8cd3af8abbe56b5491790b46e22e19c0d57463583e"
dependencies = [
"deranged",
"powerfmt",
@@ -2431,9 +2621,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
[[package]]
name = "tokio"
-version = "1.34.0"
+version = "1.35.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d0c014766411e834f7af5b8f4cf46257aab4036ca95e9d2c144a10f59ad6f5b9"
+checksum = "c89b4efa943be685f629b149f53829423f8f5531ea21249408e8e2f8671ec104"
dependencies = [
"backtrace",
"bytes",
@@ -2443,7 +2633,7 @@ dependencies = [
"pin-project-lite",
"socket2 0.5.5",
"tokio-macros",
- "windows-sys",
+ "windows-sys 0.48.0",
]
[[package]]
@@ -2454,7 +2644,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.39",
+ "syn 2.0.48",
]
[[package]]
@@ -2483,21 +2673,21 @@ dependencies = [
[[package]]
name = "toml"
-version = "0.8.8"
+version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a1a195ec8c9da26928f773888e0742ca3ca1040c6cd859c919c9f59c1954ab35"
+checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d"
dependencies = [
"serde",
"serde_spanned",
"toml_datetime",
- "toml_edit 0.21.0",
+ "toml_edit 0.20.2",
]
[[package]]
name = "toml_datetime"
-version = "0.6.5"
+version = "0.6.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1"
+checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b"
dependencies = [
"serde",
]
@@ -2508,18 +2698,18 @@ version = "0.19.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421"
dependencies = [
- "indexmap 2.1.0",
+ "indexmap",
"toml_datetime",
"winnow",
]
[[package]]
name = "toml_edit"
-version = "0.21.0"
+version = "0.20.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03"
+checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338"
dependencies = [
- "indexmap 2.1.0",
+ "indexmap",
"serde",
"serde_spanned",
"toml_datetime",
@@ -2551,7 +2741,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.39",
+ "syn 2.0.48",
]
[[package]]
@@ -2586,6 +2776,17 @@ dependencies = [
"tracing-core",
]
+[[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-oslog"
version = "0.1.2"
@@ -2603,9 +2804,9 @@ dependencies = [
[[package]]
name = "tracing-subscriber"
-version = "0.3.17"
+version = "0.3.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "30a651bc37f915e81f087d86e62a18eec5f79550c7faff886f7090b4ea757c77"
+checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b"
dependencies = [
"matchers",
"nu-ansi-term",
@@ -2616,34 +2817,14 @@ dependencies = [
"thread_local",
"tracing",
"tracing-core",
- "tracing-log",
-]
-
-[[package]]
-name = "tracker"
-version = "0.2.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ff9636d15e370187f6bf55b79ce62ebf4221998bc0ba1774d7fa208b007f6bf8"
-dependencies = [
- "tracker-macros",
-]
-
-[[package]]
-name = "tracker-macros"
-version = "0.2.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ca029746fbe0efda3298205de77bf759d7fef23ac97902641e0b49a623b0455f"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.39",
+ "tracing-log 0.2.0",
]
[[package]]
name = "try-lock"
-version = "0.2.4"
+version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed"
+checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"
[[package]]
name = "tun"
@@ -2656,7 +2837,7 @@ dependencies = [
"futures",
"lazy_static",
"libc",
- "libloading",
+ "libloading 0.7.4",
"log",
"nix",
"reqwest",
@@ -2680,9 +2861,9 @@ checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"
[[package]]
name = "unicode-bidi"
-version = "0.3.13"
+version = "0.3.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460"
+checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75"
[[package]]
name = "unicode-ident"
@@ -2706,10 +2887,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85"
[[package]]
-name = "url"
-version = "2.4.1"
+name = "universal-hash"
+version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5"
+checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea"
+dependencies = [
+ "crypto-common",
+ "subtle",
+]
+
+[[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",
@@ -2724,10 +2921,11 @@ checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a"
[[package]]
name = "uuid"
-version = "1.5.0"
+version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "88ad59a7560b41a70d191093a945f0b87bc1deeda46fb237479708a1d6b6cdfc"
+checksum = "f00cc9702ca12d3c81455259621e676d0f7251cec66a21e98fe2e9a37db93b2a"
dependencies = [
+ "getrandom",
"serde",
]
@@ -2755,16 +2953,6 @@ version = "0.9.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
-[[package]]
-name = "walkdir"
-version = "2.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee"
-dependencies = [
- "same-file",
- "winapi-util",
-]
-
[[package]]
name = "want"
version = "0.3.1"
@@ -2782,9 +2970,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
[[package]]
name = "wasm-bindgen"
-version = "0.2.88"
+version = "0.2.90"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7daec296f25a1bae309c0cd5c29c4b260e510e6d813c286b19eaadf409d40fce"
+checksum = "b1223296a201415c7fad14792dbefaace9bd52b62d33453ade1c5b5f07555406"
dependencies = [
"cfg-if",
"wasm-bindgen-macro",
@@ -2792,24 +2980,24 @@ dependencies = [
[[package]]
name = "wasm-bindgen-backend"
-version = "0.2.88"
+version = "0.2.90"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e397f4664c0e4e428e8313a469aaa58310d302159845980fd23b0f22a847f217"
+checksum = "fcdc935b63408d58a32f8cc9738a0bffd8f05cc7c002086c6ef20b7312ad9dcd"
dependencies = [
"bumpalo",
"log",
"once_cell",
"proc-macro2",
"quote",
- "syn 2.0.39",
+ "syn 2.0.48",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-futures"
-version = "0.4.38"
+version = "0.4.40"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9afec9963e3d0994cac82455b2b3502b81a7f40f9a0d32181f7528d9f4b43e02"
+checksum = "bde2032aeb86bdfaecc8b261eef3cba735cc426c1f3a3416d1e0791be95fc461"
dependencies = [
"cfg-if",
"js-sys",
@@ -2819,9 +3007,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro"
-version = "0.2.88"
+version = "0.2.90"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5961017b3b08ad5f3fe39f1e79877f8ee7c23c5e5fd5eb80de95abc41f1f16b2"
+checksum = "3e4c238561b2d428924c49815533a8b9121c664599558a5d9ec51f8a1740a999"
dependencies = [
"quote",
"wasm-bindgen-macro-support",
@@ -2829,28 +3017,28 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro-support"
-version = "0.2.88"
+version = "0.2.90"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c5353b8dab669f5e10f5bd76df26a9360c748f054f862ff5f3f8aae0c7fb3907"
+checksum = "bae1abb6806dc1ad9e560ed242107c0f6c84335f1749dd4e8ddb012ebd5e25a7"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.39",
+ "syn 2.0.48",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-shared"
-version = "0.2.88"
+version = "0.2.90"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0d046c5d029ba91a1ed14da14dca44b68bf2f124cfbaf741c54151fdb3e0750b"
+checksum = "4d91413b1c31d7539ba5ef2451af3f0b833a005eb27a631cec32bc0635a8602b"
[[package]]
name = "web-sys"
-version = "0.3.65"
+version = "0.3.67"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5db499c5f66323272151db0e666cd34f78617522fb0c1604d31a27c50c206a85"
+checksum = "58cd2333b6e0be7a39605f0e255892fd7418a682d8da8fe042fe25128794d2ed"
dependencies = [
"js-sys",
"wasm-bindgen",
@@ -2911,7 +3099,7 @@ version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f"
dependencies = [
- "windows-targets",
+ "windows-targets 0.48.5",
]
[[package]]
@@ -2920,7 +3108,16 @@ version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
dependencies = [
- "windows-targets",
+ "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]]
@@ -2929,13 +3126,28 @@ version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c"
dependencies = [
- "windows_aarch64_gnullvm",
- "windows_aarch64_msvc",
- "windows_i686_gnu",
- "windows_i686_msvc",
- "windows_x86_64_gnu",
- "windows_x86_64_gnullvm",
- "windows_x86_64_msvc",
+ "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]]
@@ -2944,36 +3156,72 @@ 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"
@@ -2981,10 +3229,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"
[[package]]
-name = "winnow"
-version = "0.5.19"
+name = "windows_x86_64_msvc"
+version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "829846f3e3db426d4cee4510841b71a8e58aa2a76b1132579487ae430ccd9c7b"
+checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04"
+
+[[package]]
+name = "winnow"
+version = "0.5.34"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b7cf47b659b318dccbd69cc4797a39ae128f533dce7902a1096044d1967b9c16"
dependencies = [
"memchr",
]
@@ -2996,14 +3250,46 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1"
dependencies = [
"cfg-if",
- "windows-sys",
+ "windows-sys 0.48.0",
+]
+
+[[package]]
+name = "x25519-dalek"
+version = "2.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fb66477291e7e8d2b0ff1bcb900bf29489a9692816d79874bea351e7a8b6de96"
+dependencies = [
+ "curve25519-dalek",
+ "rand_core",
+ "serde",
+ "zeroize",
]
[[package]]
name = "xxhash-rust"
-version = "0.8.7"
+version = "0.8.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9828b178da53440fa9c766a3d2f73f7cf5d0ac1fe3980c1e5018d899fd19e07b"
+checksum = "53be06678ed9e83edb1745eb72efc0bbcd7b5c3c35711a860906aed827a13d61"
+
+[[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",
+]
[[package]]
name = "zip"
@@ -3053,40 +3339,3 @@ dependencies = [
"cc",
"pkg-config",
]
-
-[[package]]
-name = "zvariant"
-version = "3.15.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "44b291bee0d960c53170780af148dca5fa260a63cdd24f1962fa82e03e53338c"
-dependencies = [
- "byteorder",
- "libc",
- "serde",
- "static_assertions",
- "zvariant_derive",
-]
-
-[[package]]
-name = "zvariant_derive"
-version = "3.15.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "934d7a7dfc310d6ee06c87ffe88ef4eca7d3e37bb251dece2ef93da8f17d8ecd"
-dependencies = [
- "proc-macro-crate",
- "proc-macro2",
- "quote",
- "syn 1.0.109",
- "zvariant_utils",
-]
-
-[[package]]
-name = "zvariant_utils"
-version = "1.0.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7234f0d811589db492d16893e3f21e8e2fd282e6d01b0cddee310322062cc200"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 1.0.109",
-]
diff --git a/burrow-gtk/Cargo.toml b/burrow-gtk/Cargo.toml
index 4763320..244c161 100644
--- a/burrow-gtk/Cargo.toml
+++ b/burrow-gtk/Cargo.toml
@@ -6,7 +6,12 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
-relm4 = { version = "0.6.2", features = ["libadwaita"] }
-relm4-components = "0.6.2"
-relm4-icons = { version = "0.6.0", features = ["plus"] }
+anyhow = "1.0"
+relm4 = { features = ["libadwaita", "gnome_45"], git = "https://github.com/Relm4/Relm4" }
burrow = { version = "*", path = "../burrow/" }
+tokio = { version = "1.35.0", features = ["time", "sync"] }
+gettext-rs = { version = "0.7.0", features = ["gettext-system"] }
+
+[build-dependencies]
+anyhow = "1.0"
+glib-build-tools = "0.18.0"
diff --git a/burrow-gtk/com.hackclub.burrow.devel.json b/burrow-gtk/build-aux/com.hackclub.burrow.devel.json
similarity index 84%
rename from burrow-gtk/com.hackclub.burrow.devel.json
rename to burrow-gtk/build-aux/com.hackclub.burrow.devel.json
index 8b32b02..4a2e5fc 100644
--- a/burrow-gtk/com.hackclub.burrow.devel.json
+++ b/burrow-gtk/build-aux/com.hackclub.burrow.devel.json
@@ -40,15 +40,12 @@
"name" : "burrow-gtk",
"builddir" : true,
"subdir" : "burrow-gtk",
- "buildsystem" : "simple",
- "build-commands": [
- "cargo build",
- "install -Dm755 -t /app/bin target/debug/burrow-gtk"
- ],
+ "buildsystem" : "meson",
+ "config-opts": ["--buildtype=debug"],
"sources" : [
{
"type": "dir",
- "path": "../"
+ "path": "../../"
}
]
}
diff --git a/burrow-gtk/com.hackclub.burrow.json b/burrow-gtk/build-aux/com.hackclub.burrow.json
similarity index 83%
rename from burrow-gtk/com.hackclub.burrow.json
rename to burrow-gtk/build-aux/com.hackclub.burrow.json
index 831a236..c8b68e5 100644
--- a/burrow-gtk/com.hackclub.burrow.json
+++ b/burrow-gtk/build-aux/com.hackclub.burrow.json
@@ -40,15 +40,12 @@
"name" : "burrow-gtk",
"builddir" : true,
"subdir" : "burrow-gtk",
- "buildsystem" : "simple",
- "build-commands": [
- "cargo build --release",
- "install -Dm755 -t /app/bin target/release/burrow-gtk"
- ],
+ "buildsystem" : "meson",
+ "config-opts": ["--buildtype=release"],
"sources" : [
{
"type": "dir",
- "path": "../"
+ "path": "../../"
}
]
}
diff --git a/burrow-gtk/build.rs b/burrow-gtk/build.rs
new file mode 100644
index 0000000..4db0175
--- /dev/null
+++ b/burrow-gtk/build.rs
@@ -0,0 +1,16 @@
+use anyhow::Result;
+
+fn main() -> Result<()> {
+ compile_gresources()?;
+
+ Ok(())
+}
+
+fn compile_gresources() -> Result<()> {
+ glib_build_tools::compile_resources(
+ &["data"],
+ "data/resources.gresource.xml",
+ "compiled.gresource",
+ );
+ Ok(())
+}
diff --git a/burrow-gtk/data/com.hackclub.burrow.desktop.in b/burrow-gtk/data/app.desktop.in.in
similarity index 60%
rename from burrow-gtk/data/com.hackclub.burrow.desktop.in
rename to burrow-gtk/data/app.desktop.in.in
index 91c463d..33b9c5b 100644
--- a/burrow-gtk/data/com.hackclub.burrow.desktop.in
+++ b/burrow-gtk/data/app.desktop.in.in
@@ -1,7 +1,7 @@
[Desktop Entry]
-Name=Burrow
-Exec=burrow-gtk
-Icon=com.hackclub.burrow
+Name=@APP_NAME_CAPITALIZED@
+Exec=@APP_NAME@
+Icon=@APP_ID@
Terminal=false
Type=Application
Categories=GTK;Network
diff --git a/burrow-gtk/data/app.gschema.xml.in b/burrow-gtk/data/app.gschema.xml.in
new file mode 100644
index 0000000..0541c6f
--- /dev/null
+++ b/burrow-gtk/data/app.gschema.xml.in
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/burrow-gtk/data/app.metainfo.xml.in b/burrow-gtk/data/app.metainfo.xml.in
new file mode 100644
index 0000000..8cc2e59
--- /dev/null
+++ b/burrow-gtk/data/app.metainfo.xml.in
@@ -0,0 +1,16 @@
+
+
+ @APP_ID@
+ CC0
+ GPL-3.0-or-later
+ @APP_NAME_CAPITALIZED@
+ @APP_ID@.desktop
+
+
+ No description
+
+
+
+ No Summary
+
+
diff --git a/burrow-gtk/data/com.hackclub.burrow.appdata.xml.in b/burrow-gtk/data/com.hackclub.burrow.appdata.xml.in
deleted file mode 100644
index 7f8e86b..0000000
--- a/burrow-gtk/data/com.hackclub.burrow.appdata.xml.in
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
- com.hackclub.burrow.desktop
- GPL-3.0-or-later
-
- No description
-
-
diff --git a/burrow-gtk/data/com.hackclub.burrow.gschema.xml b/burrow-gtk/data/com.hackclub.burrow.gschema.xml
deleted file mode 100644
index d1bceef..0000000
--- a/burrow-gtk/data/com.hackclub.burrow.gschema.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
diff --git a/burrow-gtk/data/icons/hicolor/scalable/apps/com.hackclub.burrow.svg b/burrow-gtk/data/icons/hicolor/scalable/apps/burrow-gtk.svg
similarity index 100%
rename from burrow-gtk/data/icons/hicolor/scalable/apps/com.hackclub.burrow.svg
rename to burrow-gtk/data/icons/hicolor/scalable/apps/burrow-gtk.svg
diff --git a/burrow-gtk/data/icons/hicolor/symbolic/apps/com.hackclub.burrow-symbolic.svg b/burrow-gtk/data/icons/hicolor/symbolic/apps/burrow-gtk-symbolic.svg
similarity index 97%
rename from burrow-gtk/data/icons/hicolor/symbolic/apps/com.hackclub.burrow-symbolic.svg
rename to burrow-gtk/data/icons/hicolor/symbolic/apps/burrow-gtk-symbolic.svg
index 0444828..5352e0a 100644
--- a/burrow-gtk/data/icons/hicolor/symbolic/apps/com.hackclub.burrow-symbolic.svg
+++ b/burrow-gtk/data/icons/hicolor/symbolic/apps/burrow-gtk-symbolic.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
diff --git a/burrow-gtk/data/icons/meson.build b/burrow-gtk/data/icons/meson.build
deleted file mode 100644
index 86f6480..0000000
--- a/burrow-gtk/data/icons/meson.build
+++ /dev/null
@@ -1,13 +0,0 @@
-application_id = 'com.hackclub.burrow'
-
-scalable_dir = join_paths('hicolor', 'scalable', 'apps')
-install_data(
- join_paths(scalable_dir, ('@0@.svg').format(application_id)),
- install_dir: join_paths(get_option('datadir'), 'icons', scalable_dir)
-)
-
-symbolic_dir = join_paths('hicolor', 'symbolic', 'apps')
-install_data(
- join_paths(symbolic_dir, ('@0@-symbolic.svg').format(application_id)),
- install_dir: join_paths(get_option('datadir'), 'icons', symbolic_dir)
-)
diff --git a/burrow-gtk/data/meson.build b/burrow-gtk/data/meson.build
index fadf18f..2c3ffd8 100644
--- a/burrow-gtk/data/meson.build
+++ b/burrow-gtk/data/meson.build
@@ -1,39 +1,90 @@
+# app.desktop.in.in
+desktop_conf = configuration_data()
+desktop_conf.set('APP_ID', app_id)
+desktop_conf.set('APP_NAME', app_name)
+desktop_conf.set('APP_NAME_CAPITALIZED', app_name_capitalized)
+
+desktop_file_in = configure_file(
+ input: 'app.desktop.in.in',
+ output: '@BASENAME@',
+ configuration: desktop_conf,
+)
+
desktop_file = i18n.merge_file(
- input: 'com.hackclub.burrow.desktop.in',
- output: 'com.hackclub.burrow.desktop',
- type: 'desktop',
- po_dir: '../po',
- install: true,
- install_dir: join_paths(get_option('datadir'), 'applications')
+ input: desktop_file_in,
+ output: app_id + '.desktop',
+ type: 'desktop',
+ po_dir: '../po',
+ install: true,
+ install_dir: datadir / 'applications',
)
-desktop_utils = find_program('desktop-file-validate', required: false)
-if desktop_utils.found()
- test('Validate desktop file', desktop_utils, args: [desktop_file])
+if desktop_file_validate.found()
+ test(
+ 'validate-desktop',
+ desktop_file_validate,
+ args: [desktop_file],
+ )
endif
-appstream_file = i18n.merge_file(
- input: 'com.hackclub.burrow.appdata.xml.in',
- output: 'com.hackclub.burrow.appdata.xml',
- po_dir: '../po',
- install: true,
- install_dir: join_paths(get_option('datadir'), 'appdata')
+# app.gschema.xml.in
+gschema_conf = configuration_data()
+gschema_conf.set('APP_ID', app_id)
+gschema_conf.set('APP_NAME', app_name)
+gschema_conf.set('APP_IDPATH', app_idpath)
+gschema_file = configure_file(
+ input: 'app.gschema.xml.in',
+ output: app_id + '.gschema.xml',
+ configuration: gschema_conf,
+ install: true,
+ install_dir: datadir / 'glib-2.0' / 'schemas',
+)
+
+if glib_compile_schemas.found()
+ test(
+ 'validate-gschema',
+ glib_compile_schemas,
+ args: [
+ '--dry-run',
+ datadir / 'glib-2.0' / 'schemas',
+ ],
+ )
+endif
+
+# app.metainfo.xml.in
+appdata_conf = configuration_data()
+appdata_conf.set('APP_ID', app_id)
+appdata_conf.set('APP_NAME', app_name)
+appdata_conf.set('APP_NAME_CAPITALIZED', app_name_capitalized)
+appdata_file_in = configure_file(
+ input: 'app.metainfo.xml.in',
+ output: '@BASENAME@',
+ configuration: appdata_conf,
+)
+appdata_file = i18n.merge_file(
+ input: appdata_file_in,
+ output: app_id + '.metainfo.xml',
+ po_dir: '../po',
+ install: true,
+ install_dir: datadir / 'metainfo',
)
-appstream_util = find_program('appstream-util', required: false)
if appstream_util.found()
- test('Validate appstream file', appstream_util, args: ['validate', appstream_file])
+ test(
+ 'validate-appdata',
+ appstream_util,
+ args: ['validate', '--nonet', appdata_file],
+ )
endif
-install_data('com.hackclub.burrow.gschema.xml',
- install_dir: join_paths(get_option('datadir'), 'glib-2.0/schemas')
+install_data(
+ 'icons/hicolor/scalable/apps/' + app_name + '.svg',
+ install_dir: datadir / 'icons' / 'hicolor' / 'scalable' / 'apps',
+ rename: app_id + '.svg',
)
-compile_schemas = find_program('glib-compile-schemas', required: false)
-if compile_schemas.found()
- test('Validate schema file',
- compile_schemas,
- args: ['--strict', '--dry-run', meson.current_source_dir()])
-endif
-
-subdir('icons')
+install_data(
+ 'icons/hicolor/symbolic/apps/' + app_name + '-symbolic.svg',
+ install_dir: datadir / 'icons' / 'hicolor' / 'symbolic' / 'apps',
+ rename: app_id + '-symbolic.svg',
+)
diff --git a/burrow-gtk/data/resources.gresource.xml b/burrow-gtk/data/resources.gresource.xml
new file mode 100644
index 0000000..969e77c
--- /dev/null
+++ b/burrow-gtk/data/resources.gresource.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/burrow-gtk/meson.build b/burrow-gtk/meson.build
new file mode 100644
index 0000000..70d8403
--- /dev/null
+++ b/burrow-gtk/meson.build
@@ -0,0 +1,56 @@
+project(
+ 'burrow-gtk',
+ ['rust'],
+ version: '0.0.1',
+ meson_version: '>= 1.0',
+)
+
+# Find Cargo
+cargo_bin = find_program('cargo')
+cargo_env = ['CARGO_HOME=' + meson.project_build_root()]
+cargo_opt = ['--manifest-path', meson.project_source_root() / 'Cargo.toml']
+cargo_opt += ['--target-dir', meson.project_build_root() / 'target']
+
+# Config
+prefix = get_option('prefix')
+datadir = prefix / get_option('datadir')
+localedir = prefix / get_option('localedir')
+
+app_name = 'burrow-gtk'
+app_name_capitalized = 'Burrow'
+base_id = 'com.hackclub.burrow'
+app_idpath = '/com/hackclub/' + app_name + '/'
+if get_option('buildtype') == 'release'
+ cargo_opt += ['--release']
+ rust_target = 'release'
+ app_id = base_id
+else
+ rust_target = 'debug'
+ app_id = base_id + '-' + 'devel'
+endif
+
+# Imports
+i18n = import('i18n')
+gnome = import('gnome')
+
+# External Dependencies
+dependency('gtk4', version: '>= 4.12')
+dependency('libadwaita-1', version: '>= 1.4')
+
+glib_compile_resources = find_program('glib-compile-resources', required: true)
+glib_compile_schemas = find_program('glib-compile-schemas', required: true)
+desktop_file_validate = find_program('desktop-file-validate', required: false)
+appstream_util = find_program('appstream-util', required: false)
+fc_cache = find_program('fc-cache', required: false)
+
+# Our Sources
+subdir('po')
+subdir('data')
+subdir('src')
+
+# Gnome Post Install
+gnome.post_install(
+ glib_compile_schemas: true,
+ gtk_update_icon_cache: true,
+ update_desktop_database: true,
+)
diff --git a/burrow-gtk/po/POTFILES b/burrow-gtk/po/POTFILES
index d1acb5a..08b570f 100644
--- a/burrow-gtk/po/POTFILES
+++ b/burrow-gtk/po/POTFILES
@@ -1,4 +1 @@
-data/com.hackclub.Burrow.desktop.in
-data/com.hackclub.Burrow.appdata.xml.in
-data/com.hackclub.Burrow.gschema.xml
-src/window.ui
+data/app.desktop.in.in
diff --git a/burrow-gtk/po/meson.build b/burrow-gtk/po/meson.build
index 4b239a8..597577b 100644
--- a/burrow-gtk/po/meson.build
+++ b/burrow-gtk/po/meson.build
@@ -1 +1 @@
-i18n.gettext('burrow-gtk', preset: 'glib')
+i18n.gettext(app_name, preset: 'glib')
diff --git a/burrow-gtk/src/.gitignore b/burrow-gtk/src/.gitignore
new file mode 100644
index 0000000..c6bb786
--- /dev/null
+++ b/burrow-gtk/src/.gitignore
@@ -0,0 +1 @@
+config.rs
diff --git a/burrow-gtk/src/components/app.rs b/burrow-gtk/src/components/app.rs
new file mode 100644
index 0000000..b42b718
--- /dev/null
+++ b/burrow-gtk/src/components/app.rs
@@ -0,0 +1,136 @@
+use super::*;
+use anyhow::Context;
+use std::time::Duration;
+
+const RECONNECT_POLL_TIME: Duration = Duration::from_secs(5);
+
+pub struct App {
+ daemon_client: Arc>>,
+ _settings_screen: Controller,
+ switch_screen: AsyncController,
+}
+
+#[derive(Debug)]
+pub enum AppMsg {
+ None,
+ PostInit,
+}
+
+impl App {
+ pub fn run() {
+ let app = RelmApp::new(config::ID);
+ Self::setup_gresources().unwrap();
+ Self::setup_i18n().unwrap();
+
+ app.run_async::(());
+ }
+
+ fn setup_i18n() -> Result<()> {
+ gettextrs::setlocale(gettextrs::LocaleCategory::LcAll, "");
+ gettextrs::bindtextdomain(config::GETTEXT_PACKAGE, config::LOCALEDIR)?;
+ gettextrs::bind_textdomain_codeset(config::GETTEXT_PACKAGE, "UTF-8")?;
+ gettextrs::textdomain(config::GETTEXT_PACKAGE)?;
+ Ok(())
+ }
+
+ fn setup_gresources() -> Result<()> {
+ gtk::gio::resources_register_include!("compiled.gresource")
+ .context("Failed to register and include compiled gresource.")
+ }
+}
+
+#[relm4::component(pub, async)]
+impl AsyncComponent for App {
+ type Init = ();
+ type Input = AppMsg;
+ type Output = ();
+ type CommandOutput = ();
+
+ view! {
+ adw::Window {
+ set_title: Some("Burrow"),
+ set_default_size: (640, 480),
+ }
+ }
+
+ async fn init(
+ _: Self::Init,
+ root: Self::Root,
+ sender: AsyncComponentSender,
+ ) -> AsyncComponentParts {
+ let daemon_client = Arc::new(Mutex::new(DaemonClient::new().await.ok()));
+
+ let switch_screen = switch_screen::SwitchScreen::builder()
+ .launch(switch_screen::SwitchScreenInit {
+ daemon_client: Arc::clone(&daemon_client),
+ })
+ .forward(sender.input_sender(), |_| AppMsg::None);
+
+ let settings_screen = settings_screen::SettingsScreen::builder()
+ .launch(settings_screen::SettingsScreenInit {
+ daemon_client: Arc::clone(&daemon_client),
+ })
+ .forward(sender.input_sender(), |_| AppMsg::None);
+
+ let widgets = view_output!();
+
+ let view_stack = adw::ViewStack::new();
+ view_stack.add_titled(switch_screen.widget(), None, "Switch");
+ view_stack.add_titled(settings_screen.widget(), None, "Settings");
+
+ let view_switcher_bar = adw::ViewSwitcherBar::builder().stack(&view_stack).build();
+ view_switcher_bar.set_reveal(true);
+
+ let toolbar = adw::ToolbarView::new();
+ toolbar.add_top_bar(
+ &adw::HeaderBar::builder()
+ .title_widget(>k::Label::new(Some("Burrow")))
+ .build(),
+ );
+ toolbar.add_bottom_bar(&view_switcher_bar);
+ toolbar.set_content(Some(&view_stack));
+
+ root.set_content(Some(&toolbar));
+
+ sender.input(AppMsg::PostInit);
+
+ let model = App {
+ daemon_client,
+ switch_screen,
+ _settings_screen: settings_screen,
+ };
+
+ AsyncComponentParts { model, widgets }
+ }
+
+ async fn update(
+ &mut self,
+ _msg: Self::Input,
+ _sender: AsyncComponentSender,
+ _root: &Self::Root,
+ ) {
+ loop {
+ tokio::time::sleep(RECONNECT_POLL_TIME).await;
+ {
+ let mut daemon_client = self.daemon_client.lock().await;
+ let mut disconnected_daemon_client = false;
+
+ if let Some(daemon_client) = daemon_client.as_mut() {
+ if let Err(_e) = daemon_client.send_command(DaemonCommand::ServerInfo).await {
+ disconnected_daemon_client = true;
+ self.switch_screen
+ .emit(switch_screen::SwitchScreenMsg::DaemonDisconnect);
+ }
+ }
+
+ if disconnected_daemon_client || daemon_client.is_none() {
+ *daemon_client = DaemonClient::new().await.ok();
+ if daemon_client.is_some() {
+ self.switch_screen
+ .emit(switch_screen::SwitchScreenMsg::DaemonReconnect);
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/burrow-gtk/src/components/mod.rs b/burrow-gtk/src/components/mod.rs
new file mode 100644
index 0000000..b1cc938
--- /dev/null
+++ b/burrow-gtk/src/components/mod.rs
@@ -0,0 +1,20 @@
+use super::*;
+use adw::prelude::*;
+use burrow::{DaemonClient, DaemonCommand, DaemonResponseData};
+use gtk::Align;
+use relm4::{
+ component::{
+ AsyncComponent, AsyncComponentController, AsyncComponentParts, AsyncComponentSender,
+ AsyncController,
+ },
+ prelude::*,
+};
+use std::sync::Arc;
+use tokio::sync::Mutex;
+
+mod app;
+mod settings;
+mod settings_screen;
+mod switch_screen;
+
+pub use app::*;
diff --git a/burrow-gtk/src/components/settings/diag_group.rs b/burrow-gtk/src/components/settings/diag_group.rs
new file mode 100644
index 0000000..be542cd
--- /dev/null
+++ b/burrow-gtk/src/components/settings/diag_group.rs
@@ -0,0 +1,126 @@
+use super::*;
+use diag::{StatusTernary, SystemSetup};
+
+#[derive(Debug)]
+pub struct DiagGroup {
+ daemon_client: Arc>>,
+
+ init_system: SystemSetup,
+ service_installed: StatusTernary,
+ socket_installed: StatusTernary,
+ socket_enabled: StatusTernary,
+ daemon_running: bool,
+}
+
+pub struct DiagGroupInit {
+ pub daemon_client: Arc>>,
+}
+
+impl DiagGroup {
+ async fn new(daemon_client: Arc>>) -> Result {
+ let setup = SystemSetup::new();
+ let daemon_running = daemon_client.lock().await.is_some();
+
+ Ok(Self {
+ service_installed: setup.is_service_installed()?,
+ socket_installed: setup.is_socket_installed()?,
+ socket_enabled: setup.is_socket_enabled()?,
+ daemon_running,
+ init_system: setup,
+ daemon_client,
+ })
+ }
+}
+
+#[derive(Debug)]
+pub enum DiagGroupMsg {
+ Refresh,
+}
+
+#[relm4::component(pub, async)]
+impl AsyncComponent for DiagGroup {
+ type Init = DiagGroupInit;
+ type Input = DiagGroupMsg;
+ type Output = ();
+ type CommandOutput = ();
+
+ view! {
+ #[name(group)]
+ adw::PreferencesGroup {
+ set_title: "Diagnose",
+ set_description: Some("Diagnose Burrow"),
+
+ adw::ActionRow {
+ #[watch]
+ set_title: &format!("Init System: {}", model.init_system)
+ },
+ adw::ActionRow {
+ #[watch]
+ set_title: &format!(
+ "Service installed: {}",
+ status_ternary_to_str(model.service_installed)
+ )
+ },
+ adw::ActionRow {
+ #[watch]
+ set_title: &format!(
+ "Socket installed: {}",
+ status_ternary_to_str(model.socket_installed)
+ )
+ },
+ adw::ActionRow {
+ #[watch]
+ set_title: &format!(
+ "Socket enabled: {}",
+ status_ternary_to_str(model.socket_enabled)
+ )
+ },
+ adw::ActionRow {
+ #[watch]
+ set_title: &format!(
+ "Daemon running: {}",
+ if model.daemon_running { "Yes" } else { "No" }
+ )
+ },
+ gtk::Button {
+ set_label: "Refresh",
+ connect_clicked => DiagGroupMsg::Refresh
+ }
+ }
+ }
+
+ async fn init(
+ init: Self::Init,
+ root: Self::Root,
+ sender: AsyncComponentSender,
+ ) -> AsyncComponentParts {
+ // Should be impossible to panic here
+ let model = DiagGroup::new(init.daemon_client).await.unwrap();
+
+ let widgets = view_output!();
+
+ AsyncComponentParts { model, widgets }
+ }
+
+ async fn update(
+ &mut self,
+ msg: Self::Input,
+ _sender: AsyncComponentSender,
+ _root: &Self::Root,
+ ) {
+ match msg {
+ DiagGroupMsg::Refresh => {
+ // Should be impossible to panic here
+ *self = Self::new(Arc::clone(&self.daemon_client)).await.unwrap();
+ }
+ }
+ }
+}
+
+fn status_ternary_to_str(status: StatusTernary) -> &'static str {
+ match status {
+ StatusTernary::True => "Yes",
+ StatusTernary::False => "No",
+ StatusTernary::NA => "N/A",
+ }
+}
diff --git a/burrow-gtk/src/components/settings/mod.rs b/burrow-gtk/src/components/settings/mod.rs
new file mode 100644
index 0000000..53f46d4
--- /dev/null
+++ b/burrow-gtk/src/components/settings/mod.rs
@@ -0,0 +1,5 @@
+use super::*;
+
+mod diag_group;
+
+pub use diag_group::{DiagGroup, DiagGroupInit};
diff --git a/burrow-gtk/src/components/settings_screen.rs b/burrow-gtk/src/components/settings_screen.rs
new file mode 100644
index 0000000..778eb84
--- /dev/null
+++ b/burrow-gtk/src/components/settings_screen.rs
@@ -0,0 +1,44 @@
+use super::*;
+
+pub struct SettingsScreen {
+ _diag_group: AsyncController,
+}
+
+pub struct SettingsScreenInit {
+ pub daemon_client: Arc>>,
+}
+
+#[relm4::component(pub)]
+impl SimpleComponent for SettingsScreen {
+ type Init = SettingsScreenInit;
+ type Input = ();
+ type Output = ();
+
+ view! {
+ #[name(preferences)]
+ adw::PreferencesPage {}
+ }
+
+ fn init(
+ init: Self::Init,
+ root: Self::Root,
+ sender: ComponentSender,
+ ) -> ComponentParts {
+ let diag_group = settings::DiagGroup::builder()
+ .launch(settings::DiagGroupInit {
+ daemon_client: Arc::clone(&init.daemon_client),
+ })
+ .forward(sender.input_sender(), |_| ());
+
+ let widgets = view_output!();
+ widgets.preferences.add(diag_group.widget());
+
+ let model = SettingsScreen {
+ _diag_group: diag_group,
+ };
+
+ ComponentParts { model, widgets }
+ }
+
+ fn update(&mut self, _: Self::Input, _sender: ComponentSender) {}
+}
diff --git a/burrow-gtk/src/components/switch_screen.rs b/burrow-gtk/src/components/switch_screen.rs
new file mode 100644
index 0000000..a296c09
--- /dev/null
+++ b/burrow-gtk/src/components/switch_screen.rs
@@ -0,0 +1,158 @@
+use super::*;
+
+pub struct SwitchScreen {
+ daemon_client: Arc>>,
+ switch: gtk::Switch,
+ switch_screen: gtk::Box,
+ disconnected_banner: adw::Banner,
+}
+
+pub struct SwitchScreenInit {
+ pub daemon_client: Arc>>,
+}
+
+#[derive(Debug, PartialEq, Eq)]
+pub enum SwitchScreenMsg {
+ DaemonReconnect,
+ DaemonDisconnect,
+ Start,
+ Stop,
+}
+
+#[relm4::component(pub, async)]
+impl AsyncComponent for SwitchScreen {
+ type Init = SwitchScreenInit;
+ type Input = SwitchScreenMsg;
+ type Output = ();
+ type CommandOutput = ();
+
+ view! {
+ gtk::Box {
+ set_orientation: gtk::Orientation::Vertical,
+ set_valign: Align::BaselineFill,
+
+ gtk::Box {
+ set_orientation: gtk::Orientation::Vertical,
+ set_spacing: 5,
+ set_margin_all: 5,
+ set_valign: Align::Start,
+
+ #[name(setup_banner)]
+ adw::Banner {
+ set_title: "Burrow is not running!",
+ },
+ },
+
+ #[name(switch_screen)]
+ gtk::Box {
+ set_orientation: gtk::Orientation::Vertical,
+ set_spacing: 10,
+ set_margin_all: 5,
+ set_valign: Align::Center,
+ set_vexpand: true,
+
+ gtk::Label {
+ set_label: "Burrow Switch",
+ },
+
+ #[name(switch)]
+ gtk::Switch {
+ set_halign: Align::Center,
+ set_hexpand: false,
+ set_vexpand: false,
+ connect_active_notify => move |switch|
+ sender.input(if switch.is_active() { SwitchScreenMsg::Start } else { SwitchScreenMsg::Stop })
+ },
+ }
+ }
+ }
+
+ async fn init(
+ init: Self::Init,
+ root: Self::Root,
+ sender: AsyncComponentSender,
+ ) -> AsyncComponentParts {
+ let mut initial_switch_status = false;
+ let mut initial_daemon_server_down = false;
+
+ if let Some(daemon_client) = init.daemon_client.lock().await.as_mut() {
+ if let Ok(res) = daemon_client
+ .send_command(DaemonCommand::ServerInfo)
+ .await
+ .as_ref()
+ {
+ initial_switch_status = match res.result.as_ref() {
+ Ok(DaemonResponseData::None) => false,
+ Ok(DaemonResponseData::ServerInfo(_)) => true,
+ _ => false,
+ };
+ } else {
+ initial_daemon_server_down = true;
+ }
+ } else {
+ initial_daemon_server_down = true;
+ }
+
+ let widgets = view_output!();
+
+ widgets.switch.set_active(initial_switch_status);
+
+ if initial_daemon_server_down {
+ *init.daemon_client.lock().await = None;
+ widgets.switch.set_active(false);
+ widgets.switch_screen.set_sensitive(false);
+ widgets.setup_banner.set_revealed(true);
+ }
+
+ let model = SwitchScreen {
+ daemon_client: init.daemon_client,
+ switch: widgets.switch.clone(),
+ switch_screen: widgets.switch_screen.clone(),
+ disconnected_banner: widgets.setup_banner.clone(),
+ };
+
+ AsyncComponentParts { model, widgets }
+ }
+
+ async fn update(
+ &mut self,
+ msg: Self::Input,
+ _: AsyncComponentSender,
+ _root: &Self::Root,
+ ) {
+ let mut disconnected_daemon_client = false;
+
+ if let Some(daemon_client) = self.daemon_client.lock().await.as_mut() {
+ match msg {
+ Self::Input::Start => {
+ if let Err(_e) = daemon_client
+ .send_command(DaemonCommand::Start(Default::default()))
+ .await
+ {
+ disconnected_daemon_client = true;
+ }
+ }
+ Self::Input::Stop => {
+ if let Err(_e) = daemon_client.send_command(DaemonCommand::Stop).await {
+ disconnected_daemon_client = true;
+ }
+ }
+ _ => {}
+ }
+ } else {
+ disconnected_daemon_client = true;
+ }
+
+ if msg == Self::Input::DaemonReconnect {
+ self.disconnected_banner.set_revealed(false);
+ self.switch_screen.set_sensitive(true);
+ }
+
+ if disconnected_daemon_client || msg == Self::Input::DaemonDisconnect {
+ *self.daemon_client.lock().await = None;
+ self.switch.set_active(false);
+ self.switch_screen.set_sensitive(false);
+ self.disconnected_banner.set_revealed(true);
+ }
+ }
+}
diff --git a/burrow-gtk/src/config.rs.in b/burrow-gtk/src/config.rs.in
new file mode 100644
index 0000000..7da2f3f
--- /dev/null
+++ b/burrow-gtk/src/config.rs.in
@@ -0,0 +1,8 @@
+#[allow(unused)]
+pub const ID: &str = @ID@;
+#[allow(unused)]
+pub const VERSION: &str = @VERSION@;
+#[allow(unused)]
+pub const LOCALEDIR: &str = @LOCALEDIR@;
+#[allow(unused)]
+pub const GETTEXT_PACKAGE: &str = @GETTEXT_PACKAGE@;
diff --git a/burrow-gtk/src/diag.rs b/burrow-gtk/src/diag.rs
new file mode 100644
index 0000000..348293e
--- /dev/null
+++ b/burrow-gtk/src/diag.rs
@@ -0,0 +1,80 @@
+use super::*;
+use std::{fmt::Display, fs, process::Command};
+
+const SYSTEMD_SOCKET_LOC: &str = "/etc/systemd/system/burrow.socket";
+const SYSTEMD_SERVICE_LOC: &str = "/etc/systemd/system/burrow.service";
+
+// I don't like this type very much.
+#[derive(Debug, Clone, Copy)]
+pub enum StatusTernary {
+ True,
+ False,
+ NA,
+}
+
+// Realistically, we may not explicitly "support" non-systemd platforms which would simply this
+// code greatly.
+// Along with replacing [`StatusTernary`] with good old [`bool`].
+#[derive(Debug, Clone, Copy)]
+pub enum SystemSetup {
+ Systemd,
+ Other,
+}
+
+impl SystemSetup {
+ pub fn new() -> Self {
+ if Command::new("systemctl").arg("--version").output().is_ok() {
+ SystemSetup::Systemd
+ } else {
+ SystemSetup::Other
+ }
+ }
+
+ pub fn is_service_installed(&self) -> Result {
+ match self {
+ SystemSetup::Systemd => Ok(fs::metadata(SYSTEMD_SERVICE_LOC).is_ok().into()),
+ SystemSetup::Other => Ok(StatusTernary::NA),
+ }
+ }
+
+ pub fn is_socket_installed(&self) -> Result {
+ match self {
+ SystemSetup::Systemd => Ok(fs::metadata(SYSTEMD_SOCKET_LOC).is_ok().into()),
+ SystemSetup::Other => Ok(StatusTernary::NA),
+ }
+ }
+
+ pub fn is_socket_enabled(&self) -> Result {
+ match self {
+ SystemSetup::Systemd => {
+ let output = Command::new("systemctl")
+ .arg("is-enabled")
+ .arg("burrow.socket")
+ .output()?
+ .stdout;
+ let output = String::from_utf8(output)?;
+ Ok((output == "enabled\n").into())
+ }
+ SystemSetup::Other => Ok(StatusTernary::NA),
+ }
+ }
+}
+
+impl From for StatusTernary {
+ fn from(value: bool) -> Self {
+ if value {
+ StatusTernary::True
+ } else {
+ StatusTernary::False
+ }
+ }
+}
+
+impl Display for SystemSetup {
+ fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+ f.write_str(match self {
+ SystemSetup::Systemd => "Systemd",
+ SystemSetup::Other => "Other",
+ })
+ }
+}
diff --git a/burrow-gtk/src/main.rs b/burrow-gtk/src/main.rs
index d91b6c2..6f91e2a 100644
--- a/burrow-gtk/src/main.rs
+++ b/burrow-gtk/src/main.rs
@@ -1,87 +1,11 @@
-use adw::prelude::*;
-use burrow::{DaemonClient, DaemonCommand, DaemonStartOptions};
-use gtk::Align;
-use relm4::{
- component::{AsyncComponent, AsyncComponentParts, AsyncComponentSender},
- prelude::*,
-};
+use anyhow::Result;
-struct App {}
+pub mod components;
+mod diag;
-#[derive(Debug)]
-enum Msg {
- Start,
- Stop,
-}
-
-#[relm4::component(async)]
-impl AsyncComponent for App {
- type Init = ();
- type Input = Msg;
- type Output = ();
- type CommandOutput = ();
-
- view! {
- adw::Window {
- set_title: Some("Simple app"),
- set_default_size: (640, 480),
-
- gtk::Box {
- set_orientation: gtk::Orientation::Vertical,
- set_spacing: 5,
- set_margin_all: 5,
- set_valign: Align::Center,
-
- gtk::Label {
- set_label: "Burrow GTK Switch",
- },
-
- gtk::Switch {
- set_halign: Align::Center,
- set_hexpand: false,
- set_vexpand: false,
- connect_active_notify => move |switch|
- sender.input(if switch.is_active() { Msg::Start } else { Msg::Stop })
- },
- }
- }
- }
-
- async fn init(
- _: Self::Init,
- root: Self::Root,
- sender: AsyncComponentSender,
- ) -> AsyncComponentParts {
- let model = App {};
-
- let widgets = view_output!();
-
- AsyncComponentParts { model, widgets }
- }
-
- async fn update(
- &mut self,
- msg: Self::Input,
- _sender: AsyncComponentSender,
- _root: &Self::Root,
- ) {
- match msg {
- Msg::Start => {
- let mut client = DaemonClient::new().await.unwrap();
- client
- .send_command(DaemonCommand::Start(DaemonStartOptions::default()))
- .await
- .unwrap();
- }
- Msg::Stop => {
- let mut client = DaemonClient::new().await.unwrap();
- client.send_command(DaemonCommand::Stop).await.unwrap();
- }
- }
- }
-}
+// Generated using meson
+mod config;
fn main() {
- let app = RelmApp::new("com.hackclub.burrow");
- app.run_async::(());
+ components::App::run();
}
diff --git a/burrow-gtk/src/meson.build b/burrow-gtk/src/meson.build
new file mode 100644
index 0000000..ed77771
--- /dev/null
+++ b/burrow-gtk/src/meson.build
@@ -0,0 +1,34 @@
+# config.rs.in
+global_conf = configuration_data()
+global_conf.set_quoted('ID', app_id)
+global_conf.set_quoted('VERSION', meson.project_version())
+global_conf.set_quoted('LOCALEDIR', localedir)
+global_conf.set_quoted('GETTEXT_PACKAGE', app_name)
+config = configure_file(
+ input: 'config.rs.in',
+ output: 'config.rs',
+ configuration: global_conf,
+)
+
+run_command(
+ 'cp',
+ meson.project_build_root() / 'src' / 'config.rs',
+ meson.project_source_root() / 'src',
+ check: true,
+)
+
+# Cargo Build
+cargo_build = custom_target(
+ 'cargo-build',
+ build_by_default: true,
+ build_always_stale: true,
+ output: meson.project_name(),
+ console: true,
+ install: true,
+ install_dir: get_option('bindir'),
+ command: [
+ 'env', cargo_env,
+ cargo_bin, 'build',
+ cargo_opt, '&&', 'cp', 'target' / rust_target / meson.project_name(), '@OUTPUT@',
+ ]
+ )
From 7d8958e0e75d84b9a3711d2756ddeaff3b90ebd5 Mon Sep 17 00:00:00 2001
From: Jett Chen
Date: Sun, 21 Jan 2024 03:44:58 +0800
Subject: [PATCH 02/32] Add handling for connection expiration
---
burrow/src/wireguard/pcb.rs | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/burrow/src/wireguard/pcb.rs b/burrow/src/wireguard/pcb.rs
index c6ebaa6..dfa6d2a 100755
--- a/burrow/src/wireguard/pcb.rs
+++ b/burrow/src/wireguard/pcb.rs
@@ -5,7 +5,9 @@ use fehler::throws;
use ip_network::IpNetwork;
use rand::random;
use tokio::{net::UdpSocket, sync::RwLock, task::JoinHandle};
+use tokio::io::AsyncWrite;
use tun::tokio::TunInterface;
+use crate::wireguard::noise::errors::WireGuardError;
use super::{
noise::{TunnResult, Tunnel},
@@ -62,6 +64,7 @@ impl PeerPcb {
tracing::debug!("{}: waiting for packet", rid);
let guard = self.socket.read().await;
let Some(socket) = guard.as_ref() else {
+ self.open_if_closed().await?;
continue
};
let mut res_buf = [0; 1500];
@@ -136,6 +139,10 @@ impl PeerPcb {
pub async fn update_timers(&self, dst: &mut [u8]) -> Result<(), Error> {
match self.tunnel.write().await.update_timers(dst) {
TunnResult::Done => {}
+ TunnResult::Err(WireGuardError::ConnectionExpired) => {
+ tracing::debug!("Connection expired, closing socket");
+ self.socket.write().await.take();
+ }
TunnResult::Err(e) => {
tracing::error!(message = "Update timers error", error = ?e)
}
From 0b46ac57b7ee49a022546e54f564b0bbdd5d28ee Mon Sep 17 00:00:00 2001
From: Jett Chen
Date: Tue, 23 Jan 2024 16:54:11 +0800
Subject: [PATCH 03/32] Add tokio console and more debugging feats
---
Cargo.lock | 318 +++++++++++++++++++++++++++++++++++-
Makefile | 9 +-
burrow/Cargo.toml | 6 +-
burrow/src/main.rs | 28 ++--
burrow/src/wireguard/pcb.rs | 9 +-
5 files changed, 352 insertions(+), 18 deletions(-)
diff --git a/Cargo.lock b/Cargo.lock
index cc8d3b3..7399bd5 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -121,12 +121,90 @@ dependencies = [
"pin-project-lite",
]
+[[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.39",
+]
+
+[[package]]
+name = "async-trait"
+version = "0.1.76"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "531b97fb4cd3dfdce92c35dedbfdc1f0b9d8091c8ca943d6dae340ef5012d514"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.39",
+]
+
[[package]]
name = "autocfg"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
+[[package]]
+name = "axum"
+version = "0.6.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf"
+dependencies = [
+ "async-trait",
+ "axum-core",
+ "bitflags 1.3.2",
+ "bytes",
+ "futures-util",
+ "http",
+ "http-body",
+ "hyper",
+ "itoa",
+ "matchit",
+ "memchr",
+ "mime",
+ "percent-encoding",
+ "pin-project-lite",
+ "rustversion",
+ "serde",
+ "sync_wrapper",
+ "tower",
+ "tower-layer",
+ "tower-service",
+]
+
+[[package]]
+name = "axum-core"
+version = "0.3.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c"
+dependencies = [
+ "async-trait",
+ "bytes",
+ "futures-util",
+ "http",
+ "http-body",
+ "mime",
+ "rustversion",
+ "tower-layer",
+ "tower-service",
+]
+
[[package]]
name = "backtrace"
version = "0.3.68"
@@ -247,6 +325,7 @@ dependencies = [
"caps",
"chacha20poly1305",
"clap",
+ "console-subscriber",
"env_logger",
"etherparse",
"fehler",
@@ -459,6 +538,43 @@ dependencies = [
"windows-sys 0.45.0",
]
+[[package]]
+name = "console-api"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fd326812b3fd01da5bb1af7d340d0d555fd3d4b641e7f1dfcf5962a902952787"
+dependencies = [
+ "futures-core",
+ "prost",
+ "prost-types",
+ "tonic",
+ "tracing-core",
+]
+
+[[package]]
+name = "console-subscriber"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7481d4c57092cd1c19dd541b92bdce883de840df30aa5d03fd48a3935c01842e"
+dependencies = [
+ "console-api",
+ "crossbeam-channel",
+ "crossbeam-utils",
+ "futures-task",
+ "hdrhistogram",
+ "humantime",
+ "prost-types",
+ "serde",
+ "serde_json",
+ "thread_local",
+ "tokio",
+ "tokio-stream",
+ "tonic",
+ "tracing",
+ "tracing-core",
+ "tracing-subscriber",
+]
+
[[package]]
name = "constant_time_eq"
version = "0.1.5"
@@ -500,14 +616,20 @@ dependencies = [
]
[[package]]
-name = "crossbeam-utils"
-version = "0.8.16"
+name = "crossbeam-channel"
+version = "0.5.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294"
+checksum = "176dc175b78f56c0f321911d9c8eb2b77a78a4860b9c19db83835fea1a46649b"
dependencies = [
- "cfg-if",
+ "crossbeam-utils",
]
+[[package]]
+name = "crossbeam-utils"
+version = "0.8.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345"
+
[[package]]
name = "crypto-common"
version = "0.1.6"
@@ -870,6 +992,19 @@ version = "0.12.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
+[[package]]
+name = "hdrhistogram"
+version = "7.5.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "765c9198f173dd59ce26ff9f95ef0aafd0a0fe01fb9d72841bc5066a4c06511d"
+dependencies = [
+ "base64",
+ "byteorder",
+ "flate2",
+ "nom",
+ "num-traits",
+]
+
[[package]]
name = "heck"
version = "0.4.1"
@@ -961,6 +1096,18 @@ dependencies = [
"want",
]
+[[package]]
+name = "hyper-timeout"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1"
+dependencies = [
+ "hyper",
+ "pin-project-lite",
+ "tokio",
+ "tokio-io-timeout",
+]
+
[[package]]
name = "hyper-tls"
version = "0.5.0"
@@ -1079,6 +1226,15 @@ dependencies = [
"windows-sys 0.48.0",
]
+[[package]]
+name = "itertools"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57"
+dependencies = [
+ "either",
+]
+
[[package]]
name = "itoa"
version = "1.0.6"
@@ -1192,6 +1348,12 @@ dependencies = [
"regex-automata",
]
+[[package]]
+name = "matchit"
+version = "0.7.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94"
+
[[package]]
name = "memchr"
version = "2.5.0"
@@ -1314,6 +1476,15 @@ dependencies = [
"winapi",
]
+[[package]]
+name = "num-traits"
+version = "0.2.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c"
+dependencies = [
+ "autocfg",
+]
+
[[package]]
name = "num_cpus"
version = "1.16.0"
@@ -1459,6 +1630,26 @@ version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94"
+[[package]]
+name = "pin-project"
+version = "1.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422"
+dependencies = [
+ "pin-project-internal",
+]
+
+[[package]]
+name = "pin-project-internal"
+version = "1.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.39",
+]
+
[[package]]
name = "pin-project-lite"
version = "0.2.13"
@@ -1519,6 +1710,38 @@ dependencies = [
"unicode-ident",
]
+[[package]]
+name = "prost"
+version = "0.12.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "146c289cda302b98a28d40c8b3b90498d6e526dd24ac2ecea73e4e491685b94a"
+dependencies = [
+ "bytes",
+ "prost-derive",
+]
+
+[[package]]
+name = "prost-derive"
+version = "0.12.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "efb6c9a1dd1def8e2124d17e83a20af56f1570d6c2d2bd9e266ccb768df3840e"
+dependencies = [
+ "anyhow",
+ "itertools",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.39",
+]
+
+[[package]]
+name = "prost-types"
+version = "0.12.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "193898f59edcf43c26227dcd4c8427f00d99d61e95dcde58dabd49fa291d470e"
+dependencies = [
+ "prost",
+]
+
[[package]]
name = "quote"
version = "1.0.33"
@@ -1698,6 +1921,12 @@ dependencies = [
"windows-sys 0.48.0",
]
+[[package]]
+name = "rustversion"
+version = "1.0.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4"
+
[[package]]
name = "ryu"
version = "1.0.13"
@@ -1967,6 +2196,12 @@ dependencies = [
"unicode-ident",
]
+[[package]]
+name = "sync_wrapper"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160"
+
[[package]]
name = "tempfile"
version = "3.6.0"
@@ -2066,9 +2301,20 @@ dependencies = [
"pin-project-lite",
"socket2",
"tokio-macros",
+ "tracing",
"windows-sys 0.48.0",
]
+[[package]]
+name = "tokio-io-timeout"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf"
+dependencies = [
+ "pin-project-lite",
+ "tokio",
+]
+
[[package]]
name = "tokio-macros"
version = "2.1.0"
@@ -2090,6 +2336,17 @@ dependencies = [
"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",
+]
+
[[package]]
name = "tokio-util"
version = "0.7.8"
@@ -2104,6 +2361,59 @@ dependencies = [
"tracing",
]
+[[package]]
+name = "tonic"
+version = "0.10.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d560933a0de61cf715926b9cac824d4c883c2c43142f787595e48280c40a1d0e"
+dependencies = [
+ "async-stream",
+ "async-trait",
+ "axum",
+ "base64",
+ "bytes",
+ "h2",
+ "http",
+ "http-body",
+ "hyper",
+ "hyper-timeout",
+ "percent-encoding",
+ "pin-project",
+ "prost",
+ "tokio",
+ "tokio-stream",
+ "tower",
+ "tower-layer",
+ "tower-service",
+ "tracing",
+]
+
+[[package]]
+name = "tower"
+version = "0.4.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c"
+dependencies = [
+ "futures-core",
+ "futures-util",
+ "indexmap",
+ "pin-project",
+ "pin-project-lite",
+ "rand",
+ "slab",
+ "tokio",
+ "tokio-util",
+ "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"
diff --git a/Makefile b/Makefile
index e8e5687..18b4b27 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,6 @@
tun_num := $(shell ifconfig | awk -F 'utun|[: ]' '/utun[0-9]/ {print $$2}' | tail -n 1)
+cargo_console := RUST_BACKTRACE=1 RUST_LOG=debug RUSTFLAGS='--cfg tokio_unstable' cargo run --all-features
+cargo_norm := RUST_BACKTRACE=1 RUST_LOG=debug cargo run
check:
@cargo check
@@ -6,11 +8,14 @@ check:
build:
@cargo run build
+daemon-console:
+ @$(cargo_console) daemon
+
daemon:
- @RUST_BACKTRACE=1 RUST_LOG=debug cargo run daemon
+ @$(cargo_norm) daemon
start:
- @RUST_BACKTRACE=1 RUST_LOG=debug cargo run start
+ @$(cargo_norm) start
test-dns:
@sudo route delete 8.8.8.8
diff --git a/burrow/Cargo.toml b/burrow/Cargo.toml
index f263cc6..0fb2443 100644
--- a/burrow/Cargo.toml
+++ b/burrow/Cargo.toml
@@ -10,7 +10,7 @@ crate-type = ["lib", "staticlib"]
[dependencies]
anyhow = "1.0"
-tokio = { version = "1.21", features = ["rt", "macros", "sync", "io-util", "rt-multi-thread", "time"] }
+tokio = { version = "1.21", features = ["rt", "macros", "sync", "io-util", "rt-multi-thread", "time", "tracing"] }
tun = { version = "0.1", path = "../tun", features = ["serde", "tokio"] }
clap = { version = "4.3.2", features = ["derive"] }
tracing = "0.1"
@@ -40,6 +40,7 @@ async-channel = "2.1.1"
schemars = "0.8"
futures = "0.3.28"
uuid = { version = "1.6.1", features = ["v4"] }
+console-subscriber = { version = "0.2.0" , optional = true}
[target.'cfg(target_os = "linux")'.dependencies]
caps = "0.5.5"
@@ -60,3 +61,6 @@ assets = [
]
post_install_script = "../package/rpm/post_install"
pre_uninstall_script = "../package/rpm/pre_uninstall"
+
+[features]
+tokio-console = ["dep:console-subscriber"]
\ No newline at end of file
diff --git a/burrow/src/main.rs b/burrow/src/main.rs
index 9a692d6..18eaf77 100644
--- a/burrow/src/main.rs
+++ b/burrow/src/main.rs
@@ -98,19 +98,27 @@ async fn initialize_tracing() -> Result<()> {
#[cfg(any(target_os = "linux", target_vendor = "apple"))]
{
- let maybe_layer = system_log()?;
- if let Some(layer) = maybe_layer {
- let logger = layer.with_subscriber(
- FmtSubscriber::builder()
- .with_line_number(true)
- .with_env_filter(EnvFilter::from_default_env())
- .finish(),
+ let maybe_layer = system_log()?;
+ if let Some(layer) = maybe_layer {
+ let registry = tracing_subscriber::registry()
+ .with(layer)
+ .with(tracing_subscriber::fmt::layer()
+ .with_line_number(true)
+ .with_filter(EnvFilter::from_default_env())
);
- tracing::subscriber::set_global_default(logger)
- .context("Failed to set the global tracing subscriber")?;
+
+ #[cfg(feature = "tokio-console")]
+ let registry = registry.with(
+ console_subscriber::spawn()
+ .with_filter(EnvFilter::from_default_env()
+ .add_directive("tokio=trace".parse()?)
+ .add_directive("runtime=trace".parse()?)
+ )
+ );
+
+ tracing::subscriber::set_global_default(registry).context("Failed to set the global tracing subscriber")?;
}
}
-
Ok(())
}
diff --git a/burrow/src/wireguard/pcb.rs b/burrow/src/wireguard/pcb.rs
index dfa6d2a..69b290f 100755
--- a/burrow/src/wireguard/pcb.rs
+++ b/burrow/src/wireguard/pcb.rs
@@ -115,9 +115,12 @@ impl PeerPcb {
}
pub async fn send(&self, src: &[u8]) -> Result<(), Error> {
+ tracing::debug!("Sending packet: {:?}", src);
let mut dst_buf = [0u8; 3000];
match self.tunnel.write().await.encapsulate(src, &mut dst_buf[..]) {
- TunnResult::Done => {}
+ TunnResult::Done => {
+ tracing::debug!("Encapsulate done");
+ }
TunnResult::Err(e) => {
tracing::error!(message = "Encapsulate error", error = ?e)
}
@@ -137,6 +140,7 @@ impl PeerPcb {
}
pub async fn update_timers(&self, dst: &mut [u8]) -> Result<(), Error> {
+ tracing::debug!("update timers called...");
match self.tunnel.write().await.update_timers(dst) {
TunnResult::Done => {}
TunnResult::Err(WireGuardError::ConnectionExpired) => {
@@ -147,6 +151,7 @@ impl PeerPcb {
tracing::error!(message = "Update timers error", error = ?e)
}
TunnResult::WriteToNetwork(packet) => {
+ tracing::debug!("Sending Packet for timer update: {:?}", packet);
self.open_if_closed().await?;
let handle = self.socket.read().await;
let Some(socket) = handle.as_ref() else {
@@ -154,9 +159,11 @@ impl PeerPcb {
return Ok(())
};
socket.send(packet).await?;
+ tracing::debug!("Sent Packet for timer update");
}
_ => panic!("Unexpected result from update_timers"),
};
+ tracing::debug!("update timers exit...");
Ok(())
}
From 079c4f676db3c0a375b80560247cee6af5b87247 Mon Sep 17 00:00:00 2001
From: Jett Chen
Date: Thu, 25 Jan 2024 01:07:40 +0800
Subject: [PATCH 04/32] Update locking
---
burrow/src/wireguard/pcb.rs | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/burrow/src/wireguard/pcb.rs b/burrow/src/wireguard/pcb.rs
index 69b290f..13a2df1 100755
--- a/burrow/src/wireguard/pcb.rs
+++ b/burrow/src/wireguard/pcb.rs
@@ -1,10 +1,11 @@
use std::{net::SocketAddr, sync::Arc};
+use std::time::Duration;
use anyhow::{Error, Result};
use fehler::throws;
use ip_network::IpNetwork;
use rand::random;
-use tokio::{net::UdpSocket, sync::RwLock, task::JoinHandle};
+use tokio::{net::UdpSocket, sync::RwLock, task::JoinHandle, time::timeout};
use tokio::io::AsyncWrite;
use tun::tokio::TunInterface;
use crate::wireguard::noise::errors::WireGuardError;
@@ -94,7 +95,7 @@ impl PeerPcb {
TunnResult::WriteToNetwork(packet) => {
tracing::debug!("WriteToNetwork: {:?}", packet);
self.open_if_closed().await?;
- socket.send(packet).await?;
+ self.socket.read().await.as_ref().unwrap().send(packet).await?;
tracing::debug!("WriteToNetwork done");
res_dat = &[];
continue
@@ -140,12 +141,9 @@ impl PeerPcb {
}
pub async fn update_timers(&self, dst: &mut [u8]) -> Result<(), Error> {
- tracing::debug!("update timers called...");
match self.tunnel.write().await.update_timers(dst) {
TunnResult::Done => {}
TunnResult::Err(WireGuardError::ConnectionExpired) => {
- tracing::debug!("Connection expired, closing socket");
- self.socket.write().await.take();
}
TunnResult::Err(e) => {
tracing::error!(message = "Update timers error", error = ?e)
@@ -163,7 +161,6 @@ impl PeerPcb {
}
_ => panic!("Unexpected result from update_timers"),
};
- tracing::debug!("update timers exit...");
Ok(())
}
From 9e03c9680cfa9818b46d85f01c4506837d4de452 Mon Sep 17 00:00:00 2001
From: Jasper Mayone
Date: Fri, 26 Jan 2024 01:33:26 -0500
Subject: [PATCH 05/32] Added Xcode Path Switching to Getting Started
---
docs/GETTING_STARTED.md | 102 ++++++++++++++++++++++++----------------
1 file changed, 61 insertions(+), 41 deletions(-)
diff --git a/docs/GETTING_STARTED.md b/docs/GETTING_STARTED.md
index e43680d..764c219 100644
--- a/docs/GETTING_STARTED.md
+++ b/docs/GETTING_STARTED.md
@@ -1,6 +1,5 @@
# Getting Started
-
## Dependencies
Before you can start working on Burrow, you'll need to install some dependencies. They are different for each platform:
@@ -8,60 +7,79 @@ Before you can start working on Burrow, you'll need to install some dependencies
Linux
- 1. Install **rustup** using the instructions on the [website](https://rustup.rs/):
- ```bash
- $ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
- ```
+1. Install **rustup** using the instructions on the [website](https://rustup.rs/):
- 2. Install **Visual Studio Code** from the [website](https://code.visualstudio.com/#alt-downloads), [Snap Store](https://snapcraft.io/code), or your package manager of choice.
+```bash
+$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
+```
+
+2. Install **Visual Studio Code** from the [website](https://code.visualstudio.com/#alt-downloads), [Snap Store](https://snapcraft.io/code), or your package manager of choice.
macOS
- 1. Install **rustup** using the instructions on the [website](https://rustup.rs/):
- ```bash
- $ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
- ```
+1. Install **rustup** using the instructions on the [website](https://rustup.rs/):
- 2. Download and install **Visual Studio Code** from the [website](https://code.visualstudio.com/#alt-downloads), or by using brew:
- ```
- brew install --cask visual-studio-code
- ```
+```bash
+$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
+```
- 3. Download and Install **Xcode** from the [App Store](https://apps.apple.com/us/app/xcode/id497799835) or the [Apple Developer](https://developer.apple.com/downloads) website.
+2. Download and install **Visual Studio Code** from the [website](https://code.visualstudio.com/#alt-downloads), or by using brew:
+
+```
+brew install --cask visual-studio-code
+```
+
+3. Download and Install **Xcode** from the [App Store](https://apps.apple.com/us/app/xcode/id497799835) or the [Apple Developer](https://developer.apple.com/downloads) website.
+
+4. Make sure the _"current"_ version of Xcode matches the one you are using:
+
+```
+$ xcode-select -p
+```
+
+If the output is not the version of Xcode you just installed, run the following command to switch to the new version:
+
+```
+$ sudo xcode-select -s {PATH_TO_XCODE}
+```
-
Windows
- 1. Download **Visual Studio** community edition from the [website](https://visualstudio.microsoft.com/vs/). Install the components for "Desktop Development with C++"
+1. Download **Visual Studio** community edition from the [website](https://visualstudio.microsoft.com/vs/). Install the components for "Desktop Development with C++"
- 2. Install [**Visual Studio Code**](https://apps.microsoft.com/store/detail/visual-studio-code/XP9KHM4BK9FZ7Q), [**PowerShell**](https://apps.microsoft.com/store/detail/powershell/9MZ1SNWT0N5D) and [**Windows Terminal**](https://apps.microsoft.com/store/detail/windows-terminal/9N0DX20HK701) from the Microsoft Store
+2. Install [**Visual Studio Code**](https://apps.microsoft.com/store/detail/visual-studio-code/XP9KHM4BK9FZ7Q), [**PowerShell**](https://apps.microsoft.com/store/detail/powershell/9MZ1SNWT0N5D) and [**Windows Terminal**](https://apps.microsoft.com/store/detail/windows-terminal/9N0DX20HK701) from the Microsoft Store
- 3. Open Windows Terminal and use [winget](https://learn.microsoft.com/en-us/windows/package-manager/winget/) to install **git**, **LLVM** and **rustup**:
- ```posh
- winget install Git.Git
- winget install LLVM.LLVM
- winget install Rustlang.Rustup
- ```
+3. Open Windows Terminal and use [winget](https://learn.microsoft.com/en-us/windows/package-manager/winget/) to install **git**, **LLVM** and **rustup**:
+
+```posh
+winget install Git.Git
+winget install LLVM.LLVM
+winget install Rustlang.Rustup
+```
+
+4. Install Rust using rustup:
+
+```posh
+rustup toolchain install stable-msvc
+```
- 4. Install Rust using rustup:
- ```posh
- rustup toolchain install stable-msvc
- ```
## Building
1. Clone the repository:
+
```
git clone git@github.com:hackclub/burrow.git
```
2. Open the `burrow` folder in Visual Studio Code:
+
```
code burrow
```
@@ -74,37 +92,39 @@ code burrow
## Running
-
Command Line
- You can run burrow on the command line with cargo:
+You can run burrow on the command line with cargo:
- ```
- cargo run
- ```
+```
+cargo run
+```
+
+Cargo will ask for your password because burrow needs permission in order to create a tunnel.
- Cargo will ask for your password because burrow needs permission in order to create a tunnel.
Visual Studio Code
- You can debug the Rust program inside of Visual Studio using the **Run and Debug** tab.
+You can debug the Rust program inside of Visual Studio using the **Run and Debug** tab.
+
+**_This does not work fully yet_**. Visual Studio Code does not have a way to debug programs with administrative privileges.
- **_This does not work fully yet_**. Visual Studio Code does not have a way to debug programs with administrative privileges.
iOS or macOS
- You can run the Burrow app on iOS or macOS using **Xcode**.
+You can run the Burrow app on iOS or macOS using **Xcode**.
- You will need to be logged in with your Apple ID, and it should be a part of **The Hack Foundation** team:
+You will need to be logged in with your Apple ID, and it should be a part of **The Hack Foundation** team:
-
+
- If your Apple ID is not a part of The Hack Foundation team, ask the Slack channel for assistance.
+If your Apple ID is not a part of The Hack Foundation team, ask the Slack channel for assistance.
+
+You should now be able to run the app by opening `Apple/Burrow.xcodeproj` in Xcode, selecting the **App** scheme and clicking **Run**.
- You should now be able to run the app by opening `Apple/Burrow.xcodeproj` in Xcode, selecting the **App** scheme and clicking **Run**.
From 7cc1f3119e8d774bee8df4ff8e4ddc0d62a8d8f5 Mon Sep 17 00:00:00 2001
From: Conrad Kramer
Date: Sun, 21 Jan 2024 16:18:13 -0800
Subject: [PATCH 06/32] Simplified process startup on macOS and Linux
---
.vscode/settings.json | 3 +-
Apple/App/Menu/MenuView.swift | 6 +-
Apple/App/Tunnel.swift | 53 +-
Apple/Burrow.xcodeproj/project.pbxproj | 183 ++-
Apple/Configuration/App.xcconfig | 2 +-
Apple/Configuration/Compiler.xcconfig | 2 +-
Apple/Configuration/Extension.xcconfig | 2 +
Apple/NetworkExtension/BurrowIpc.swift | 133 ---
Apple/NetworkExtension/Client.swift | 60 +
Apple/NetworkExtension/DataTypes.swift | 14 +-
.../NetworkExtension/NWConnection+Async.swift | 32 +
.../NetworkExtension-macOS.entitlements | 10 +-
.../NetworkExtension.xcconfig | 2 +-
.../NewlineProtocolFramer.swift | 54 +
.../PacketTunnelProvider.swift | 61 +-
Apple/NetworkExtension/libburrow/libburrow.h | 4 +-
Apple/Shared/Constants.swift | 22 +
Apple/Shared/Constants/Constants.h | 11 +
Apple/Shared/Constants/module.modulemap | 4 +
Apple/Shared/Logging.swift | 19 +
Apple/Shared/Shared.xcconfig | 5 +
Cargo.lock | 1040 ++++++++---------
burrow/Cargo.toml | 54 +-
burrow/src/apple.rs | 13 -
burrow/src/daemon/apple.rs | 55 +
burrow/src/daemon/mod.rs | 53 +-
burrow/src/daemon/net/apple.rs | 32 -
burrow/src/daemon/net/mod.rs | 18 +-
burrow/src/daemon/net/systemd.rs | 33 -
burrow/src/daemon/net/unix.rs | 273 +++--
burrow/src/daemon/net/windows.rs | 27 +-
burrow/src/daemon/response.rs | 4 +-
burrow/src/lib.rs | 10 +-
burrow/src/main.rs | 106 +-
burrow/src/tracing.rs | 63 +
burrow/src/wireguard/iface.rs | 10 +-
burrow/src/wireguard/mod.rs | 1 -
burrow/src/wireguard/noise/mod.rs | 8 +-
burrow/src/wireguard/pcb.rs | 17 +-
tun/src/unix/apple/mod.rs | 1 -
40 files changed, 1343 insertions(+), 1157 deletions(-)
delete mode 100644 Apple/NetworkExtension/BurrowIpc.swift
create mode 100644 Apple/NetworkExtension/Client.swift
create mode 100644 Apple/NetworkExtension/NWConnection+Async.swift
create mode 100644 Apple/NetworkExtension/NewlineProtocolFramer.swift
create mode 100644 Apple/Shared/Constants.swift
create mode 100644 Apple/Shared/Constants/Constants.h
create mode 100644 Apple/Shared/Constants/module.modulemap
create mode 100644 Apple/Shared/Logging.swift
create mode 100644 Apple/Shared/Shared.xcconfig
delete mode 100644 burrow/src/apple.rs
create mode 100644 burrow/src/daemon/apple.rs
delete mode 100644 burrow/src/daemon/net/apple.rs
delete mode 100644 burrow/src/daemon/net/systemd.rs
create mode 100644 burrow/src/tracing.rs
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 5fbfc5c..3c714be 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -13,5 +13,6 @@
],
"[rust]": {
"editor.defaultFormatter": "rust-lang.rust-analyzer",
- }
+ },
+ "rust-analyzer.inlayHints.typeHints.enable": false
}
\ No newline at end of file
diff --git a/Apple/App/Menu/MenuView.swift b/Apple/App/Menu/MenuView.swift
index 56a7494..eab8da2 100644
--- a/Apple/App/Menu/MenuView.swift
+++ b/Apple/App/Menu/MenuView.swift
@@ -39,10 +39,10 @@ extension Tunnel {
var isOn: Binding {
Binding {
switch self.status {
- case .unknown, .disabled, .disconnecting, .disconnected, .invalid, .permissionRequired, .configurationReadWriteFailed:
- return false
case .connecting, .reasserting, .connected:
- return true
+ true
+ default:
+ false
}
} set: { newValue in
switch (self.status, newValue) {
diff --git a/Apple/App/Tunnel.swift b/Apple/App/Tunnel.swift
index 0421a0c..5542170 100644
--- a/Apple/App/Tunnel.swift
+++ b/Apple/App/Tunnel.swift
@@ -1,11 +1,13 @@
-import Combine
+import BurrowShared
import NetworkExtension
import SwiftUI
-@Observable class Tunnel {
+@Observable
+class Tunnel {
private(set) var status: Status = .unknown
private var error: NEVPNError?
+ private let logger = Logger.logger(for: Tunnel.self)
private let bundleIdentifier: String
private let configure: (NETunnelProviderManager, NETunnelProviderProtocol) -> Void
private var tasks: [Task] = []
@@ -49,33 +51,34 @@ import SwiftUI
self.bundleIdentifier = bundleIdentifier
self.configure = configure
- listenForUpdates()
- Task { await update() }
- }
-
- private func listenForUpdates() {
let center = NotificationCenter.default
- let statusTask = Task {
- for try await _ in center.notifications(named: .NEVPNStatusDidChange).map({ _ in () }) {
- status = currentStatus
- }
- }
- let configurationTask = Task {
+ let configurationChanged = Task {
for try await _ in center.notifications(named: .NEVPNConfigurationChange).map({ _ in () }) {
await update()
}
}
- tasks = [statusTask, configurationTask]
+ let statusChanged = Task {
+ for try await _ in center.notifications(named: .NEVPNStatusDidChange).map({ _ in () }) {
+ await MainActor.run {
+ status = currentStatus
+ }
+ }
+ }
+ tasks = [configurationChanged, statusChanged]
+
+ Task { await update() }
}
private func update() async {
do {
let updated = try await NETunnelProviderManager.managers
- await MainActor.run { managers = updated }
+ await MainActor.run {
+ managers = updated
+ }
} catch let vpnError as NEVPNError {
error = vpnError
} catch {
- print(error)
+ logger.error("Failed to update VPN configurations: \(error)")
}
}
@@ -117,9 +120,7 @@ import SwiftUI
}
deinit {
- for task in tasks {
- task.cancel()
- }
+ tasks.forEach { $0.cancel() }
}
}
@@ -127,19 +128,19 @@ extension NEVPNConnection {
var tunnelStatus: Tunnel.Status {
switch status {
case .connected:
- return .connected(connectedDate!)
+ .connected(connectedDate!)
case .connecting:
- return .connecting
+ .connecting
case .disconnecting:
- return .disconnecting
+ .disconnecting
case .disconnected:
- return .disconnected
+ .disconnected
case .reasserting:
- return .reasserting
+ .reasserting
case .invalid:
- return .invalid
+ .invalid
@unknown default:
- return .unknown
+ .unknown
}
}
}
diff --git a/Apple/Burrow.xcodeproj/project.pbxproj b/Apple/Burrow.xcodeproj/project.pbxproj
index c0e4f09..428d9ab 100644
--- a/Apple/Burrow.xcodeproj/project.pbxproj
+++ b/Apple/Burrow.xcodeproj/project.pbxproj
@@ -8,14 +8,20 @@
/* Begin PBXBuildFile section */
0B28F1562ABF463A000D44B0 /* DataTypes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0B28F1552ABF463A000D44B0 /* DataTypes.swift */; };
- 0B46E8E02AC918CA00BA2A3C /* BurrowIpc.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0B46E8DF2AC918CA00BA2A3C /* BurrowIpc.swift */; };
+ 0B46E8E02AC918CA00BA2A3C /* Client.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0B46E8DF2AC918CA00BA2A3C /* Client.swift */; };
43AA26D82A10004900F14CE6 /* MenuView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43AA26D72A10004900F14CE6 /* MenuView.swift */; };
+ D00117312B2FFFC900D87C25 /* NWConnection+Async.swift in Sources */ = {isa = PBXBuildFile; fileRef = D00117302B2FFFC900D87C25 /* NWConnection+Async.swift */; };
+ D00117332B3001A400D87C25 /* NewlineProtocolFramer.swift in Sources */ = {isa = PBXBuildFile; fileRef = D00117322B3001A400D87C25 /* NewlineProtocolFramer.swift */; };
+ D001173B2B30341C00D87C25 /* Logging.swift in Sources */ = {isa = PBXBuildFile; fileRef = D001173A2B30341C00D87C25 /* Logging.swift */; };
+ D00117442B30372900D87C25 /* libBurrowShared.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D00117382B30341C00D87C25 /* libBurrowShared.a */; };
+ D00117452B30372C00D87C25 /* libBurrowShared.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D00117382B30341C00D87C25 /* libBurrowShared.a */; };
D00AA8972A4669BC005C8102 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = D00AA8962A4669BC005C8102 /* AppDelegate.swift */; };
D020F65829E4A697002790F6 /* PacketTunnelProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = D020F65729E4A697002790F6 /* PacketTunnelProvider.swift */; };
D020F65D29E4A697002790F6 /* BurrowNetworkExtension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = D020F65329E4A697002790F6 /* BurrowNetworkExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
D05B9F7629E39EEC008CB1F9 /* BurrowApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = D05B9F7529E39EEC008CB1F9 /* BurrowApp.swift */; };
D05B9F7829E39EEC008CB1F9 /* TunnelView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D05B9F7729E39EEC008CB1F9 /* TunnelView.swift */; };
D05B9F7A29E39EED008CB1F9 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D05B9F7929E39EED008CB1F9 /* Assets.xcassets */; };
+ D08252762B5C9FC4005DA378 /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = D08252752B5C9FC4005DA378 /* Constants.swift */; };
D0BCC5FD2A086D4700AD070D /* NetworkExtension+Async.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0BCC5FC2A086D4700AD070D /* NetworkExtension+Async.swift */; };
D0BCC5FF2A086E1C00AD070D /* Status.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0BCC5FE2A086E1C00AD070D /* Status.swift */; };
D0BCC6082A0981FE00AD070D /* Tunnel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0B98FC629FDC5B5004E7149 /* Tunnel.swift */; };
@@ -24,6 +30,20 @@
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
+ D00117462B30373100D87C25 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = D05B9F6A29E39EEC008CB1F9 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = D00117372B30341C00D87C25;
+ remoteInfo = Shared;
+ };
+ D00117482B30373500D87C25 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = D05B9F6A29E39EEC008CB1F9 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = D00117372B30341C00D87C25;
+ remoteInfo = Shared;
+ };
D020F65B29E4A697002790F6 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = D05B9F6A29E39EEC008CB1F9 /* Project object */;
@@ -49,8 +69,14 @@
/* Begin PBXFileReference section */
0B28F1552ABF463A000D44B0 /* DataTypes.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DataTypes.swift; sourceTree = ""; };
- 0B46E8DF2AC918CA00BA2A3C /* BurrowIpc.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BurrowIpc.swift; sourceTree = ""; };
+ 0B46E8DF2AC918CA00BA2A3C /* Client.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Client.swift; sourceTree = ""; };
43AA26D72A10004900F14CE6 /* MenuView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuView.swift; sourceTree = ""; };
+ D00117302B2FFFC900D87C25 /* NWConnection+Async.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NWConnection+Async.swift"; sourceTree = ""; };
+ D00117322B3001A400D87C25 /* NewlineProtocolFramer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewlineProtocolFramer.swift; sourceTree = ""; };
+ D00117382B30341C00D87C25 /* libBurrowShared.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libBurrowShared.a; sourceTree = BUILT_PRODUCTS_DIR; };
+ D001173A2B30341C00D87C25 /* Logging.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Logging.swift; sourceTree = ""; };
+ D00117412B30347800D87C25 /* module.modulemap */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.module-map"; path = module.modulemap; sourceTree = ""; };
+ D00117422B30348D00D87C25 /* Shared.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Shared.xcconfig; sourceTree = ""; };
D00AA8962A4669BC005C8102 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
D020F63D29E4A1FF002790F6 /* Identity.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Identity.xcconfig; sourceTree = ""; };
D020F64029E4A1FF002790F6 /* Compiler.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Compiler.xcconfig; sourceTree = ""; };
@@ -70,6 +96,8 @@
D05B9F7529E39EEC008CB1F9 /* BurrowApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BurrowApp.swift; sourceTree = ""; };
D05B9F7729E39EEC008CB1F9 /* TunnelView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TunnelView.swift; sourceTree = ""; };
D05B9F7929E39EED008CB1F9 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
+ D08252742B5C9DEB005DA378 /* Constants.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Constants.h; sourceTree = ""; };
+ D08252752B5C9FC4005DA378 /* Constants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constants.swift; sourceTree = ""; };
D0B98FBF29FD8072004E7149 /* build-rust.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = "build-rust.sh"; sourceTree = ""; };
D0B98FC629FDC5B5004E7149 /* Tunnel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tunnel.swift; sourceTree = ""; };
D0B98FD829FDDB6F004E7149 /* libburrow.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = libburrow.h; sourceTree = ""; };
@@ -80,10 +108,18 @@
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
+ D00117352B30341C00D87C25 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
D020F65029E4A697002790F6 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ D00117442B30372900D87C25 /* libBurrowShared.a in Frameworks */,
D0BCC6092A09A03E00AD070D /* libburrow.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -92,6 +128,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ D00117452B30372C00D87C25 /* libBurrowShared.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -106,6 +143,33 @@
path = Menu;
sourceTree = "";
};
+ D00117392B30341C00D87C25 /* Shared */ = {
+ isa = PBXGroup;
+ children = (
+ D001173A2B30341C00D87C25 /* Logging.swift */,
+ D08252752B5C9FC4005DA378 /* Constants.swift */,
+ D00117422B30348D00D87C25 /* Shared.xcconfig */,
+ D001173F2B30347800D87C25 /* Constants */,
+ );
+ path = Shared;
+ sourceTree = "";
+ };
+ D001173F2B30347800D87C25 /* Constants */ = {
+ isa = PBXGroup;
+ children = (
+ D08252742B5C9DEB005DA378 /* Constants.h */,
+ D00117412B30347800D87C25 /* module.modulemap */,
+ );
+ path = Constants;
+ sourceTree = "";
+ };
+ D00117432B30372900D87C25 /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ );
+ name = Frameworks;
+ sourceTree = "";
+ };
D020F63C29E4A1FF002790F6 /* Configuration */ = {
isa = PBXGroup;
children = (
@@ -122,12 +186,14 @@
isa = PBXGroup;
children = (
D020F65729E4A697002790F6 /* PacketTunnelProvider.swift */,
+ 0B46E8DF2AC918CA00BA2A3C /* Client.swift */,
+ 0B28F1552ABF463A000D44B0 /* DataTypes.swift */,
+ D00117322B3001A400D87C25 /* NewlineProtocolFramer.swift */,
+ D00117302B2FFFC900D87C25 /* NWConnection+Async.swift */,
D020F65929E4A697002790F6 /* Info.plist */,
D020F66729E4A95D002790F6 /* NetworkExtension-iOS.entitlements */,
D020F66629E4A95D002790F6 /* NetworkExtension-macOS.entitlements */,
D020F66229E4A6E5002790F6 /* NetworkExtension.xcconfig */,
- 0B28F1552ABF463A000D44B0 /* DataTypes.swift */,
- 0B46E8DF2AC918CA00BA2A3C /* BurrowIpc.swift */,
D0B98FD729FDDB57004E7149 /* libburrow */,
);
path = NetworkExtension;
@@ -138,8 +204,10 @@
children = (
D05B9F7429E39EEC008CB1F9 /* App */,
D020F65629E4A697002790F6 /* NetworkExtension */,
+ D00117392B30341C00D87C25 /* Shared */,
D020F63C29E4A1FF002790F6 /* Configuration */,
D05B9F7329E39EEC008CB1F9 /* Products */,
+ D00117432B30372900D87C25 /* Frameworks */,
);
sourceTree = "";
};
@@ -148,6 +216,7 @@
children = (
D05B9F7229E39EEC008CB1F9 /* Burrow.app */,
D020F65329E4A697002790F6 /* BurrowNetworkExtension.appex */,
+ D00117382B30341C00D87C25 /* libBurrowShared.a */,
);
name = Products;
sourceTree = "";
@@ -184,6 +253,23 @@
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
+ D00117372B30341C00D87C25 /* Shared */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = D001173C2B30341C00D87C25 /* Build configuration list for PBXNativeTarget "Shared" */;
+ buildPhases = (
+ D00117342B30341C00D87C25 /* Sources */,
+ D00117352B30341C00D87C25 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ D082527D2B5DEB80005DA378 /* PBXTargetDependency */,
+ );
+ name = Shared;
+ productName = Shared;
+ productReference = D00117382B30341C00D87C25 /* libBurrowShared.a */;
+ productType = "com.apple.product-type.library.static";
+ };
D020F65229E4A697002790F6 /* NetworkExtension */ = {
isa = PBXNativeTarget;
buildConfigurationList = D020F65E29E4A697002790F6 /* Build configuration list for PBXNativeTarget "NetworkExtension" */;
@@ -196,7 +282,8 @@
buildRules = (
);
dependencies = (
- D08252712B5C3E2E005DA378 /* PBXTargetDependency */,
+ D08252792B5DEB78005DA378 /* PBXTargetDependency */,
+ D00117492B30373500D87C25 /* PBXTargetDependency */,
);
name = NetworkExtension;
productName = BurrowNetworkExtension;
@@ -215,7 +302,8 @@
buildRules = (
);
dependencies = (
- D08252732B5C3E33005DA378 /* PBXTargetDependency */,
+ D082527B2B5DEB7D005DA378 /* PBXTargetDependency */,
+ D00117472B30373100D87C25 /* PBXTargetDependency */,
D020F65C29E4A697002790F6 /* PBXTargetDependency */,
);
name = App;
@@ -230,9 +318,12 @@
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = 1;
- LastSwiftUpdateCheck = 1430;
- LastUpgradeCheck = 1510;
+ LastSwiftUpdateCheck = 1510;
+ LastUpgradeCheck = 1430;
TargetAttributes = {
+ D00117372B30341C00D87C25 = {
+ CreatedOnToolsVersion = 15.1;
+ };
D020F65229E4A697002790F6 = {
CreatedOnToolsVersion = 14.3;
};
@@ -251,7 +342,7 @@
);
mainGroup = D05B9F6929E39EEC008CB1F9;
packageReferences = (
- D082526F2B5C3E23005DA378 /* XCRemoteSwiftPackageReference "SwiftLint" */,
+ D08252772B5DEB6E005DA378 /* XCRemoteSwiftPackageReference "SwiftLint" */,
);
productRefGroup = D05B9F7329E39EEC008CB1F9 /* Products */;
projectDirPath = "";
@@ -259,6 +350,7 @@
targets = (
D05B9F7129E39EEC008CB1F9 /* App */,
D020F65229E4A697002790F6 /* NetworkExtension */,
+ D00117372B30341C00D87C25 /* Shared */,
);
};
/* End PBXProject section */
@@ -306,12 +398,23 @@
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
+ D00117342B30341C00D87C25 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ D001173B2B30341C00D87C25 /* Logging.swift in Sources */,
+ D08252762B5C9FC4005DA378 /* Constants.swift in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
D020F64F29E4A697002790F6 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
+ D00117332B3001A400D87C25 /* NewlineProtocolFramer.swift in Sources */,
0B28F1562ABF463A000D44B0 /* DataTypes.swift in Sources */,
- 0B46E8E02AC918CA00BA2A3C /* BurrowIpc.swift in Sources */,
+ D00117312B2FFFC900D87C25 /* NWConnection+Async.swift in Sources */,
+ 0B46E8E02AC918CA00BA2A3C /* Client.swift in Sources */,
D020F65829E4A697002790F6 /* PacketTunnelProvider.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -333,22 +436,50 @@
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
+ D00117472B30373100D87C25 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = D00117372B30341C00D87C25 /* Shared */;
+ targetProxy = D00117462B30373100D87C25 /* PBXContainerItemProxy */;
+ };
+ D00117492B30373500D87C25 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = D00117372B30341C00D87C25 /* Shared */;
+ targetProxy = D00117482B30373500D87C25 /* PBXContainerItemProxy */;
+ };
D020F65C29E4A697002790F6 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = D020F65229E4A697002790F6 /* NetworkExtension */;
targetProxy = D020F65B29E4A697002790F6 /* PBXContainerItemProxy */;
};
- D08252712B5C3E2E005DA378 /* PBXTargetDependency */ = {
+ D08252792B5DEB78005DA378 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
- productRef = D08252702B5C3E2E005DA378 /* SwiftLintPlugin */;
+ productRef = D08252782B5DEB78005DA378 /* SwiftLintPlugin */;
};
- D08252732B5C3E33005DA378 /* PBXTargetDependency */ = {
+ D082527B2B5DEB7D005DA378 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
- productRef = D08252722B5C3E33005DA378 /* SwiftLintPlugin */;
+ productRef = D082527A2B5DEB7D005DA378 /* SwiftLintPlugin */;
+ };
+ D082527D2B5DEB80005DA378 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ productRef = D082527C2B5DEB80005DA378 /* SwiftLintPlugin */;
};
/* End PBXTargetDependency section */
/* Begin XCBuildConfiguration section */
+ D001173D2B30341C00D87C25 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = D00117422B30348D00D87C25 /* Shared.xcconfig */;
+ buildSettings = {
+ };
+ name = Debug;
+ };
+ D001173E2B30341C00D87C25 /* Release */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = D00117422B30348D00D87C25 /* Shared.xcconfig */;
+ buildSettings = {
+ };
+ name = Release;
+ };
D020F65F29E4A697002790F6 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = D020F66229E4A6E5002790F6 /* NetworkExtension.xcconfig */;
@@ -394,6 +525,15 @@
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
+ D001173C2B30341C00D87C25 /* Build configuration list for PBXNativeTarget "Shared" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ D001173D2B30341C00D87C25 /* Debug */,
+ D001173E2B30341C00D87C25 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
D020F65E29E4A697002790F6 /* Build configuration list for PBXNativeTarget "NetworkExtension" */ = {
isa = XCConfigurationList;
buildConfigurations = (
@@ -424,7 +564,7 @@
/* End XCConfigurationList section */
/* Begin XCRemoteSwiftPackageReference section */
- D082526F2B5C3E23005DA378 /* XCRemoteSwiftPackageReference "SwiftLint" */ = {
+ D08252772B5DEB6E005DA378 /* XCRemoteSwiftPackageReference "SwiftLint" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/realm/SwiftLint.git";
requirement = {
@@ -435,14 +575,19 @@
/* End XCRemoteSwiftPackageReference section */
/* Begin XCSwiftPackageProductDependency section */
- D08252702B5C3E2E005DA378 /* SwiftLintPlugin */ = {
+ D08252782B5DEB78005DA378 /* SwiftLintPlugin */ = {
isa = XCSwiftPackageProductDependency;
- package = D082526F2B5C3E23005DA378 /* XCRemoteSwiftPackageReference "SwiftLint" */;
+ package = D08252772B5DEB6E005DA378 /* XCRemoteSwiftPackageReference "SwiftLint" */;
productName = "plugin:SwiftLintPlugin";
};
- D08252722B5C3E33005DA378 /* SwiftLintPlugin */ = {
+ D082527A2B5DEB7D005DA378 /* SwiftLintPlugin */ = {
isa = XCSwiftPackageProductDependency;
- package = D082526F2B5C3E23005DA378 /* XCRemoteSwiftPackageReference "SwiftLint" */;
+ package = D08252772B5DEB6E005DA378 /* XCRemoteSwiftPackageReference "SwiftLint" */;
+ productName = "plugin:SwiftLintPlugin";
+ };
+ D082527C2B5DEB80005DA378 /* SwiftLintPlugin */ = {
+ isa = XCSwiftPackageProductDependency;
+ package = D08252772B5DEB6E005DA378 /* XCRemoteSwiftPackageReference "SwiftLint" */;
productName = "plugin:SwiftLintPlugin";
};
/* End XCSwiftPackageProductDependency section */
diff --git a/Apple/Configuration/App.xcconfig b/Apple/Configuration/App.xcconfig
index f536e9d..8448773 100644
--- a/Apple/Configuration/App.xcconfig
+++ b/Apple/Configuration/App.xcconfig
@@ -1,5 +1,5 @@
-
SKIP_INSTALL = NO
+MERGED_BINARY_TYPE = manual
LD_RUNPATH_SEARCH_PATHS[sdk=iphone*] = $(inherited) @executable_path/Frameworks
LD_RUNPATH_SEARCH_PATHS[sdk=macosx*] = $(inherited) @executable_path/../Frameworks
diff --git a/Apple/Configuration/Compiler.xcconfig b/Apple/Configuration/Compiler.xcconfig
index 36a451d..aa486a7 100644
--- a/Apple/Configuration/Compiler.xcconfig
+++ b/Apple/Configuration/Compiler.xcconfig
@@ -21,7 +21,7 @@ CODE_SIGN_IDENTITY = Apple Development
INFOPLIST_FILE = Configuration/Info.plist
GENERATE_INFOPLIST_FILE = YES
-INFOPLIST_KEY_NSHumanReadableCopyright = Copyright © 2023 Hack Club
+INFOPLIST_KEY_NSHumanReadableCopyright = Copyright © 2023-2024 Hack Club
INFOPLIST_KEY_CFBundleDisplayName = Burrow
ENABLE_BITCODE = NO
diff --git a/Apple/Configuration/Extension.xcconfig b/Apple/Configuration/Extension.xcconfig
index dfe9f5c..f8d90a3 100644
--- a/Apple/Configuration/Extension.xcconfig
+++ b/Apple/Configuration/Extension.xcconfig
@@ -1,2 +1,4 @@
+MERGED_BINARY_TYPE = manual
+
LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/Frameworks @executable_path/../../Frameworks
LD_RUNPATH_SEARCH_PATHS[sdk=macos*] = $(inherited) @executable_path/../Frameworks @executable_path/../../../../Frameworks
diff --git a/Apple/NetworkExtension/BurrowIpc.swift b/Apple/NetworkExtension/BurrowIpc.swift
deleted file mode 100644
index 279cdf1..0000000
--- a/Apple/NetworkExtension/BurrowIpc.swift
+++ /dev/null
@@ -1,133 +0,0 @@
-import Foundation
-import Network
-import os
-
-final class LineProtocol: NWProtocolFramerImplementation {
- static let definition = NWProtocolFramer.Definition(implementation: LineProtocol.self)
- static let label = "Lines"
- init(framer: NWProtocolFramer.Instance) { }
- func start(framer: NWProtocolFramer.Instance) -> NWProtocolFramer.StartResult { .ready }
- func stop(framer: NWProtocolFramer.Instance) -> Bool { true }
- func wakeup(framer: NWProtocolFramer.Instance) { }
- func cleanup(framer: NWProtocolFramer.Instance) { }
- func lines(from buffer: UnsafeMutableRawBufferPointer?) -> (lines: [Data], size: Int)? {
- guard let buffer = buffer else { return nil }
- let lines = buffer
- .split(separator: 10)
- guard !lines.isEmpty else { return nil }
- let size = lines
- .lazy
- .map(\.count)
- .reduce(0, +) + lines.count
- let strings = lines
- .lazy
- .map { Data($0) }
- return (lines: Array(strings), size: size)
- }
- func handleInput(framer: NWProtocolFramer.Instance) -> Int {
- var result: [Data] = []
- _ = framer.parseInput(minimumIncompleteLength: 1, maximumLength: 16_000) { buffer, _ in
- guard let (lines, size) = lines(from: buffer) else {
- return 0
- }
- result = lines
- return size
- }
- for line in result {
- framer.deliverInput(data: line, message: .init(instance: framer), isComplete: true)
- }
- return 0
- }
- func handleOutput(
- framer: NWProtocolFramer.Instance,
- message: NWProtocolFramer.Message,
- messageLength: Int,
- isComplete: Bool
- ) {
- do {
- try framer.writeOutputNoCopy(length: messageLength)
- } catch {
- }
- }
-}
-
-extension NWConnection {
- func receiveMessage() async throws -> (Data?, NWConnection.ContentContext?, Bool) {
- try await withUnsafeThrowingContinuation { continuation in
- receiveMessage { completeContent, contentContext, isComplete, error in
- if let error = error {
- continuation.resume(throwing: error)
- }
- continuation.resume(returning: (completeContent, contentContext, isComplete))
- }
- }
- }
- func send_raw(_ request: Data) async throws -> Data {
- try await withCheckedThrowingContinuation { continuation in
- let comp: NWConnection.SendCompletion = .contentProcessed {error in
- if let error = error {
- continuation.resume(with: .failure(error))
- } else {
- continuation.resume(with: .success(request))
- }
- }
- self.send(content: request, completion: comp)
- }
- }
-}
-
-final class BurrowIpc {
- let connection: NWConnection
- private var generator = SystemRandomNumberGenerator()
- private var logger: Logger
- init(logger: Logger) {
- let params = NWParameters.tcp
- params.defaultProtocolStack
- .applicationProtocols
- .insert(NWProtocolFramer.Options(definition: LineProtocol.definition), at: 0)
- let connection = NWConnection(to: .unix(path: "burrow.sock"), using: params)
- connection.start(queue: .global())
- self.connection = connection
- self.logger = logger
- }
- func send(_ request: T) async throws -> U {
- do {
- let id: UInt = generator.next(upperBound: UInt.max)
- var copy = request
- copy.id = id
- var data = try JSONEncoder().encode(request)
- data.append(contentsOf: [10])
- _ = try await self.connection.send_raw(data)
- return try JSONDecoder().decode(Response.self, from: data).result
- } catch {
- throw error
- }
- }
-
- func receive_raw() async throws -> Data {
- let (completeContent, _, _) = try await connection.receiveMessage()
- self.logger.info("Received raw message response")
- guard let data = completeContent else {
- throw BurrowError.resultIsNone
- }
- return data
- }
-
- func request(_ request: any Request, type: U.Type) async throws -> U {
- do {
- var data: Data = try JSONEncoder().encode(request)
- data.append(contentsOf: [10])
- _ = try await self.connection.send_raw(data)
- self.logger.debug("message sent")
- let receivedData = try await receive_raw()
- self.logger.info("Received result: \(String(decoding: receivedData, as: UTF8.self))")
- return try self.parse_response(receivedData)
- } catch {
- throw error
- }
- }
-
- func parse_response(_ response: Data) throws -> U {
- try JSONDecoder().decode(U.self, from: response)
- }
-}
diff --git a/Apple/NetworkExtension/Client.swift b/Apple/NetworkExtension/Client.swift
new file mode 100644
index 0000000..a924c29
--- /dev/null
+++ b/Apple/NetworkExtension/Client.swift
@@ -0,0 +1,60 @@
+import BurrowShared
+import Foundation
+import Network
+
+final class Client {
+ let connection: NWConnection
+
+ private let logger: Logger = Logger.logger(for: Client.self)
+ private var generator = SystemRandomNumberGenerator()
+
+ convenience init() throws {
+ self.init(url: try Constants.socketURL)
+ }
+
+ init(url: URL) {
+ let endpoint: NWEndpoint
+ if url.isFileURL {
+ endpoint = .unix(path: url.path(percentEncoded: false))
+ } else {
+ endpoint = .url(url)
+ }
+
+ let parameters = NWParameters.tcp
+ parameters.defaultProtocolStack
+ .applicationProtocols
+ .insert(NWProtocolFramer.Options(definition: NewlineProtocolFramer.definition), at: 0)
+ connection = NWConnection(to: endpoint, using: parameters)
+ connection.start(queue: .global())
+ }
+
+ func request(_ request: any Request, type: U.Type = U.self) async throws -> U {
+ do {
+ var copy = request
+ copy.id = generator.next(upperBound: UInt.max)
+ let content = try JSONEncoder().encode(copy)
+ logger.debug("> \(String(decoding: content, as: UTF8.self))")
+
+ try await self.connection.send(content: content)
+ let (response, _, _) = try await connection.receiveMessage()
+
+ logger.debug("< \(String(decoding: response, as: UTF8.self))")
+ return try JSONDecoder().decode(U.self, from: response)
+ } catch {
+ logger.error("\(error, privacy: .public)")
+ throw error
+ }
+ }
+
+ deinit {
+ connection.cancel()
+ }
+}
+
+extension Constants {
+ static var socketURL: URL {
+ get throws {
+ try groupContainerURL.appending(component: "burrow.sock", directoryHint: .notDirectory)
+ }
+ }
+}
diff --git a/Apple/NetworkExtension/DataTypes.swift b/Apple/NetworkExtension/DataTypes.swift
index 5d73805..391bfed 100644
--- a/Apple/NetworkExtension/DataTypes.swift
+++ b/Apple/NetworkExtension/DataTypes.swift
@@ -8,10 +8,11 @@ enum BurrowError: Error {
case resultIsNone
}
-protocol Request: Codable where CommandT: Codable {
- associatedtype CommandT
+protocol Request: Codable where Command: Codable {
+ associatedtype Command
+
var id: UInt { get set }
- var command: CommandT { get set }
+ var command: Command { get set }
}
struct BurrowSingleCommand: Request {
@@ -38,13 +39,6 @@ struct BurrowStartRequest: Codable {
let Start: StartOptions
}
-func start_req_fd(id: UInt) -> BurrowRequest {
- let command = BurrowStartRequest(Start: BurrowStartRequest.StartOptions(
- tun: BurrowStartRequest.TunOptions(name: nil, no_pi: false, tun_excl: false, tun_retrieve: true, address: nil)
- ))
- return BurrowRequest(id: id, command: command)
-}
-
struct Response: Decodable where T: Decodable {
var id: UInt
var result: T
diff --git a/Apple/NetworkExtension/NWConnection+Async.swift b/Apple/NetworkExtension/NWConnection+Async.swift
new file mode 100644
index 0000000..c21fdc0
--- /dev/null
+++ b/Apple/NetworkExtension/NWConnection+Async.swift
@@ -0,0 +1,32 @@
+import Foundation
+import Network
+
+extension NWConnection {
+ // swiftlint:disable:next large_tuple
+ func receiveMessage() async throws -> (Data, NWConnection.ContentContext?, Bool) {
+ try await withUnsafeThrowingContinuation { continuation in
+ receiveMessage { completeContent, contentContext, isComplete, error in
+ if let error {
+ continuation.resume(throwing: error)
+ } else {
+ guard let completeContent = completeContent else {
+ fatalError("Both error and completeContent were nil")
+ }
+ continuation.resume(returning: (completeContent, contentContext, isComplete))
+ }
+ }
+ }
+ }
+
+ func send(content: Data) async throws {
+ try await withCheckedThrowingContinuation { (continuation: CheckedContinuation) in
+ send(content: content, completion: .contentProcessed { error in
+ if let error {
+ continuation.resume(throwing: error)
+ } else {
+ continuation.resume(returning: ())
+ }
+ })
+ }
+ }
+}
diff --git a/Apple/NetworkExtension/NetworkExtension-macOS.entitlements b/Apple/NetworkExtension/NetworkExtension-macOS.entitlements
index edb3f26..63efcfc 100644
--- a/Apple/NetworkExtension/NetworkExtension-macOS.entitlements
+++ b/Apple/NetworkExtension/NetworkExtension-macOS.entitlements
@@ -2,17 +2,19 @@
- com.apple.security.network.client
-
- com.apple.security.network.server
-
com.apple.developer.networking.networkextension
packet-tunnel-provider
+ com.apple.security.app-sandbox
+
com.apple.security.application-groups
$(APP_GROUP_IDENTIFIER)
+ com.apple.security.network.client
+
+ com.apple.security.network.server
+
diff --git a/Apple/NetworkExtension/NetworkExtension.xcconfig b/Apple/NetworkExtension/NetworkExtension.xcconfig
index 3b94990..35c7198 100644
--- a/Apple/NetworkExtension/NetworkExtension.xcconfig
+++ b/Apple/NetworkExtension/NetworkExtension.xcconfig
@@ -6,6 +6,6 @@ PRODUCT_BUNDLE_IDENTIFIER = $(NETWORK_EXTENSION_BUNDLE_IDENTIFIER)
INFOPLIST_FILE = NetworkExtension/Info.plist
CODE_SIGN_ENTITLEMENTS = NetworkExtension/NetworkExtension-iOS.entitlements
-CODE_SIGN_ENTITLEMENTS[sdk=macos*] = NetworkExtension/NetworkExtension-macOS.entitlements
+CODE_SIGN_ENTITLEMENTS[sdk=macosx*] = NetworkExtension/NetworkExtension-macOS.entitlements
SWIFT_INCLUDE_PATHS = $(inherited) $(PROJECT_DIR)/NetworkExtension
diff --git a/Apple/NetworkExtension/NewlineProtocolFramer.swift b/Apple/NetworkExtension/NewlineProtocolFramer.swift
new file mode 100644
index 0000000..d2f71e5
--- /dev/null
+++ b/Apple/NetworkExtension/NewlineProtocolFramer.swift
@@ -0,0 +1,54 @@
+import Foundation
+import Network
+
+final class NewlineProtocolFramer: NWProtocolFramerImplementation {
+ private static let delimeter: UInt8 = 10 // `\n`
+
+ static let definition = NWProtocolFramer.Definition(implementation: NewlineProtocolFramer.self)
+ static let label = "Lines"
+
+ init(framer: NWProtocolFramer.Instance) { }
+
+ func start(framer: NWProtocolFramer.Instance) -> NWProtocolFramer.StartResult { .ready }
+ func stop(framer: NWProtocolFramer.Instance) -> Bool { true }
+
+ func wakeup(framer: NWProtocolFramer.Instance) { }
+ func cleanup(framer: NWProtocolFramer.Instance) { }
+
+ func handleInput(framer: NWProtocolFramer.Instance) -> Int {
+ while true {
+ var result: [Data] = []
+ let parsed = framer.parseInput(minimumIncompleteLength: 1, maximumLength: 16_000) { buffer, _ in
+ guard let buffer else { return 0 }
+ var lines = buffer
+ .split(separator: Self.delimeter, omittingEmptySubsequences: false)
+ .map { Data($0) }
+ guard lines.count > 1 else { return 0 }
+ _ = lines.popLast()
+
+ result = lines
+ return lines.reduce(lines.count) { $0 + $1.count }
+ }
+
+ guard parsed && !result.isEmpty else { break }
+
+ for line in result {
+ framer.deliverInput(data: line, message: .init(instance: framer), isComplete: true)
+ }
+ }
+ return 0
+ }
+
+ func handleOutput(
+ framer: NWProtocolFramer.Instance,
+ message: NWProtocolFramer.Message,
+ messageLength: Int,
+ isComplete: Bool
+ ) {
+ do {
+ try framer.writeOutputNoCopy(length: messageLength)
+ framer.writeOutput(data: [Self.delimeter])
+ } catch {
+ }
+ }
+}
diff --git a/Apple/NetworkExtension/PacketTunnelProvider.swift b/Apple/NetworkExtension/PacketTunnelProvider.swift
index 19fa760..9231676 100644
--- a/Apple/NetworkExtension/PacketTunnelProvider.swift
+++ b/Apple/NetworkExtension/PacketTunnelProvider.swift
@@ -1,51 +1,49 @@
+import BurrowShared
import libburrow
import NetworkExtension
import os
class PacketTunnelProvider: NEPacketTunnelProvider {
- let logger = Logger(subsystem: "com.hackclub.burrow", category: "frontend")
- var client: BurrowIpc?
- var osInitialized = false
+ private let logger = Logger.logger(for: PacketTunnelProvider.self)
+
override func startTunnel(options: [String: NSObject]? = nil) async throws {
- logger.log("Starting tunnel")
- if !osInitialized {
- libburrow.initialize_oslog()
- osInitialized = true
- }
- libburrow.start_srv()
- client = BurrowIpc(logger: logger)
- logger.info("Started server")
do {
- let command = BurrowSingleCommand(id: 0, command: "ServerConfig")
- guard let data = try await client?.request(command, type: Response>.self)
- else {
- throw BurrowError.cantParseResult
- }
+ libburrow.spawnInProcess(socketPath: try Constants.socketURL.path)
+
+ let client = try Client()
+
+ let command = BurrowRequest(id: 0, command: "ServerConfig")
+ let data = try await client.request(command, type: Response>.self)
+
let encoded = try JSONEncoder().encode(data.result)
self.logger.log("Received final data: \(String(decoding: encoded, as: UTF8.self))")
guard let serverconfig = data.result.Ok else {
throw BurrowError.resultIsError
}
- guard let tunNs = self.generateTunSettings(from: serverconfig) else {
+ guard let tunNs = generateTunSettings(from: serverconfig) else {
throw BurrowError.addrDoesntExist
}
try await self.setTunnelNetworkSettings(tunNs)
self.logger.info("Set remote tunnel address to \(tunNs.tunnelRemoteAddress)")
- // let tunFd = self.packetFlow.value(forKeyPath: "socket.fileDescriptor") as! Int;
- // self.logger.info("Found File Descriptor: \(tunFd)")
- let startCommand = start_req_fd(id: 1)
- guard let data = try await client?.request(startCommand, type: Response>.self)
- else {
- throw BurrowError.cantParseResult
- }
- let encodedStartRes = try JSONEncoder().encode(data.result)
- self.logger.log("Received start server response: \(String(decoding: encodedStartRes, as: UTF8.self))")
+ let startRequest = BurrowRequest(
+ id: .random(in: (.min)..<(.max)),
+ command: BurrowStartRequest(
+ Start: BurrowStartRequest.StartOptions(
+ tun: BurrowStartRequest.TunOptions(
+ name: nil, no_pi: false, tun_excl: false, tun_retrieve: true, address: nil
+ )
+ )
+ )
+ )
+ let response = try await client.request(startRequest, type: Response>.self)
+ self.logger.log("Received start server response: \(String(describing: response.result))")
} catch {
- self.logger.error("An error occurred: \(error)")
+ self.logger.error("Failed to start tunnel: \(error)")
throw error
}
}
+
private func generateTunSettings(from: ServerConfigData) -> NETunnelNetworkSettings? {
let cfig = from.ServerConfig
guard let addr = cfig.address else {
@@ -57,13 +55,4 @@ class PacketTunnelProvider: NEPacketTunnelProvider {
logger.log("Initialized ipv4 settings: \(nst.ipv4Settings)")
return nst
}
- override func stopTunnel(with reason: NEProviderStopReason) async {
- }
- override func handleAppMessage(_ messageData: Data) async -> Data? {
- messageData
- }
- override func sleep() async {
- }
- override func wake() {
- }
}
diff --git a/Apple/NetworkExtension/libburrow/libburrow.h b/Apple/NetworkExtension/libburrow/libburrow.h
index 32d1d3b..e500de4 100644
--- a/Apple/NetworkExtension/libburrow/libburrow.h
+++ b/Apple/NetworkExtension/libburrow/libburrow.h
@@ -1,2 +1,2 @@
-void start_srv();
-void initialize_oslog();
+__attribute__((__swift_name__("spawnInProcess(socketPath:)")))
+extern void spawn_in_process(const char * __nullable path);
diff --git a/Apple/Shared/Constants.swift b/Apple/Shared/Constants.swift
new file mode 100644
index 0000000..cb56cb3
--- /dev/null
+++ b/Apple/Shared/Constants.swift
@@ -0,0 +1,22 @@
+@_implementationOnly import Constants
+
+public enum Constants {
+ enum Error: Swift.Error {
+ case invalidAppGroupIdentifier
+ }
+
+ public static let bundleIdentifier = AppBundleIdentifier
+ public static let appGroupIdentifier = AppGroupIdentifier
+
+ public static var groupContainerURL: URL {
+ get throws { try _groupContainerURL.get() }
+ }
+
+ private static let _groupContainerURL: Result = {
+ guard let groupContainerURL = FileManager.default
+ .containerURL(forSecurityApplicationGroupIdentifier: appGroupIdentifier) else {
+ return .failure(.invalidAppGroupIdentifier)
+ }
+ return .success(groupContainerURL)
+ }()
+}
diff --git a/Apple/Shared/Constants/Constants.h b/Apple/Shared/Constants/Constants.h
new file mode 100644
index 0000000..09806c5
--- /dev/null
+++ b/Apple/Shared/Constants/Constants.h
@@ -0,0 +1,11 @@
+#import
+
+#define MACRO_STRING_(m) #m
+#define MACRO_STRING(m) @MACRO_STRING_(m)
+
+NS_ASSUME_NONNULL_BEGIN
+
+static NSString * const AppBundleIdentifier = MACRO_STRING(APP_BUNDLE_IDENTIFIER);
+static NSString * const AppGroupIdentifier = MACRO_STRING(APP_GROUP_IDENTIFIER);
+
+NS_ASSUME_NONNULL_END
diff --git a/Apple/Shared/Constants/module.modulemap b/Apple/Shared/Constants/module.modulemap
new file mode 100644
index 0000000..7ee21fc
--- /dev/null
+++ b/Apple/Shared/Constants/module.modulemap
@@ -0,0 +1,4 @@
+module Constants {
+ header "Constants.h"
+ export *
+}
diff --git a/Apple/Shared/Logging.swift b/Apple/Shared/Logging.swift
new file mode 100644
index 0000000..36f024c
--- /dev/null
+++ b/Apple/Shared/Logging.swift
@@ -0,0 +1,19 @@
+import os
+@_exported import OSLog
+
+extension Logger {
+ private static let loggers: OSAllocatedUnfairLock<[String: Logger]> = OSAllocatedUnfairLock(initialState: [:])
+
+ public static let subsystem = Constants.bundleIdentifier
+
+ public static func logger(for type: Any.Type) -> Logger {
+ let category = String(describing: type)
+ let logger = loggers.withLock { loggers in
+ if let logger = loggers[category] { return logger }
+ let logger = Logger(subsystem: subsystem, category: category)
+ loggers[category] = logger
+ return logger
+ }
+ return logger
+ }
+}
diff --git a/Apple/Shared/Shared.xcconfig b/Apple/Shared/Shared.xcconfig
new file mode 100644
index 0000000..50718bd
--- /dev/null
+++ b/Apple/Shared/Shared.xcconfig
@@ -0,0 +1,5 @@
+PRODUCT_NAME = BurrowShared
+MERGEABLE_LIBRARY = YES
+
+SWIFT_INCLUDE_PATHS = $(PROJECT_DIR)/Shared/Constants
+GCC_PREPROCESSOR_DEFINITIONS = APP_BUNDLE_IDENTIFIER=$(APP_BUNDLE_IDENTIFIER) APP_GROUP_IDENTIFIER=$(APP_GROUP_IDENTIFIER)
diff --git a/Cargo.lock b/Cargo.lock
index 7399bd5..85f11e7 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4,9 +4,9 @@ version = 3
[[package]]
name = "addr2line"
-version = "0.20.0"
+version = "0.21.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f4fa78e18c64fce05e902adecd7a5eed15a5e0a3439f7b0e169f0252214865e3"
+checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb"
dependencies = [
"gimli",
]
@@ -40,73 +40,66 @@ dependencies = [
[[package]]
name = "aho-corasick"
-version = "1.0.2"
+version = "1.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41"
+checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0"
dependencies = [
"memchr",
]
[[package]]
name = "anstream"
-version = "0.3.2"
+version = "0.6.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163"
+checksum = "6e2e1ebcb11de5c03c67de28a7df593d32191b44939c482e97702baaaa6ab6a5"
dependencies = [
"anstyle",
"anstyle-parse",
"anstyle-query",
"anstyle-wincon",
"colorchoice",
- "is-terminal",
"utf8parse",
]
[[package]]
name = "anstyle"
-version = "1.0.1"
+version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd"
+checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87"
[[package]]
name = "anstyle-parse"
-version = "0.2.1"
+version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333"
+checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c"
dependencies = [
"utf8parse",
]
[[package]]
name = "anstyle-query"
-version = "1.0.0"
+version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b"
+checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648"
dependencies = [
- "windows-sys 0.48.0",
+ "windows-sys 0.52.0",
]
[[package]]
name = "anstyle-wincon"
-version = "1.0.1"
+version = "3.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188"
+checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7"
dependencies = [
"anstyle",
- "windows-sys 0.48.0",
+ "windows-sys 0.52.0",
]
[[package]]
name = "anyhow"
-version = "1.0.71"
+version = "1.0.79"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8"
-
-[[package]]
-name = "arrayvec"
-version = "0.7.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711"
+checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca"
[[package]]
name = "async-channel"
@@ -140,18 +133,18 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.39",
+ "syn 2.0.48",
]
[[package]]
name = "async-trait"
-version = "0.1.76"
+version = "0.1.77"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "531b97fb4cd3dfdce92c35dedbfdc1f0b9d8091c8ca943d6dae340ef5012d514"
+checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.39",
+ "syn 2.0.48",
]
[[package]]
@@ -207,9 +200,9 @@ dependencies = [
[[package]]
name = "backtrace"
-version = "0.3.68"
+version = "0.3.69"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4319208da049c43661739c5fade2ba182f09d1dc2299b32298d3a31692b17e12"
+checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837"
dependencies = [
"addr2line",
"cc",
@@ -222,9 +215,9 @@ dependencies = [
[[package]]
name = "base64"
-version = "0.21.5"
+version = "0.21.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9"
+checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567"
[[package]]
name = "base64ct"
@@ -273,7 +266,7 @@ dependencies = [
"regex",
"rustc-hash",
"shlex",
- "syn 2.0.39",
+ "syn 2.0.48",
"which",
]
@@ -285,9 +278,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]]
name = "bitflags"
-version = "2.3.3"
+version = "2.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42"
+checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf"
[[package]]
name = "blake2"
@@ -309,9 +302,9 @@ dependencies = [
[[package]]
name = "bumpalo"
-version = "3.13.0"
+version = "3.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1"
+checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec"
[[package]]
name = "burrow"
@@ -325,19 +318,18 @@ dependencies = [
"caps",
"chacha20poly1305",
"clap",
+ "console",
"console-subscriber",
- "env_logger",
- "etherparse",
"fehler",
"futures",
"hmac",
"insta",
"ip_network",
"ip_network_table",
- "ipnet",
"libsystemd",
"log",
- "nix",
+ "nix 0.27.1",
+ "once_cell",
"parking_lot",
"rand",
"rand_core",
@@ -348,25 +340,24 @@ dependencies = [
"tokio",
"tracing",
"tracing-journald",
- "tracing-log",
+ "tracing-log 0.1.4",
"tracing-oslog",
"tracing-subscriber",
"tun",
- "uuid",
"x25519-dalek",
]
[[package]]
name = "byteorder"
-version = "1.4.3"
+version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610"
+checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
[[package]]
name = "bytes"
-version = "1.4.0"
+version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be"
+checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223"
[[package]]
name = "bzip2"
@@ -461,31 +452,30 @@ dependencies = [
[[package]]
name = "clang-sys"
-version = "1.6.1"
+version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c688fc74432808e3eb684cae8830a86be1d66a2bd58e1f248ed0960a590baf6f"
+checksum = "67523a3b4be3ce1989d607a828d036249522dd9c1c8de7f4dd2dae43a37369d1"
dependencies = [
"glob",
"libc",
- "libloading",
+ "libloading 0.8.1",
]
[[package]]
name = "clap"
-version = "4.3.10"
+version = "4.4.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "384e169cc618c613d5e3ca6404dda77a8685a63e08660dcc64abaf7da7cb0c7a"
+checksum = "1e578d6ec4194633722ccf9544794b71b1385c3c027efe0c55db226fc880865c"
dependencies = [
"clap_builder",
"clap_derive",
- "once_cell",
]
[[package]]
name = "clap_builder"
-version = "4.3.10"
+version = "4.4.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ef137bbe35aab78bdb468ccfba75a5f4d8321ae011d34063770780545176af2d"
+checksum = "4df4df40ec50c46000231c914968278b1eb05098cf8f1b3a518a95030e71d1c7"
dependencies = [
"anstream",
"anstyle",
@@ -495,21 +485,21 @@ dependencies = [
[[package]]
name = "clap_derive"
-version = "4.3.2"
+version = "4.4.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b8cd2b2a819ad6eec39e8f1d6b53001af1e5469f8c177579cdaeb313115b825f"
+checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442"
dependencies = [
"heck",
"proc-macro2",
"quote",
- "syn 2.0.39",
+ "syn 2.0.48",
]
[[package]]
name = "clap_lex"
-version = "0.5.0"
+version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b"
+checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1"
[[package]]
name = "colorchoice"
@@ -519,23 +509,24 @@ checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7"
[[package]]
name = "concurrent-queue"
-version = "2.3.0"
+version = "2.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f057a694a54f12365049b0958a1685bb52d567f5593b355fbf685838e873d400"
+checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363"
dependencies = [
"crossbeam-utils",
]
[[package]]
name = "console"
-version = "0.15.7"
+version = "0.15.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c926e00cc70edefdc64d3a5ff31cc65bb97a3460097762bd23afb4d8145fccf8"
+checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb"
dependencies = [
"encode_unicode",
"lazy_static",
"libc",
- "windows-sys 0.45.0",
+ "unicode-width",
+ "windows-sys 0.52.0",
]
[[package]]
@@ -583,9 +574,9 @@ checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc"
[[package]]
name = "core-foundation"
-version = "0.9.3"
+version = "0.9.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146"
+checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f"
dependencies = [
"core-foundation-sys",
"libc",
@@ -593,15 +584,15 @@ dependencies = [
[[package]]
name = "core-foundation-sys"
-version = "0.8.4"
+version = "0.8.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa"
+checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f"
[[package]]
name = "cpufeatures"
-version = "0.2.8"
+version = "0.2.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "03e69e28e9f7f77debdedbaafa2866e1de9ba56df55a8bd7cfc724c25a09987c"
+checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504"
dependencies = [
"libc",
]
@@ -665,7 +656,16 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.39",
+ "syn 2.0.48",
+]
+
+[[package]]
+name = "deranged"
+version = "0.3.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4"
+dependencies = [
+ "powerfmt",
]
[[package]]
@@ -687,9 +687,9 @@ checksum = "545b22097d44f8a9581187cdf93de7a71e4722bf51200cfaba810865b49a495d"
[[package]]
name = "either"
-version = "1.8.1"
+version = "1.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91"
+checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07"
[[package]]
name = "encode_unicode"
@@ -699,61 +699,34 @@ checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f"
[[package]]
name = "encoding_rs"
-version = "0.8.32"
+version = "0.8.33"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394"
+checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1"
dependencies = [
"cfg-if",
]
[[package]]
-name = "env_logger"
-version = "0.10.0"
+name = "equivalent"
+version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0"
-dependencies = [
- "humantime",
- "is-terminal",
- "log",
- "regex",
- "termcolor",
-]
+checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
[[package]]
name = "errno"
-version = "0.3.1"
+version = "0.3.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a"
+checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245"
dependencies = [
- "errno-dragonfly",
"libc",
- "windows-sys 0.48.0",
-]
-
-[[package]]
-name = "errno-dragonfly"
-version = "0.1.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf"
-dependencies = [
- "cc",
- "libc",
-]
-
-[[package]]
-name = "etherparse"
-version = "0.12.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bcb08c4aab4e2985045305551e67126b43f1b6b136bc4e1cd87fb0327877a611"
-dependencies = [
- "arrayvec",
+ "windows-sys 0.52.0",
]
[[package]]
name = "event-listener"
-version = "4.0.0"
+version = "4.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "770d968249b5d99410d61f5bf89057f3199a077a04d087092f58e7d10692baae"
+checksum = "67b215c49b2b248c855fb73579eb1f4f26c38ffdc12973e20e07b91d78d5646e"
dependencies = [
"concurrent-queue",
"parking",
@@ -772,12 +745,9 @@ dependencies = [
[[package]]
name = "fastrand"
-version = "1.9.0"
+version = "2.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be"
-dependencies = [
- "instant",
-]
+checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5"
[[package]]
name = "fehler"
@@ -801,15 +771,15 @@ dependencies = [
[[package]]
name = "fiat-crypto"
-version = "0.2.2"
+version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a481586acf778f1b1455424c343f71124b048ffa5f4fc3f8f6ae9dc432dcb3c7"
+checksum = "27573eac26f4dd11e2b1916c3fe1baa56407c83c71a773a8ba17ec0bca03b6b7"
[[package]]
name = "flate2"
-version = "1.0.26"
+version = "1.0.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743"
+checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e"
dependencies = [
"crc32fast",
"miniz_oxide",
@@ -838,18 +808,18 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
[[package]]
name = "form_urlencoded"
-version = "1.2.0"
+version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652"
+checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456"
dependencies = [
"percent-encoding",
]
[[package]]
name = "futures"
-version = "0.3.28"
+version = "0.3.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40"
+checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0"
dependencies = [
"futures-channel",
"futures-core",
@@ -862,9 +832,9 @@ dependencies = [
[[package]]
name = "futures-channel"
-version = "0.3.28"
+version = "0.3.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2"
+checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78"
dependencies = [
"futures-core",
"futures-sink",
@@ -872,15 +842,15 @@ dependencies = [
[[package]]
name = "futures-core"
-version = "0.3.28"
+version = "0.3.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c"
+checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d"
[[package]]
name = "futures-executor"
-version = "0.3.28"
+version = "0.3.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0"
+checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d"
dependencies = [
"futures-core",
"futures-task",
@@ -889,38 +859,38 @@ dependencies = [
[[package]]
name = "futures-io"
-version = "0.3.28"
+version = "0.3.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964"
+checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1"
[[package]]
name = "futures-macro"
-version = "0.3.28"
+version = "0.3.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72"
+checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.39",
+ "syn 2.0.48",
]
[[package]]
name = "futures-sink"
-version = "0.3.28"
+version = "0.3.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e"
+checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5"
[[package]]
name = "futures-task"
-version = "0.3.28"
+version = "0.3.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65"
+checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004"
[[package]]
name = "futures-util"
-version = "0.3.28"
+version = "0.3.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533"
+checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48"
dependencies = [
"futures-channel",
"futures-core",
@@ -946,9 +916,9 @@ dependencies = [
[[package]]
name = "getrandom"
-version = "0.2.10"
+version = "0.2.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427"
+checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5"
dependencies = [
"cfg-if",
"libc",
@@ -957,9 +927,9 @@ dependencies = [
[[package]]
name = "gimli"
-version = "0.27.3"
+version = "0.28.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e"
+checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253"
[[package]]
name = "glob"
@@ -969,9 +939,9 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
[[package]]
name = "h2"
-version = "0.3.20"
+version = "0.3.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049"
+checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9"
dependencies = [
"bytes",
"fnv",
@@ -979,7 +949,7 @@ dependencies = [
"futures-sink",
"futures-util",
"http",
- "indexmap",
+ "indexmap 2.1.0",
"slab",
"tokio",
"tokio-util",
@@ -992,6 +962,12 @@ version = "0.12.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
+[[package]]
+name = "hashbrown"
+version = "0.14.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604"
+
[[package]]
name = "hdrhistogram"
version = "7.5.4"
@@ -1013,9 +989,9 @@ checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
[[package]]
name = "hermit-abi"
-version = "0.3.1"
+version = "0.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286"
+checksum = "5d3d0e0f38255e7fa3cf31335b3a56f05febd18025f4db5ef7a0cfb4f8da651f"
[[package]]
name = "hex"
@@ -1033,10 +1009,19 @@ dependencies = [
]
[[package]]
-name = "http"
-version = "0.2.9"
+name = "home"
+version = "0.5.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482"
+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",
@@ -1045,9 +1030,9 @@ dependencies = [
[[package]]
name = "http-body"
-version = "0.4.5"
+version = "0.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1"
+checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2"
dependencies = [
"bytes",
"http",
@@ -1062,9 +1047,9 @@ checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904"
[[package]]
name = "httpdate"
-version = "1.0.2"
+version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421"
+checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9"
[[package]]
name = "humantime"
@@ -1074,9 +1059,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"
[[package]]
name = "hyper"
-version = "0.14.27"
+version = "0.14.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468"
+checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80"
dependencies = [
"bytes",
"futures-channel",
@@ -1089,7 +1074,7 @@ dependencies = [
"httpdate",
"itoa",
"pin-project-lite",
- "socket2",
+ "socket2 0.5.5",
"tokio",
"tower-service",
"tracing",
@@ -1123,9 +1108,9 @@ dependencies = [
[[package]]
name = "idna"
-version = "0.4.0"
+version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c"
+checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6"
dependencies = [
"unicode-bidi",
"unicode-normalization",
@@ -1138,7 +1123,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99"
dependencies = [
"autocfg",
- "hashbrown",
+ "hashbrown 0.12.3",
+]
+
+[[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",
]
[[package]]
@@ -1164,26 +1159,6 @@ dependencies = [
"yaml-rust",
]
-[[package]]
-name = "instant"
-version = "0.1.12"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c"
-dependencies = [
- "cfg-if",
-]
-
-[[package]]
-name = "io-lifetimes"
-version = "1.0.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2"
-dependencies = [
- "hermit-abi",
- "libc",
- "windows-sys 0.48.0",
-]
-
[[package]]
name = "ip_network"
version = "0.4.1"
@@ -1208,23 +1183,9 @@ checksum = "8e537132deb99c0eb4b752f0346b6a836200eaaa3516dd7e5514b63930a09e5d"
[[package]]
name = "ipnet"
-version = "2.8.0"
+version = "2.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6"
-dependencies = [
- "serde",
-]
-
-[[package]]
-name = "is-terminal"
-version = "0.4.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "24fddda5af7e54bf7da53067d6e802dbcc381d0a8eef629df528e3ebf68755cb"
-dependencies = [
- "hermit-abi",
- "rustix 0.38.1",
- "windows-sys 0.48.0",
-]
+checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3"
[[package]]
name = "itertools"
@@ -1237,24 +1198,24 @@ dependencies = [
[[package]]
name = "itoa"
-version = "1.0.6"
+version = "1.0.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6"
+checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c"
[[package]]
name = "jobserver"
-version = "0.1.26"
+version = "0.1.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2"
+checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d"
dependencies = [
"libc",
]
[[package]]
name = "js-sys"
-version = "0.3.64"
+version = "0.3.67"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a"
+checksum = "9a1d36f1235bc969acba30b7f5990b864423a6068a10f7c90ae8f0112e3a59d1"
dependencies = [
"wasm-bindgen",
]
@@ -1273,9 +1234,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
[[package]]
name = "libc"
-version = "0.2.150"
+version = "0.2.152"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c"
+checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7"
[[package]]
name = "libloading"
@@ -1288,15 +1249,25 @@ dependencies = [
]
[[package]]
-name = "libsystemd"
-version = "0.6.0"
+name = "libloading"
+version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "88b9597a67aa1c81a6624603e6bd0bcefb9e0f94c9c54970ec53771082104b4e"
+checksum = "c571b676ddfc9a8c12f1f3d3085a7b163966a8fd8098a90640953ce5f6170161"
+dependencies = [
+ "cfg-if",
+ "windows-sys 0.48.0",
+]
+
+[[package]]
+name = "libsystemd"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c592dc396b464005f78a5853555b9f240bc5378bf5221acc4e129910b2678869"
dependencies = [
"hmac",
"libc",
"log",
- "nix",
+ "nix 0.27.1",
"nom",
"once_cell",
"serde",
@@ -1313,21 +1284,15 @@ checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f"
[[package]]
name = "linux-raw-sys"
-version = "0.3.8"
+version = "0.4.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519"
-
-[[package]]
-name = "linux-raw-sys"
-version = "0.4.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "09fc20d2ca12cb9f044c93e3bd6d32d523e6e2ec3db4f7b2939cd99026ecd3f0"
+checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c"
[[package]]
name = "lock_api"
-version = "0.4.10"
+version = "0.4.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16"
+checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45"
dependencies = [
"autocfg",
"scopeguard",
@@ -1335,9 +1300,9 @@ dependencies = [
[[package]]
name = "log"
-version = "0.4.19"
+version = "0.4.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4"
+checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f"
[[package]]
name = "matchers"
@@ -1345,7 +1310,7 @@ version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558"
dependencies = [
- "regex-automata",
+ "regex-automata 0.1.10",
]
[[package]]
@@ -1356,9 +1321,9 @@ checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94"
[[package]]
name = "memchr"
-version = "2.5.0"
+version = "2.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
+checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149"
[[package]]
name = "memoffset"
@@ -1370,10 +1335,19 @@ dependencies = [
]
[[package]]
-name = "miette"
-version = "5.9.0"
+name = "memoffset"
+version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a236ff270093b0b67451bc50a509bd1bad302cb1d3c7d37d5efe931238581fa9"
+checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "miette"
+version = "5.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "59bb584eaeeab6bd0226ccf3509a69d7936d148cf3d036ad350abe35e8c6856e"
dependencies = [
"miette-derive",
"once_cell",
@@ -1383,13 +1357,13 @@ dependencies = [
[[package]]
name = "miette-derive"
-version = "5.9.0"
+version = "5.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4901771e1d44ddb37964565c654a3223ba41a594d02b8da471cc4464912b5cfa"
+checksum = "49e7bc1560b95a3c4a25d03de42fe76ca718ab92d1a22a55b9b4cf67b3ae635c"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.39",
+ "syn 2.0.48",
]
[[package]]
@@ -1415,9 +1389,9 @@ dependencies = [
[[package]]
name = "mio"
-version = "0.8.8"
+version = "0.8.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2"
+checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09"
dependencies = [
"libc",
"wasi",
@@ -1444,16 +1418,27 @@ dependencies = [
[[package]]
name = "nix"
-version = "0.26.2"
+version = "0.26.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a"
+checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b"
dependencies = [
"bitflags 1.3.2",
"cfg-if",
"libc",
- "memoffset",
+ "memoffset 0.7.1",
"pin-utils",
- "static_assertions",
+]
+
+[[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",
+ "memoffset 0.9.0",
]
[[package]]
@@ -1497,18 +1482,18 @@ dependencies = [
[[package]]
name = "object"
-version = "0.31.1"
+version = "0.32.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1"
+checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441"
dependencies = [
"memchr",
]
[[package]]
name = "once_cell"
-version = "1.18.0"
+version = "1.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d"
+checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92"
[[package]]
name = "opaque-debug"
@@ -1518,11 +1503,11 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5"
[[package]]
name = "openssl"
-version = "0.10.55"
+version = "0.10.63"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "345df152bc43501c5eb9e4654ff05f794effb78d4efe3d53abc158baddc0703d"
+checksum = "15c9d69dd87a29568d4d017cfe8ec518706046a05184e5aea92d0af890b803c8"
dependencies = [
- "bitflags 1.3.2",
+ "bitflags 2.4.2",
"cfg-if",
"foreign-types",
"libc",
@@ -1539,7 +1524,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.39",
+ "syn 2.0.48",
]
[[package]]
@@ -1550,9 +1535,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
[[package]]
name = "openssl-sys"
-version = "0.9.90"
+version = "0.9.99"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "374533b0e45f3a7ced10fcaeccca020e66656bc03dac384f852e4e5a7a8104a6"
+checksum = "22e1bf214306098e4832460f797824c05d25aacdf896f64a985fb0fd992454ae"
dependencies = [
"cc",
"libc",
@@ -1584,15 +1569,15 @@ dependencies = [
[[package]]
name = "parking_lot_core"
-version = "0.9.8"
+version = "0.9.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447"
+checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e"
dependencies = [
"cfg-if",
"libc",
"redox_syscall",
"smallvec",
- "windows-targets 0.48.1",
+ "windows-targets 0.48.5",
]
[[package]]
@@ -1626,28 +1611,28 @@ checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099"
[[package]]
name = "percent-encoding"
-version = "2.3.0"
+version = "2.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94"
+checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e"
[[package]]
name = "pin-project"
-version = "1.1.3"
+version = "1.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422"
+checksum = "0302c4a0442c456bd56f841aee5c3bfd17967563f6fadc9ceb9f9c23cf3807e0"
dependencies = [
"pin-project-internal",
]
[[package]]
name = "pin-project-internal"
-version = "1.1.3"
+version = "1.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405"
+checksum = "266c042b60c9c76b8d53061e52b2e0d1116abc57cefc8c5cd671619a56ac3690"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.39",
+ "syn 2.0.48",
]
[[package]]
@@ -1664,15 +1649,15 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
[[package]]
name = "pkg-config"
-version = "0.3.27"
+version = "0.3.29"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964"
+checksum = "2900ede94e305130c13ddd391e0ab7cbaeb783945ae07a279c268cb05109c6cb"
[[package]]
name = "platforms"
-version = "3.2.0"
+version = "3.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "14e6ab3f592e6fb464fc9712d8d6e6912de6473954635fd76a589d832cffcbb0"
+checksum = "626dec3cac7cc0e1577a2ec3fc496277ec2baa084bebad95bb6fdbfae235f84c"
[[package]]
name = "poly1305"
@@ -1685,6 +1670,12 @@ dependencies = [
"universal-hash",
]
+[[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"
@@ -1693,19 +1684,19 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"
[[package]]
name = "prettyplease"
-version = "0.2.9"
+version = "0.2.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9825a04601d60621feed79c4e6b56d65db77cdca55cef43b46b0de1096d1c282"
+checksum = "a41cf62165e97c7f814d2221421dbb9afcbcdb0a88068e5ea206e19951c2cbb5"
dependencies = [
"proc-macro2",
- "syn 2.0.39",
+ "syn 2.0.48",
]
[[package]]
name = "proc-macro2"
-version = "1.0.69"
+version = "1.0.78"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da"
+checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae"
dependencies = [
"unicode-ident",
]
@@ -1730,7 +1721,7 @@ dependencies = [
"itertools",
"proc-macro2",
"quote",
- "syn 2.0.39",
+ "syn 2.0.48",
]
[[package]]
@@ -1744,9 +1735,9 @@ dependencies = [
[[package]]
name = "quote"
-version = "1.0.33"
+version = "1.0.35"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae"
+checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef"
dependencies = [
"proc-macro2",
]
@@ -1783,22 +1774,23 @@ dependencies = [
[[package]]
name = "redox_syscall"
-version = "0.3.5"
+version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29"
+checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa"
dependencies = [
"bitflags 1.3.2",
]
[[package]]
name = "regex"
-version = "1.8.4"
+version = "1.10.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d0ab3ca65655bb1e41f2a8c8cd662eb4fb035e67c3f78da1d61dffe89d07300f"
+checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15"
dependencies = [
"aho-corasick",
"memchr",
- "regex-syntax 0.7.2",
+ "regex-automata 0.4.5",
+ "regex-syntax 0.8.2",
]
[[package]]
@@ -1810,6 +1802,17 @@ 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"
@@ -1818,15 +1821,15 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1"
[[package]]
name = "regex-syntax"
-version = "0.7.2"
+version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78"
+checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f"
[[package]]
name = "reqwest"
-version = "0.11.18"
+version = "0.11.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cde824a14b7c14f85caff81225f411faacc04a2013f41670f41443742b1c1c55"
+checksum = "37b1ae8d9ac08420c66222fb9096fc5de435c3c48542bc5336c51892cffafb41"
dependencies = [
"base64",
"bytes",
@@ -1849,6 +1852,7 @@ dependencies = [
"serde",
"serde_json",
"serde_urlencoded",
+ "system-configuration",
"tokio",
"tokio-native-tls",
"tower-service",
@@ -1896,29 +1900,15 @@ dependencies = [
[[package]]
name = "rustix"
-version = "0.37.21"
+version = "0.38.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "62f25693a73057a1b4cb56179dd3c7ea21a7c6c5ee7d85781f5749b46f34b79c"
+checksum = "322394588aaf33c24007e8bb3238ee3e4c5c09c084ab32bc73890b99ff326bca"
dependencies = [
- "bitflags 1.3.2",
- "errno",
- "io-lifetimes",
- "libc",
- "linux-raw-sys 0.3.8",
- "windows-sys 0.48.0",
-]
-
-[[package]]
-name = "rustix"
-version = "0.38.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fbc6396159432b5c8490d4e301d8c705f61860b8b6c863bf79942ce5401968f3"
-dependencies = [
- "bitflags 2.3.3",
+ "bitflags 2.4.2",
"errno",
"libc",
- "linux-raw-sys 0.4.3",
- "windows-sys 0.48.0",
+ "linux-raw-sys",
+ "windows-sys 0.52.0",
]
[[package]]
@@ -1929,24 +1919,24 @@ checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4"
[[package]]
name = "ryu"
-version = "1.0.13"
+version = "1.0.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041"
+checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c"
[[package]]
name = "schannel"
-version = "0.1.21"
+version = "0.1.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3"
+checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534"
dependencies = [
- "windows-sys 0.42.0",
+ "windows-sys 0.52.0",
]
[[package]]
name = "schemars"
-version = "0.8.15"
+version = "0.8.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1f7b0ce13155372a76ee2e1c5ffba1fe61ede73fbea5630d61eee6fac4929c0c"
+checksum = "45a28f4c49489add4ce10783f7911893516f15afe45d015608d41faca6bc4d29"
dependencies = [
"dyn-clone",
"schemars_derive",
@@ -1956,9 +1946,9 @@ dependencies = [
[[package]]
name = "schemars_derive"
-version = "0.8.15"
+version = "0.8.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e85e2a16b12bdb763244c69ab79363d71db2b4b918a2def53f80b02e0574b13c"
+checksum = "c767fd6fa65d9ccf9cf026122c1b555f2ef9a4f0cea69da4d7dbc3e258d30967"
dependencies = [
"proc-macro2",
"quote",
@@ -1968,15 +1958,15 @@ dependencies = [
[[package]]
name = "scopeguard"
-version = "1.1.0"
+version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
+checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
[[package]]
name = "security-framework"
-version = "2.9.1"
+version = "2.9.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1fc758eb7bffce5b308734e9b0c1468893cae9ff70ebf13e7090be8dcbcc83a8"
+checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de"
dependencies = [
"bitflags 1.3.2",
"core-foundation",
@@ -1987,9 +1977,9 @@ dependencies = [
[[package]]
name = "security-framework-sys"
-version = "2.9.0"
+version = "2.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f51d0c0d83bec45f16480d0ce0058397a69e48fcdc52d1dc8855fb68acbd31a7"
+checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a"
dependencies = [
"core-foundation-sys",
"libc",
@@ -1997,28 +1987,28 @@ dependencies = [
[[package]]
name = "semver"
-version = "1.0.20"
+version = "1.0.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090"
+checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0"
[[package]]
name = "serde"
-version = "1.0.164"
+version = "1.0.196"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9e8c8cf938e98f769bc164923b06dce91cea1751522f46f8466461af04c9027d"
+checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
-version = "1.0.164"
+version = "1.0.196"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d9735b638ccc51c28bf6914d90a2e9725b377144fc612c49a611fddd1b631d68"
+checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.39",
+ "syn 2.0.48",
]
[[package]]
@@ -2034,9 +2024,9 @@ dependencies = [
[[package]]
name = "serde_json"
-version = "1.0.99"
+version = "1.0.112"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "46266871c240a00b8f503b877622fe33430b3c7d963bdc0f2adc511e54a1eae3"
+checksum = "4d1bd37ce2324cf3bf85e5a25f96eb4baf0d5aa6eba43e7ae8958870c4ec48ed"
dependencies = [
"itoa",
"ryu",
@@ -2068,9 +2058,9 @@ dependencies = [
[[package]]
name = "sha1"
-version = "0.10.5"
+version = "0.10.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3"
+checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba"
dependencies = [
"cfg-if",
"cpufeatures",
@@ -2079,9 +2069,9 @@ dependencies = [
[[package]]
name = "sha2"
-version = "0.10.7"
+version = "0.10.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8"
+checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8"
dependencies = [
"cfg-if",
"cpufeatures",
@@ -2090,50 +2080,60 @@ dependencies = [
[[package]]
name = "sharded-slab"
-version = "0.1.4"
+version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31"
+checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6"
dependencies = [
"lazy_static",
]
[[package]]
name = "shlex"
-version = "1.1.0"
+version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3"
+checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
[[package]]
name = "similar"
-version = "2.3.0"
+version = "2.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2aeaf503862c419d66959f5d7ca015337d864e9c49485d771b732e2a20453597"
+checksum = "32fea41aca09ee824cc9724996433064c89f7777e60762749a4170a14abbfa21"
[[package]]
name = "slab"
-version = "0.4.8"
+version = "0.4.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d"
+checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67"
dependencies = [
"autocfg",
]
[[package]]
name = "smallvec"
-version = "1.11.0"
+version = "1.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9"
+checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7"
[[package]]
name = "socket2"
-version = "0.4.9"
+version = "0.4.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662"
+checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d"
dependencies = [
"libc",
"winapi",
]
+[[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.9.8"
@@ -2142,9 +2142,9 @@ checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67"
[[package]]
name = "ssri"
-version = "9.0.0"
+version = "9.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b5327a6eb28e137e180380169adeae3ac6128438ca1e8a8dc80118f3d1812cbd"
+checksum = "da7a2b3c2bc9693bcb40870c4e9b5bf0d79f9cb46273321bf855ec513e919082"
dependencies = [
"base64",
"digest",
@@ -2156,12 +2156,6 @@ dependencies = [
"xxhash-rust",
]
-[[package]]
-name = "static_assertions"
-version = "1.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
-
[[package]]
name = "strsim"
version = "0.10.0"
@@ -2187,9 +2181,9 @@ dependencies = [
[[package]]
name = "syn"
-version = "2.0.39"
+version = "2.0.48"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a"
+checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f"
dependencies = [
"proc-macro2",
"quote",
@@ -2203,46 +2197,57 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160"
[[package]]
-name = "tempfile"
-version = "3.6.0"
+name = "system-configuration"
+version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "31c0432476357e58790aaa47a8efb0c5138f137343f3b5f23bd36a27e3b0a6d6"
+checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7"
dependencies = [
- "autocfg",
- "cfg-if",
- "fastrand",
- "redox_syscall",
- "rustix 0.37.21",
- "windows-sys 0.48.0",
+ "bitflags 1.3.2",
+ "core-foundation",
+ "system-configuration-sys",
]
[[package]]
-name = "termcolor"
-version = "1.2.0"
+name = "system-configuration-sys"
+version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6"
+checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9"
dependencies = [
- "winapi-util",
+ "core-foundation-sys",
+ "libc",
+]
+
+[[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",
+ "rustix",
+ "windows-sys 0.52.0",
]
[[package]]
name = "thiserror"
-version = "1.0.40"
+version = "1.0.56"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac"
+checksum = "d54378c645627613241d077a3a79db965db602882668f9136ac42af9ecb730ad"
dependencies = [
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
-version = "1.0.40"
+version = "1.0.56"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f"
+checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.39",
+ "syn 2.0.48",
]
[[package]]
@@ -2257,19 +2262,21 @@ dependencies = [
[[package]]
name = "time"
-version = "0.3.22"
+version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ea9e1b3cf1243ae005d9e74085d4d542f3125458f3a81af210d901dcd7411efd"
+checksum = "f657ba42c3f86e7680e53c8cd3af8abbe56b5491790b46e22e19c0d57463583e"
dependencies = [
+ "deranged",
+ "powerfmt",
"serde",
"time-core",
]
[[package]]
name = "time-core"
-version = "0.1.1"
+version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb"
+checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3"
[[package]]
name = "tinyvec"
@@ -2288,18 +2295,17 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
[[package]]
name = "tokio"
-version = "1.29.1"
+version = "1.35.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "532826ff75199d5833b9d2c5fe410f29235e25704ee5f0ef599fb51c21f4a4da"
+checksum = "c89b4efa943be685f629b149f53829423f8f5531ea21249408e8e2f8671ec104"
dependencies = [
- "autocfg",
"backtrace",
"bytes",
"libc",
"mio",
"num_cpus",
"pin-project-lite",
- "socket2",
+ "socket2 0.5.5",
"tokio-macros",
"tracing",
"windows-sys 0.48.0",
@@ -2317,13 +2323,13 @@ dependencies = [
[[package]]
name = "tokio-macros"
-version = "2.1.0"
+version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e"
+checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.39",
+ "syn 2.0.48",
]
[[package]]
@@ -2349,9 +2355,9 @@ dependencies = [
[[package]]
name = "tokio-util"
-version = "0.7.8"
+version = "0.7.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d"
+checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15"
dependencies = [
"bytes",
"futures-core",
@@ -2396,7 +2402,7 @@ checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c"
dependencies = [
"futures-core",
"futures-util",
- "indexmap",
+ "indexmap 1.9.3",
"pin-project",
"pin-project-lite",
"rand",
@@ -2422,11 +2428,10 @@ checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52"
[[package]]
name = "tracing"
-version = "0.1.37"
+version = "0.1.40"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8"
+checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef"
dependencies = [
- "cfg-if",
"pin-project-lite",
"tracing-attributes",
"tracing-core",
@@ -2434,20 +2439,20 @@ dependencies = [
[[package]]
name = "tracing-attributes"
-version = "0.1.26"
+version = "0.1.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab"
+checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.39",
+ "syn 2.0.48",
]
[[package]]
name = "tracing-core"
-version = "0.1.31"
+version = "0.1.32"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a"
+checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54"
dependencies = [
"once_cell",
"valuable",
@@ -2466,12 +2471,23 @@ dependencies = [
[[package]]
name = "tracing-log"
-version = "0.1.3"
+version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922"
+checksum = "f751112709b4e791d8ce53e32c4ed2d353565a795ce84da2285393f41557bdf2"
dependencies = [
- "lazy_static",
"log",
+ "once_cell",
+ "tracing-core",
+]
+
+[[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",
]
@@ -2492,9 +2508,9 @@ dependencies = [
[[package]]
name = "tracing-subscriber"
-version = "0.3.17"
+version = "0.3.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "30a651bc37f915e81f087d86e62a18eec5f79550c7faff886f7090b4ea757c77"
+checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b"
dependencies = [
"matchers",
"nu-ansi-term",
@@ -2505,14 +2521,14 @@ dependencies = [
"thread_local",
"tracing",
"tracing-core",
- "tracing-log",
+ "tracing-log 0.2.0",
]
[[package]]
name = "try-lock"
-version = "0.2.4"
+version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed"
+checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"
[[package]]
name = "tun"
@@ -2525,13 +2541,13 @@ dependencies = [
"futures",
"lazy_static",
"libc",
- "libloading",
+ "libloading 0.7.4",
"log",
- "nix",
+ "nix 0.26.4",
"reqwest",
"schemars",
"serde",
- "socket2",
+ "socket2 0.4.10",
"ssri",
"tempfile",
"tokio",
@@ -2543,21 +2559,21 @@ dependencies = [
[[package]]
name = "typenum"
-version = "1.16.0"
+version = "1.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba"
+checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"
[[package]]
name = "unicode-bidi"
-version = "0.3.13"
+version = "0.3.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460"
+checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75"
[[package]]
name = "unicode-ident"
-version = "1.0.9"
+version = "1.0.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0"
+checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
[[package]]
name = "unicode-normalization"
@@ -2570,9 +2586,9 @@ dependencies = [
[[package]]
name = "unicode-width"
-version = "0.1.10"
+version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b"
+checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85"
[[package]]
name = "universal-hash"
@@ -2592,9 +2608,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1"
[[package]]
name = "url"
-version = "2.4.0"
+version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb"
+checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633"
dependencies = [
"form_urlencoded",
"idna",
@@ -2609,11 +2625,10 @@ checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a"
[[package]]
name = "uuid"
-version = "1.6.1"
+version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5e395fcf16a7a3d8127ec99782007af141946b4795001f876d54fb0d55978560"
+checksum = "f00cc9702ca12d3c81455259621e676d0f7251cec66a21e98fe2e9a37db93b2a"
dependencies = [
- "getrandom",
"serde",
]
@@ -2652,9 +2667,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
[[package]]
name = "wasm-bindgen"
-version = "0.2.87"
+version = "0.2.90"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342"
+checksum = "b1223296a201415c7fad14792dbefaace9bd52b62d33453ade1c5b5f07555406"
dependencies = [
"cfg-if",
"wasm-bindgen-macro",
@@ -2662,24 +2677,24 @@ dependencies = [
[[package]]
name = "wasm-bindgen-backend"
-version = "0.2.87"
+version = "0.2.90"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd"
+checksum = "fcdc935b63408d58a32f8cc9738a0bffd8f05cc7c002086c6ef20b7312ad9dcd"
dependencies = [
"bumpalo",
"log",
"once_cell",
"proc-macro2",
"quote",
- "syn 2.0.39",
+ "syn 2.0.48",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-futures"
-version = "0.4.37"
+version = "0.4.40"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03"
+checksum = "bde2032aeb86bdfaecc8b261eef3cba735cc426c1f3a3416d1e0791be95fc461"
dependencies = [
"cfg-if",
"js-sys",
@@ -2689,9 +2704,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro"
-version = "0.2.87"
+version = "0.2.90"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d"
+checksum = "3e4c238561b2d428924c49815533a8b9121c664599558a5d9ec51f8a1740a999"
dependencies = [
"quote",
"wasm-bindgen-macro-support",
@@ -2699,28 +2714,28 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro-support"
-version = "0.2.87"
+version = "0.2.90"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b"
+checksum = "bae1abb6806dc1ad9e560ed242107c0f6c84335f1749dd4e8ddb012ebd5e25a7"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.39",
+ "syn 2.0.48",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-shared"
-version = "0.2.87"
+version = "0.2.90"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1"
+checksum = "4d91413b1c31d7539ba5ef2451af3f0b833a005eb27a631cec32bc0635a8602b"
[[package]]
name = "web-sys"
-version = "0.3.64"
+version = "0.3.67"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b"
+checksum = "58cd2333b6e0be7a39605f0e255892fd7418a682d8da8fe042fe25128794d2ed"
dependencies = [
"js-sys",
"wasm-bindgen",
@@ -2728,13 +2743,14 @@ dependencies = [
[[package]]
name = "which"
-version = "4.4.0"
+version = "4.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2441c784c52b289a054b7201fc93253e288f094e2f4be9058343127c4226a269"
+checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7"
dependencies = [
"either",
- "libc",
+ "home",
"once_cell",
+ "rustix",
]
[[package]]
@@ -2759,15 +2775,6 @@ version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
-[[package]]
-name = "winapi-util"
-version = "0.1.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178"
-dependencies = [
- "winapi",
-]
-
[[package]]
name = "winapi-x86_64-pc-windows-gnu"
version = "0.4.0"
@@ -2780,31 +2787,7 @@ version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f"
dependencies = [
- "windows-targets 0.48.1",
-]
-
-[[package]]
-name = "windows-sys"
-version = "0.42.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7"
-dependencies = [
- "windows_aarch64_gnullvm 0.42.2",
- "windows_aarch64_msvc 0.42.2",
- "windows_i686_gnu 0.42.2",
- "windows_i686_msvc 0.42.2",
- "windows_x86_64_gnu 0.42.2",
- "windows_x86_64_gnullvm 0.42.2",
- "windows_x86_64_msvc 0.42.2",
-]
-
-[[package]]
-name = "windows-sys"
-version = "0.45.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0"
-dependencies = [
- "windows-targets 0.42.2",
+ "windows-targets 0.48.5",
]
[[package]]
@@ -2813,130 +2796,140 @@ version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
dependencies = [
- "windows-targets 0.48.1",
+ "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.42.2"
+version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071"
+checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c"
dependencies = [
- "windows_aarch64_gnullvm 0.42.2",
- "windows_aarch64_msvc 0.42.2",
- "windows_i686_gnu 0.42.2",
- "windows_i686_msvc 0.42.2",
- "windows_x86_64_gnu 0.42.2",
- "windows_x86_64_gnullvm 0.42.2",
- "windows_x86_64_msvc 0.42.2",
+ "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.48.1"
+version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f"
+checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd"
dependencies = [
- "windows_aarch64_gnullvm 0.48.0",
- "windows_aarch64_msvc 0.48.0",
- "windows_i686_gnu 0.48.0",
- "windows_i686_msvc 0.48.0",
- "windows_x86_64_gnu 0.48.0",
- "windows_x86_64_gnullvm 0.48.0",
- "windows_x86_64_msvc 0.48.0",
+ "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.42.2"
+version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8"
+checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8"
[[package]]
name = "windows_aarch64_gnullvm"
-version = "0.48.0"
+version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc"
+checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea"
[[package]]
name = "windows_aarch64_msvc"
-version = "0.42.2"
+version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43"
+checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc"
[[package]]
name = "windows_aarch64_msvc"
-version = "0.48.0"
+version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3"
+checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef"
[[package]]
name = "windows_i686_gnu"
-version = "0.42.2"
+version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f"
+checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e"
[[package]]
name = "windows_i686_gnu"
-version = "0.48.0"
+version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241"
+checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313"
[[package]]
name = "windows_i686_msvc"
-version = "0.42.2"
+version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060"
+checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406"
[[package]]
name = "windows_i686_msvc"
-version = "0.48.0"
+version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00"
+checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a"
[[package]]
name = "windows_x86_64_gnu"
-version = "0.42.2"
+version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36"
+checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e"
[[package]]
name = "windows_x86_64_gnu"
-version = "0.48.0"
+version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1"
+checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd"
[[package]]
name = "windows_x86_64_gnullvm"
-version = "0.42.2"
+version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3"
+checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc"
[[package]]
name = "windows_x86_64_gnullvm"
-version = "0.48.0"
+version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953"
+checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e"
[[package]]
name = "windows_x86_64_msvc"
-version = "0.42.2"
+version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0"
+checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"
[[package]]
name = "windows_x86_64_msvc"
-version = "0.48.0"
+version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a"
+checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04"
[[package]]
name = "winreg"
-version = "0.10.1"
+version = "0.50.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d"
+checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1"
dependencies = [
- "winapi",
+ "cfg-if",
+ "windows-sys 0.48.0",
]
[[package]]
@@ -2953,9 +2946,9 @@ dependencies = [
[[package]]
name = "xxhash-rust"
-version = "0.8.6"
+version = "0.8.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "735a71d46c4d68d71d4b24d03fdc2b98e38cea81730595801db779c04fe80d70"
+checksum = "53be06678ed9e83edb1745eb72efc0bbcd7b5c3c35711a860906aed827a13d61"
[[package]]
name = "yaml-rust"
@@ -2968,9 +2961,9 @@ dependencies = [
[[package]]
name = "zeroize"
-version = "1.6.0"
+version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9"
+checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d"
dependencies = [
"zeroize_derive",
]
@@ -2983,7 +2976,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.39",
+ "syn 2.0.48",
]
[[package]]
@@ -3027,11 +3020,10 @@ dependencies = [
[[package]]
name = "zstd-sys"
-version = "2.0.8+zstd.1.5.5"
+version = "2.0.9+zstd.1.5.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5556e6ee25d32df2586c098bbfa278803692a20d0ab9565e049480d52707ec8c"
+checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656"
dependencies = [
"cc",
- "libc",
"pkg-config",
]
diff --git a/burrow/Cargo.toml b/burrow/Cargo.toml
index 0fb2443..4e7688b 100644
--- a/burrow/Cargo.toml
+++ b/burrow/Cargo.toml
@@ -12,46 +12,44 @@ crate-type = ["lib", "staticlib"]
anyhow = "1.0"
tokio = { version = "1.21", features = ["rt", "macros", "sync", "io-util", "rt-multi-thread", "time", "tracing"] }
tun = { version = "0.1", path = "../tun", features = ["serde", "tokio"] }
-clap = { version = "4.3.2", features = ["derive"] }
+clap = { version = "4.4", features = ["derive"] }
tracing = "0.1"
tracing-log = "0.1"
-tracing-journald = "0.3"
-tracing-oslog = {git = "https://github.com/Stormshield-robinc/tracing-oslog"}
-tracing-subscriber = { version = "0.3" , features = ["std", "env-filter"]}
-env_logger = "0.10"
+tracing-oslog = { git = "https://github.com/Stormshield-robinc/tracing-oslog" }
+tracing-subscriber = { version = "0.3" , features = ["std", "env-filter"] }
log = "0.4"
serde = { version = "1", features = ["derive"] }
-serde_json = "1"
-blake2 = "0.10.6"
-chacha20poly1305 = "0.10.1"
-rand = "0.8.5"
-rand_core = "0.6.4"
-aead = "0.5.2"
-x25519-dalek = { version = "2.0.0", features = ["reusable_secrets", "static_secrets"] }
-ring = "0.17.7"
-parking_lot = "0.12.1"
+serde_json = "1.0"
+blake2 = "0.10"
+chacha20poly1305 = "0.10"
+rand = "0.8"
+rand_core = "0.6"
+aead = "0.5"
+x25519-dalek = { version = "2.0", features = ["reusable_secrets", "static_secrets"] }
+ring = "0.17"
+parking_lot = "0.12"
hmac = "0.12"
-ipnet = { version = "2.8.0", features = ["serde"] }
-base64 = "0.21.4"
-fehler = "1.0.0"
-ip_network_table = "0.2.0"
-ip_network = "0.4.0"
-async-channel = "2.1.1"
+base64 = "0.21"
+fehler = "1.0"
+ip_network_table = "0.2"
+ip_network = "0.4"
+async-channel = "2.1"
schemars = "0.8"
futures = "0.3.28"
-uuid = { version = "1.6.1", features = ["v4"] }
-console-subscriber = { version = "0.2.0" , optional = true}
+once_cell = "1.19"
+console-subscriber = { version = "0.2.0" , optional = true }
+console = "0.15.8"
[target.'cfg(target_os = "linux")'.dependencies]
-caps = "0.5.5"
-libsystemd = "0.6"
+caps = "0.5"
+libsystemd = "0.7"
+tracing-journald = "0.3"
[target.'cfg(target_vendor = "apple")'.dependencies]
-nix = { version = "0.26.2" }
+nix = { version = "0.27" }
[dev-dependencies]
-insta = { version = "1.32.0", features = ["yaml"] }
-etherparse = "0.12"
+insta = { version = "1.32", features = ["yaml"] }
[package.metadata.generate-rpm]
assets = [
@@ -63,4 +61,4 @@ post_install_script = "../package/rpm/post_install"
pre_uninstall_script = "../package/rpm/pre_uninstall"
[features]
-tokio-console = ["dep:console-subscriber"]
\ No newline at end of file
+tokio-console = ["dep:console-subscriber"]
diff --git a/burrow/src/apple.rs b/burrow/src/apple.rs
deleted file mode 100644
index 9fc0140..0000000
--- a/burrow/src/apple.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-use tracing::debug;
-use tracing_oslog::OsLogger;
-use tracing_subscriber::layer::SubscriberExt;
-
-pub use crate::daemon::start_srv;
-
-#[no_mangle]
-pub extern "C" fn initialize_oslog() {
- let collector =
- tracing_subscriber::registry().with(OsLogger::new("com.hackclub.burrow", "backend"));
- tracing::subscriber::set_global_default(collector).unwrap();
- debug!("Initialized oslog tracing in libburrow rust FFI");
-}
\ No newline at end of file
diff --git a/burrow/src/daemon/apple.rs b/burrow/src/daemon/apple.rs
new file mode 100644
index 0000000..9460613
--- /dev/null
+++ b/burrow/src/daemon/apple.rs
@@ -0,0 +1,55 @@
+use std::{
+ ffi::{c_char, CStr},
+ path::PathBuf,
+ sync::Arc,
+ thread,
+};
+
+use once_cell::sync::OnceCell;
+use tokio::{
+ runtime::{Builder, Handle},
+ sync::Notify,
+};
+use tracing::error;
+
+use crate::daemon::daemon_main;
+
+static BURROW_NOTIFY: OnceCell> = OnceCell::new();
+static BURROW_HANDLE: OnceCell = OnceCell::new();
+
+#[no_mangle]
+pub unsafe extern "C" fn spawn_in_process(path: *const c_char) {
+ crate::tracing::initialize();
+
+ let notify = BURROW_NOTIFY.get_or_init(|| Arc::new(Notify::new()));
+ let handle = BURROW_HANDLE.get_or_init(|| {
+ let path_buf = if path.is_null() {
+ None
+ } else {
+ Some(PathBuf::from(CStr::from_ptr(path).to_str().unwrap()))
+ };
+ let sender = notify.clone();
+
+ let (handle_tx, handle_rx) = tokio::sync::oneshot::channel();
+ thread::spawn(move || {
+ let runtime = Builder::new_multi_thread()
+ .worker_threads(4)
+ .enable_all()
+ .thread_name("burrow-worker")
+ .build()
+ .unwrap();
+ handle_tx.send(runtime.handle().clone()).unwrap();
+ runtime.block_on(async {
+ let result = daemon_main(path_buf.as_deref(), Some(sender.clone())).await;
+ if let Err(error) = result.as_ref() {
+ error!("Burrow thread exited: {}", error);
+ }
+ result
+ })
+ });
+ handle_rx.blocking_recv().unwrap()
+ });
+
+ let receiver = notify.clone();
+ handle.block_on(async move { receiver.notified().await });
+}
diff --git a/burrow/src/daemon/mod.rs b/burrow/src/daemon/mod.rs
index 5a35b28..2a971dd 100644
--- a/burrow/src/daemon/mod.rs
+++ b/burrow/src/daemon/mod.rs
@@ -1,5 +1,6 @@
-use std::sync::Arc;
+use std::{path::Path, sync::Arc};
+pub mod apple;
mod command;
mod instance;
mod net;
@@ -8,44 +9,52 @@ mod response;
use anyhow::Result;
pub use command::{DaemonCommand, DaemonStartOptions};
use instance::DaemonInstance;
-#[cfg(target_vendor = "apple")]
-pub use net::start_srv;
-pub use net::DaemonClient;
+pub use net::{DaemonClient, Listener};
pub use response::{DaemonResponse, DaemonResponseData, ServerInfo};
use tokio::sync::{Notify, RwLock};
+use tracing::{error, info};
-use crate::{
- daemon::net::listen,
- wireguard::{Config, Interface},
-};
+use crate::wireguard::{Config, Interface};
-pub async fn daemon_main(notify_ready: Option>) -> Result<()> {
+pub async fn daemon_main(path: Option<&Path>, notify_ready: Option>) -> Result<()> {
let (commands_tx, commands_rx) = async_channel::unbounded();
let (response_tx, response_rx) = async_channel::unbounded();
+ let listener = if let Some(path) = path {
+ info!("Creating listener... {:?}", path);
+ Listener::new_with_path(commands_tx, response_rx, path)
+ } else {
+ info!("Creating listener...");
+ Listener::new(commands_tx, response_rx)
+ };
+ if let Some(n) = notify_ready {
+ n.notify_one()
+ }
+ let listener = listener?;
+
let config = Config::default();
let iface: Interface = config.try_into()?;
+ let mut instance = DaemonInstance::new(commands_rx, response_tx, Arc::new(RwLock::new(iface)));
- let mut inst: DaemonInstance =
- DaemonInstance::new(commands_rx, response_tx, Arc::new(RwLock::new(iface)));
+ info!("Starting daemon...");
- tracing::info!("Starting daemon jobs...");
-
- let inst_job = tokio::spawn(async move {
- let res = inst.run().await;
- if let Err(e) = res {
- tracing::error!("Error when running instance: {}", e);
+ let main_job = tokio::spawn(async move {
+ let result = instance.run().await;
+ if let Err(e) = result.as_ref() {
+ error!("Instance exited: {}", e);
}
+ result
});
- let listen_job = tokio::spawn(async move {
- let res = listen(commands_tx, response_rx, notify_ready).await;
- if let Err(e) = res {
- tracing::error!("Error when listening: {}", e);
+ let listener_job = tokio::spawn(async move {
+ let result = listener.run().await;
+ if let Err(e) = result.as_ref() {
+ error!("Listener exited: {}", e);
}
+ result
});
- tokio::try_join!(inst_job, listen_job)
+ tokio::try_join!(main_job, listener_job)
.map(|_| ())
.map_err(|e| e.into())
}
diff --git a/burrow/src/daemon/net/apple.rs b/burrow/src/daemon/net/apple.rs
deleted file mode 100644
index 143e913..0000000
--- a/burrow/src/daemon/net/apple.rs
+++ /dev/null
@@ -1,32 +0,0 @@
-use std::sync::Arc;
-use std::thread;
-
-use tokio::runtime::Runtime;
-use tokio::sync::Notify;
-use tracing::{error, info};
-
-use crate::daemon::{daemon_main, DaemonClient};
-
-#[no_mangle]
-pub extern "C" fn start_srv() {
- info!("Starting server");
- let start_notify = Arc::new(Notify::new());
- let start_recv = start_notify.clone();
- let _handle = thread::spawn(move || {
- let rt = Runtime::new().unwrap();
- rt.block_on(async {
- if let Err(e) = daemon_main(Some(start_notify.clone())).await {
- error!("Error when starting rpc server: {}", e);
- }
- });
- start_notify.notify_one();
- });
- let rt = Runtime::new().unwrap();
- rt.block_on(async {
- start_recv.notified().await;
- match DaemonClient::new().await {
- Ok(..) => info!("Server successfully started"),
- Err(e) => error!("Could not connect to server: {}", e)
- }
- });
-}
diff --git a/burrow/src/daemon/net/mod.rs b/burrow/src/daemon/net/mod.rs
index d369f40..fe35bae 100644
--- a/burrow/src/daemon/net/mod.rs
+++ b/burrow/src/daemon/net/mod.rs
@@ -4,28 +4,18 @@ use super::DaemonCommand;
#[cfg(target_family = "unix")]
mod unix;
-#[cfg(all(target_family = "unix", not(target_os = "linux")))]
-pub use unix::{listen, DaemonClient};
-#[cfg(target_os = "linux")]
-mod systemd;
-#[cfg(target_os = "linux")]
-pub use systemd::{listen, DaemonClient};
+#[cfg(target_family = "unix")]
+pub use unix::{DaemonClient, Listener};
#[cfg(target_os = "windows")]
mod windows;
#[cfg(target_os = "windows")]
-pub use windows::{listen, DaemonClient};
-
-#[cfg(target_vendor = "apple")]
-mod apple;
-
-#[cfg(target_vendor = "apple")]
-pub use apple::start_srv;
+pub use windows::{DaemonClient, Listener};
#[derive(Clone, Serialize, Deserialize)]
pub struct DaemonRequest {
- pub id: u32,
+ pub id: u64,
pub command: DaemonCommand,
}
diff --git a/burrow/src/daemon/net/systemd.rs b/burrow/src/daemon/net/systemd.rs
deleted file mode 100644
index 4534742..0000000
--- a/burrow/src/daemon/net/systemd.rs
+++ /dev/null
@@ -1,33 +0,0 @@
-use std::os::fd::IntoRawFd;
-use std::sync::Arc;
-
-use anyhow::Result;
-use tokio::sync::Notify;
-
-use super::*;
-use crate::daemon::DaemonResponse;
-
-pub async fn listen(
- cmd_tx: async_channel::Sender,
- rsp_rx: async_channel::Receiver,
- notify: Option>
-) -> Result<()> {
- if !libsystemd::daemon::booted()
- || listen_with_systemd(cmd_tx.clone(), rsp_rx.clone())
- .await
- .is_err()
- {
- unix::listen(cmd_tx, rsp_rx, notify).await?;
- }
- Ok(())
-}
-
-async fn listen_with_systemd(
- cmd_tx: async_channel::Sender,
- rsp_rx: async_channel::Receiver,
-) -> Result<()> {
- let fds = libsystemd::activation::receive_descriptors(false)?;
- super::unix::listen_with_optional_fd(cmd_tx, rsp_rx, Some(fds[0].clone().into_raw_fd()), None).await
-}
-
-pub type DaemonClient = unix::DaemonClient;
diff --git a/burrow/src/daemon/net/unix.rs b/burrow/src/daemon/net/unix.rs
index 948bdff..26e901d 100644
--- a/burrow/src/daemon/net/unix.rs
+++ b/burrow/src/daemon/net/unix.rs
@@ -1,21 +1,15 @@
-use std::{
- io,
- os::{
- fd::{FromRawFd, RawFd},
- unix::net::UnixListener as StdUnixListener,
- },
- path::{Path, PathBuf},
-};
-use std::sync::Arc;
+#[cfg(target_os = "linux")]
+use std::os::fd::{IntoRawFd, RawFd};
+use std::{ffi::OsStr, io, path::Path};
-use anyhow::{anyhow, Result};
+use anyhow::{anyhow, Error, Result};
+use fehler::throws;
use tokio::{
io::{AsyncBufReadExt, AsyncWriteExt, BufReader},
net::{UnixListener, UnixStream},
};
-use tracing::{debug, info};
+use tracing::{debug, error, info};
-use tokio::sync::Notify;
use super::*;
use crate::daemon::{DaemonCommand, DaemonResponse, DaemonResponseData};
@@ -25,141 +19,178 @@ const UNIX_SOCKET_PATH: &str = "/run/burrow.sock";
#[cfg(target_vendor = "apple")]
const UNIX_SOCKET_PATH: &str = "burrow.sock";
-#[cfg(target_os = "macos")]
-fn fetch_socket_path() -> Option {
- let tries = vec![
- "burrow.sock".to_string(),
- format!(
- "{}/Library/Containers/com.hackclub.burrow.network/Data/burrow.sock",
- std::env::var("HOME").unwrap_or_default()
- )
- .to_string(),
- ];
- for path in tries {
- let path = PathBuf::from(path);
- if path.exists() {
- return Some(path)
- }
- }
- None
-}
-
-#[cfg(not(target_os = "macos"))]
-fn fetch_socket_path() -> Option {
- Some(Path::new(UNIX_SOCKET_PATH).to_path_buf())
-}
-
-pub async fn listen(
+#[derive(Debug)]
+pub struct Listener {
cmd_tx: async_channel::Sender,
rsp_rx: async_channel::Receiver,
- notify: Option>
-) -> Result<()> {
- listen_with_optional_fd(cmd_tx, rsp_rx, None, notify).await
+ inner: UnixListener,
}
-pub(crate) async fn listen_with_optional_fd(
- cmd_tx: async_channel::Sender,
- rsp_rx: async_channel::Receiver,
- raw_fd: Option,
- notify: Option>
-) -> Result<()> {
- let path = Path::new(UNIX_SOCKET_PATH);
-
- let listener = if let Some(raw_fd) = raw_fd {
- let listener = unsafe { StdUnixListener::from_raw_fd(raw_fd) };
- listener.set_nonblocking(true)?;
- UnixListener::from_std(listener)
- } else {
- UnixListener::bind(path)
- };
- let listener = if let Ok(listener) = listener {
- listener
- } else {
- // Won't help all that much, if we use the async version of fs.
- if let Some(par) = path.parent() {
- std::fs::create_dir_all(par)?;
- }
- match std::fs::remove_file(path) {
- Err(e) if e.kind() == io::ErrorKind::NotFound => Ok(()),
- stuff => stuff,
- }?;
- info!("Relative path: {}", path.to_string_lossy());
- UnixListener::bind(path)?
- };
- if let Some(notify) = notify {
- notify.notify_one();
+impl Listener {
+ #[throws]
+ pub fn new(
+ cmd_tx: async_channel::Sender,
+ rsp_rx: async_channel::Receiver,
+ ) -> Self {
+ let path = Path::new(OsStr::new(UNIX_SOCKET_PATH));
+ Self::new_with_path(cmd_tx, rsp_rx, path)?
}
- loop {
- let (stream, _) = listener.accept().await?;
- let cmd_tx = cmd_tx.clone();
- // I'm pretty sure we won't need to manually join / shut this down,
- // `lines` will return Err during dropping, and this task should exit
- // gracefully.
- let rsp_rxc = rsp_rx.clone();
- tokio::task::spawn(async move {
- let cmd_tx = cmd_tx;
- let mut stream = stream;
- let (mut read_stream, mut write_stream) = stream.split();
- let buf_reader = BufReader::new(&mut read_stream);
- let mut lines = buf_reader.lines();
- while let Ok(Some(line)) = lines.next_line().await {
- info!("Got line: {}", line);
- debug!("Line raw data: {:?}", line.as_bytes());
- let mut res: DaemonResponse = DaemonResponseData::None.into();
- let req = match serde_json::from_str::(&line) {
- Ok(req) => Some(req),
- Err(e) => {
- res.result = Err(e.to_string());
- tracing::error!("Failed to parse request: {}", e);
- None
- }
- };
- let mut res = serde_json::to_string(&res).unwrap();
- res.push('\n');
+ #[throws]
+ #[cfg(target_os = "linux")]
+ pub fn new_with_path(
+ cmd_tx: async_channel::Sender,
+ rsp_rx: async_channel::Receiver,
+ path: &Path,
+ ) -> Self {
+ let inner = listener_from_path_or_fd(&path, raw_fd())?;
+ Self { cmd_tx, rsp_rx, inner }
+ }
- if let Some(req) = req {
- cmd_tx.send(req.command).await.unwrap();
- let res = rsp_rxc.recv().await.unwrap().with_id(req.id);
- let mut retres = serde_json::to_string(&res).unwrap();
- retres.push('\n');
- info!("Sending response: {}", retres);
- write_stream.write_all(retres.as_bytes()).await.unwrap();
- } else {
- write_stream.write_all(res.as_bytes()).await.unwrap();
+ #[throws]
+ #[cfg(not(target_os = "linux"))]
+ pub fn new_with_path(
+ cmd_tx: async_channel::Sender,
+ rsp_rx: async_channel::Receiver,
+ path: &Path,
+ ) -> Self {
+ let inner = listener_from_path(path)?;
+ Self { cmd_tx, rsp_rx, inner }
+ }
+
+ pub async fn run(&self) -> Result<()> {
+ info!("Waiting for connections...");
+ loop {
+ let (stream, _) = self.inner.accept().await?;
+ let cmd_tx = self.cmd_tx.clone();
+ let rsp_rxc = self.rsp_rx.clone();
+ tokio::task::spawn(async move {
+ info!("Got connection: {:?}", stream);
+ Self::stream(stream, cmd_tx, rsp_rxc).await;
+ });
+ }
+ }
+
+ async fn stream(
+ stream: UnixStream,
+ cmd_tx: async_channel::Sender,
+ rsp_rxc: async_channel::Receiver,
+ ) {
+ let mut stream = stream;
+ let (mut read_stream, mut write_stream) = stream.split();
+ let buf_reader = BufReader::new(&mut read_stream);
+ let mut lines = buf_reader.lines();
+ while let Ok(Some(line)) = lines.next_line().await {
+ info!("Line: {}", line);
+ let mut res: DaemonResponse = DaemonResponseData::None.into();
+ let req = match serde_json::from_str::(&line) {
+ Ok(req) => Some(req),
+ Err(e) => {
+ res.result = Err(e.to_string());
+ error!("Failed to parse request: {}", e);
+ None
}
+ };
+ let mut res = serde_json::to_string(&res).unwrap();
+ res.push('\n');
+
+ if let Some(req) = req {
+ cmd_tx.send(req.command).await.unwrap();
+ let res = rsp_rxc.recv().await.unwrap().with_id(req.id);
+ let mut retres = serde_json::to_string(&res).unwrap();
+ retres.push('\n');
+ info!("Sending response: {}", retres);
+ write_stream.write_all(retres.as_bytes()).await.unwrap();
+ } else {
+ write_stream.write_all(res.as_bytes()).await.unwrap();
}
- });
+ }
}
}
+#[cfg(target_os = "linux")]
+fn raw_fd() -> Option {
+ if !libsystemd::daemon::booted() {
+ return None;
+ }
+
+ match libsystemd::activation::receive_descriptors(false) {
+ Ok(descriptors) => descriptors.into_iter().map(|d| d.into_raw_fd()).next(),
+ Err(e) => {
+ tracing::error!("Failed to receive descriptors: {}", e);
+ None
+ }
+ }
+}
+
+#[throws]
+#[cfg(target_os = "linux")]
+fn listener_from_path_or_fd(path: &Path, raw_fd: Option) -> UnixListener {
+ match raw_fd.map(listener_from_fd) {
+ Some(Ok(listener)) => listener,
+ _ => listener_from_path(path)?,
+ }
+}
+
+#[throws]
+#[cfg(target_os = "linux")]
+fn listener_from_fd(fd: RawFd) -> UnixListener {
+ use std::os::fd::FromRawFd;
+
+ let listener = unsafe { std::os::unix::net::UnixListener::from_raw_fd(fd) };
+ listener.set_nonblocking(true)?;
+ UnixListener::from_std(listener)?
+}
+
+#[throws]
+fn listener_from_path(path: &Path) -> UnixListener {
+ let error = match UnixListener::bind(path) {
+ Ok(listener) => return listener,
+ Err(e) => e,
+ };
+
+ match error.kind() {
+ io::ErrorKind::NotFound => {
+ if let Some(parent) = path.parent() {
+ info!("Creating parent directory {:?}", parent);
+ std::fs::create_dir_all(parent)?;
+ }
+ }
+ io::ErrorKind::AddrInUse => {
+ info!("Removing existing file");
+ match std::fs::remove_file(path) {
+ Err(e) if e.kind() == io::ErrorKind::NotFound => Ok(()),
+ stuff => stuff,
+ }?;
+ }
+ _ => error!("Failed to bind to {:?}: {}", path, error),
+ }
+
+ UnixListener::bind(path)?
+}
+
#[derive(Debug)]
pub struct DaemonClient {
- connection: UnixStream,
+ stream: UnixStream,
}
impl DaemonClient {
pub async fn new() -> Result {
- let path = fetch_socket_path().ok_or(anyhow!("Failed to find socket path"))?;
- // debug!("found path: {:?}", path);
- let connection = UnixStream::connect(path).await?;
- debug!("connected to socket");
- Ok(Self { connection })
+ let path = Path::new(OsStr::new(UNIX_SOCKET_PATH));
+ Self::new_with_path(path).await
}
- pub async fn new_with_path(path: &str) -> Result {
- let path = Path::new(path);
- let connection = UnixStream::connect(path).await?;
-
- Ok(Self { connection })
+ pub async fn new_with_path(path: &Path) -> Result {
+ let stream = UnixStream::connect(path).await?;
+ Ok(Self { stream })
}
pub async fn send_command(&mut self, command: DaemonCommand) -> Result {
let mut command = serde_json::to_string(&DaemonRequest { id: 0, command })?;
command.push('\n');
- self.connection.write_all(command.as_bytes()).await?;
- let buf_reader = BufReader::new(&mut self.connection);
+ self.stream.write_all(command.as_bytes()).await?;
+ let buf_reader = BufReader::new(&mut self.stream);
let mut lines = buf_reader.lines();
let response = lines
.next_line()
diff --git a/burrow/src/daemon/net/windows.rs b/burrow/src/daemon/net/windows.rs
index c4a1d71..5918260 100644
--- a/burrow/src/daemon/net/windows.rs
+++ b/burrow/src/daemon/net/windows.rs
@@ -1,23 +1,34 @@
use anyhow::Result;
+use fehler::throws;
-use super::*;
+use super::DaemonCommand;
use crate::daemon::DaemonResponse;
-pub async fn listen(
- _cmd_tx: async_channel::Sender,
- _rsp_rx: async_channel::Receiver,
-) -> Result<()> {
- unimplemented!("This platform does not currently support daemon mode.")
+pub struct Listener;
+
+impl Listener {
+ pub fn new_with_path(
+ cmd_tx: async_channel::Sender,
+ rsp_rx: async_channel::Receiver,
+ path: &Path,
+ ) -> Self {
+ Self
+ }
+
+ pub async fn run(&self) -> Result<()> {
+ Ok(())
+ }
}
+#[derive(Debug)]
pub struct DaemonClient;
impl DaemonClient {
pub async fn new() -> Result {
- unimplemented!("This platform does not currently support daemon mode.")
+ Ok(Self)
}
- pub async fn send_command(&mut self, _: DaemonCommand) -> Result<()> {
+ pub async fn send_command(&mut self, command: DaemonCommand) -> Result {
unimplemented!("This platform does not currently support daemon mode.")
}
}
diff --git a/burrow/src/daemon/response.rs b/burrow/src/daemon/response.rs
index 386da46..172d4c7 100644
--- a/burrow/src/daemon/response.rs
+++ b/burrow/src/daemon/response.rs
@@ -6,7 +6,7 @@ use tun::TunInterface;
pub struct DaemonResponse {
// Error types can't be serialized, so this is the second best option.
pub result: Result,
- pub id: u32,
+ pub id: u64,
}
impl DaemonResponse {
@@ -25,7 +25,7 @@ impl From for DaemonResponse {
}
impl DaemonResponse {
- pub fn with_id(self, id: u32) -> Self {
+ pub fn with_id(self, id: u64) -> Self {
Self { id, ..self }
}
}
diff --git a/burrow/src/lib.rs b/burrow/src/lib.rs
index 3dfc4ac..c5406b2 100644
--- a/burrow/src/lib.rs
+++ b/burrow/src/lib.rs
@@ -3,6 +3,10 @@ pub mod wireguard;
#[cfg(any(target_os = "linux", target_vendor = "apple"))]
mod daemon;
+pub(crate) mod tracing;
+
+#[cfg(target_vendor = "apple")]
+pub use daemon::apple::spawn_in_process;
#[cfg(any(target_os = "linux", target_vendor = "apple"))]
pub use daemon::{
DaemonClient,
@@ -12,9 +16,3 @@ pub use daemon::{
DaemonStartOptions,
ServerInfo,
};
-
-#[cfg(target_vendor = "apple")]
-mod apple;
-
-#[cfg(target_vendor = "apple")]
-pub use apple::*;
diff --git a/burrow/src/main.rs b/burrow/src/main.rs
index 18eaf77..79bb70b 100644
--- a/burrow/src/main.rs
+++ b/burrow/src/main.rs
@@ -1,14 +1,9 @@
-use anyhow::{Context, Result};
+use anyhow::Result;
use clap::{Args, Parser, Subcommand};
-use tracing::instrument;
-use tracing_log::LogTracer;
-use tracing_oslog::OsLogger;
-use tracing_subscriber::{prelude::*, EnvFilter, FmtSubscriber};
-#[cfg(any(target_os = "linux", target_vendor = "apple"))]
-use tun::TunInterface;
#[cfg(any(target_os = "linux", target_vendor = "apple"))]
mod daemon;
+pub(crate) mod tracing;
#[cfg(any(target_os = "linux", target_vendor = "apple"))]
mod wireguard;
@@ -39,8 +34,6 @@ struct Cli {
enum Commands {
/// Start Burrow
Start(StartArgs),
- /// Retrieve the file descriptor of the tun interface
- Retrieve(RetrieveArgs),
/// Stop Burrow daemon
Stop,
/// Start Burrow daemon
@@ -54,9 +47,6 @@ enum Commands {
#[derive(Args)]
struct StartArgs {}
-#[derive(Args)]
-struct RetrieveArgs {}
-
#[derive(Args)]
struct DaemonArgs {}
@@ -71,57 +61,6 @@ async fn try_start() -> Result<()> {
.map(|_| ())
}
-#[cfg(target_vendor = "apple")]
-#[instrument]
-async fn try_retrieve() -> Result<()> {
- LogTracer::init()
- .context("Failed to initialize LogTracer")
- .unwrap();
-
- if cfg!(target_os = "linux") || cfg!(target_vendor = "apple") {
- let maybe_layer = system_log().unwrap();
- if let Some(layer) = maybe_layer {
- let logger = layer.with_subscriber(FmtSubscriber::new());
- tracing::subscriber::set_global_default(logger)
- .context("Failed to set the global tracing subscriber")
- .unwrap();
- }
- }
-
- let iface2 = TunInterface::retrieve().ok_or(anyhow::anyhow!("No interface found"))?;
- tracing::info!("{:?}", iface2);
- Ok(())
-}
-
-async fn initialize_tracing() -> Result<()> {
- LogTracer::init().context("Failed to initialize LogTracer")?;
-
- #[cfg(any(target_os = "linux", target_vendor = "apple"))]
- {
- let maybe_layer = system_log()?;
- if let Some(layer) = maybe_layer {
- let registry = tracing_subscriber::registry()
- .with(layer)
- .with(tracing_subscriber::fmt::layer()
- .with_line_number(true)
- .with_filter(EnvFilter::from_default_env())
- );
-
- #[cfg(feature = "tokio-console")]
- let registry = registry.with(
- console_subscriber::spawn()
- .with_filter(EnvFilter::from_default_env()
- .add_directive("tokio=trace".parse()?)
- .add_directive("runtime=trace".parse()?)
- )
- );
-
- tracing::subscriber::set_global_default(registry).context("Failed to set the global tracing subscriber")?;
- }
- }
- Ok(())
-}
-
#[cfg(any(target_os = "linux", target_vendor = "apple"))]
async fn try_stop() -> Result<()> {
let mut client = DaemonClient::new().await?;
@@ -176,11 +115,6 @@ async fn try_start() -> Result<()> {
Ok(())
}
-#[cfg(not(target_vendor = "apple"))]
-async fn try_retrieve() -> Result<()> {
- Ok(())
-}
-
#[cfg(not(any(target_os = "linux", target_vendor = "apple")))]
async fn try_stop() -> Result<()> {
Ok(())
@@ -195,26 +129,17 @@ async fn try_serverinfo() -> Result<()> {
async fn try_serverconfig() -> Result<()> {
Ok(())
}
+
#[cfg(any(target_os = "linux", target_vendor = "apple"))]
#[tokio::main(flavor = "current_thread")]
async fn main() -> Result<()> {
- initialize_tracing().await?;
- tracing::info!("Platform: {}", std::env::consts::OS);
+ tracing::initialize();
let cli = Cli::parse();
match &cli.command {
- Commands::Start(..) => {
- try_start().await?;
- tracing::info!("FINISHED");
- }
- Commands::Retrieve(..) => {
- try_retrieve().await?;
- tracing::info!("FINISHED");
- }
- Commands::Stop => {
- try_stop().await?;
- }
- Commands::Daemon(_) => daemon::daemon_main(None).await?,
+ Commands::Start(..) => try_start().await?,
+ Commands::Stop => try_stop().await?,
+ Commands::Daemon(_) => daemon::daemon_main(None, None).await?,
Commands::ServerInfo => try_serverinfo().await?,
Commands::ServerConfig => try_serverconfig().await?,
}
@@ -222,23 +147,6 @@ async fn main() -> Result<()> {
Ok(())
}
-#[cfg(target_os = "linux")]
-fn system_log() -> Result