From 5ce3d1e7a1bf8d8fadc4fc56c4ec46be0a9e1bbe Mon Sep 17 00:00:00 2001 From: Joseph Henry Date: Fri, 13 Sep 2024 09:46:36 -0700 Subject: [PATCH 01/24] Fix for low-bandwidth mode --- service/OneService.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/service/OneService.cpp b/service/OneService.cpp index d9f63334..594ff02d 100644 --- a/service/OneService.cpp +++ b/service/OneService.cpp @@ -2599,6 +2599,7 @@ public: fprintf(stderr,"WARNING: using manually-specified secondary and/or tertiary ports. This can cause NAT issues." ZT_EOL_S); } _portMappingEnabled = OSUtils::jsonBool(settings["portMappingEnabled"],true); + _node->setLowBandwidthMode(OSUtils::jsonBool(settings["lowBandwidthMode"],false)); #if defined(__LINUX__) || defined(__FreeBSD__) _multicoreEnabled = OSUtils::jsonBool(settings["multicoreEnabled"],false); _concurrency = OSUtils::jsonInt(settings["concurrency"],1); From d34481d8303e50688e5943df407df58221e6781c Mon Sep 17 00:00:00 2001 From: Joseph Henry Date: Tue, 17 Sep 2024 11:04:01 -0700 Subject: [PATCH 02/24] Fix build error for BSD tap driver --- osdep/BSDEthernetTap.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/osdep/BSDEthernetTap.cpp b/osdep/BSDEthernetTap.cpp index 1a240c1a..d4dbf7f6 100644 --- a/osdep/BSDEthernetTap.cpp +++ b/osdep/BSDEthernetTap.cpp @@ -431,10 +431,12 @@ void BSDEthernetTap::threadMain() // constructing itself. Thread::sleep(500); - for (unsigned int i = 0; i < _concurrency; ++i) { - _rxThreads.push_back(std::thread([this, i, _pinning] { + bool pinning = _pinning; - if (_pinning) { + for (unsigned int i = 0; i < _concurrency; ++i) { + _rxThreads.push_back(std::thread([this, i, pinning] { + + if (pinning) { int pinCore = i % _concurrency; fprintf(stderr, "Pinning thread %d to core %d\n", i, pinCore); pthread_t self = pthread_self(); From 5799d9a15b216eb7b1e9e47dbf5bf5a55de3ac1e Mon Sep 17 00:00:00 2001 From: sh1ve <63954557+sh1ve@users.noreply.github.com> Date: Sun, 29 Sep 2024 23:49:38 +0800 Subject: [PATCH 03/24] Fix build error under certain character sets Add some padding after non-ASCII comment --- .../core/include/prometheus/client_metric.h | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/prometheus-cpp-lite-1.0/core/include/prometheus/client_metric.h b/ext/prometheus-cpp-lite-1.0/core/include/prometheus/client_metric.h index 39acff78..10e12ff7 100644 --- a/ext/prometheus-cpp-lite-1.0/core/include/prometheus/client_metric.h +++ b/ext/prometheus-cpp-lite-1.0/core/include/prometheus/client_metric.h @@ -8,6 +8,7 @@ namespace prometheus { // структура, в которую копируются значения метрик перед их сериализацией + struct ClientMetric { // Label From e1c72e6d516627f1fa342290382768ff47594860 Mon Sep 17 00:00:00 2001 From: Grant Limberg Date: Wed, 2 Oct 2024 12:59:21 -0700 Subject: [PATCH 04/24] add `make docker-release` command & update dockerfile --- Dockerfile.release | 6 +++--- make-mac.mk | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Dockerfile.release b/Dockerfile.release index 87ef6534..2a289cea 100644 --- a/Dockerfile.release +++ b/Dockerfile.release @@ -1,6 +1,6 @@ # vim: ft=dockerfile -FROM debian:bullseye +FROM debian:bookworm ARG VERSION @@ -9,9 +9,9 @@ RUN mkdir -p /usr/share/zerotier && \ curl -o /usr/share/zerotier/tmp.asc "https://download.zerotier.com/contact%40zerotier.com.gpg" && \ gpg --no-default-keyring --keyring /usr/share/zerotier/zerotier.gpg --import /usr/share/zerotier/tmp.asc && \ rm -f /usr/share/zerotier/tmp.asc && \ - echo "deb [signed-by=/usr/share/zerotier/zerotier.gpg] http://download.zerotier.com/debian/bullseye bullseye main" > /etc/apt/sources.list.d/zerotier.list + echo "deb [signed-by=/usr/share/zerotier/zerotier.gpg] http://download.zerotier.com/debian/bookworm bookworm main" > /etc/apt/sources.list.d/zerotier.list -RUN apt-get update -qq && apt-get install zerotier-one=${VERSION} curl iproute2 net-tools iputils-ping openssl libssl1.1 -y +RUN apt-get update -qq && apt-get install zerotier-one=${VERSION} curl iproute2 net-tools iputils-ping openssl libssl3 -y RUN rm -rf /var/lib/zerotier-one COPY entrypoint.sh.release /entrypoint.sh diff --git a/make-mac.mk b/make-mac.mk index 7af200ad..e10f9622 100644 --- a/make-mac.mk +++ b/make-mac.mk @@ -194,6 +194,9 @@ controller-run: _buildx FORCE central-controller-docker: _buildx FORCE docker buildx build --platform linux/arm64,linux/amd64 --no-cache -t registry.zerotier.com/zerotier-central/ztcentral-controller:${TIMESTAMP} -f ext/central-controller-docker/Dockerfile --build-arg git_branch=$(shell git name-rev --name-only HEAD) . --push @echo Image: registry.zerotier.com/zerotier-central/ztcentral-controller:${TIMESTAMP} + +docker-release: _buildx + docker buildx build --platform linux/386,linux/amd64,linux/arm/v7,linux/arm64,linux/mips64le,linux/ppc64le,linux/s390x -t zerotier/zerotier:${RELEASE_DOCKER_TAG} -t zerotier/zerotier:latest --build-arg VERSION=${RELEASE_VERSION} -f Dockerfile.release . --push clean: rm -rf MacEthernetTapAgent *.dSYM build-* *.a *.pkg *.dmg *.o node/*.o controller/*.o service/*.o osdep/*.o ext/http-parser/*.o $(CORE_OBJS) $(ONE_OBJS) zerotier-one zerotier-idtool zerotier-selftest zerotier-cli zerotier doc/node_modules zt1_update_$(ZT_BUILD_PLATFORM)_$(ZT_BUILD_ARCHITECTURE)_* rustybits/target/ From 55bbd2aec6994bc340eaec182511fe6202f1e349 Mon Sep 17 00:00:00 2001 From: travisladuke Date: Fri, 13 Sep 2024 09:59:22 -0700 Subject: [PATCH 05/24] Lower ZT_MIN_PHYSMTU regarding #2361 --- include/ZeroTierOne.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/ZeroTierOne.h b/include/ZeroTierOne.h index 44823469..fd475959 100644 --- a/include/ZeroTierOne.h +++ b/include/ZeroTierOne.h @@ -84,7 +84,7 @@ extern "C" { /** * Minimum UDP payload size allowed */ -#define ZT_MIN_PHYSMTU 1400 +#define ZT_MIN_PHYSMTU 510 /** * Maximum physical interface name length. This number is gigantic because of Windows. From 7dca7fac112522029c6f50cbf820a687dcc58f81 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Wed, 23 Oct 2024 11:03:18 -0400 Subject: [PATCH 06/24] Bump Rust library versions. --- rustybits/Cargo.lock | 503 +++++++++++++++++++++---------------------- 1 file changed, 251 insertions(+), 252 deletions(-) diff --git a/rustybits/Cargo.lock b/rustybits/Cargo.lock index 8ad2b56c..dc5cb17f 100644 --- a/rustybits/Cargo.lock +++ b/rustybits/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "addr2line" -version = "0.24.1" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5fb1d8e4442bd405fdfd1dacb42792696b0cf9cb15882e5d097b742a676d375" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" dependencies = [ "gimli", ] @@ -17,18 +17,6 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" -[[package]] -name = "ahash" -version = "0.8.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" -dependencies = [ - "cfg-if", - "once_cell", - "version_check", - "zerocopy", -] - [[package]] name = "aho-corasick" version = "1.1.3" @@ -76,15 +64,15 @@ checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" [[package]] name = "anyhow" -version = "1.0.87" +version = "1.0.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10f00e1f6e58a40e807377c75c6a7f97bf9044fab57816f2414e6f5f4499d7b8" +checksum = "c042108f3ed77fd83760a5fd79b53be043192bb3b9dba91d8c574c0ada7850c8" [[package]] name = "async-stream" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" +checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" dependencies = [ "async-stream-impl", "futures-core", @@ -93,24 +81,24 @@ dependencies = [ [[package]] name = "async-stream-impl" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" +checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.82", ] [[package]] name = "async-trait" -version = "0.1.82" +version = "0.1.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a27b8a3a6e1a44fa4c8baf1f653e4172e81486d4941f2237e20dc2d0cf4ddff1" +checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.82", ] [[package]] @@ -132,15 +120,15 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "axum" -version = "0.7.5" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a6c9af12842a67734c9a2e355436e5d03b22383ed60cf13cd0c18fbfe3dcbcf" +checksum = "504e3947307ac8326a5437504c517c4b56716c9d98fac0028c2acc7ca47d70ae" dependencies = [ "async-trait", "axum-core", @@ -158,16 +146,16 @@ dependencies = [ "rustversion", "serde", "sync_wrapper 1.0.1", - "tower 0.4.13", + "tower 0.5.1", "tower-layer", "tower-service", ] [[package]] name = "axum-core" -version = "0.4.3" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a15c63fd72d41492dc4f497196f5da1fb04fb7529e631d73630d1b491e47a2e3" +checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199" dependencies = [ "async-trait", "bytes", @@ -178,7 +166,7 @@ dependencies = [ "mime", "pin-project-lite", "rustversion", - "sync_wrapper 0.1.2", + "sync_wrapper 1.0.1", "tower-layer", "tower-service", ] @@ -274,9 +262,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.7.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" +checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da" [[package]] name = "cbindgen" @@ -299,9 +287,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.18" +version = "1.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b62ac837cdb5cb22e10a256099b4fc502b1dfe560cb282963a974d7abd80e476" +checksum = "c2e7962b54006dcfcc61cb72735f4d89bb97061dd6a7ed882ec6b8ee53714c6f" dependencies = [ "shlex", ] @@ -443,7 +431,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.82", ] [[package]] @@ -467,7 +455,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.11.1", - "syn 2.0.77", + "syn 2.0.82", ] [[package]] @@ -478,7 +466,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.77", + "syn 2.0.82", ] [[package]] @@ -531,33 +519,33 @@ dependencies = [ [[package]] name = "derive_builder" -version = "0.20.1" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd33f37ee6a119146a1781d3356a7c26028f83d779b2e04ecd45fdc75c76877b" +checksum = "507dfb09ea8b7fa618fcf76e953f4f5e192547945816d5358edffe39f6f94947" dependencies = [ "derive_builder_macro", ] [[package]] name = "derive_builder_core" -version = "0.20.1" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7431fa049613920234f22c47fdc33e6cf3ee83067091ea4277a3f8c4587aae38" +checksum = "2d5bcf7b024d6835cfb3d473887cd966994907effbe9227e8c8219824d06c4e8" dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.82", ] [[package]] name = "derive_builder_macro" -version = "0.20.1" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4abae7035bf79b9877b779505d8cf3749285b80c43941eda66604841889451dc" +checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c" dependencies = [ "derive_builder_core", - "syn 2.0.77", + "syn 2.0.82", ] [[package]] @@ -577,7 +565,7 @@ checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.82", "unicode-xid", ] @@ -696,7 +684,7 @@ checksum = "a1ab991c1362ac86c61ab6f556cff143daa22e5a15e4e189df818b2fd19fe65b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.82", ] [[package]] @@ -708,7 +696,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.82", ] [[package]] @@ -771,6 +759,12 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foldhash" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f81ec6369c545a7d40e4589b5597581fa1c441fe1cce96dd1de43159910a36a2" + [[package]] name = "foreign-types" version = "0.3.2" @@ -803,9 +797,9 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "futures" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" dependencies = [ "futures-channel", "futures-core", @@ -818,9 +812,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", @@ -828,15 +822,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" dependencies = [ "futures-core", "futures-task", @@ -845,19 +839,19 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-macro" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.82", ] [[package]] @@ -873,15 +867,15 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-timer" @@ -891,9 +885,9 @@ checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" [[package]] name = "futures-util" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-channel", "futures-core", @@ -933,9 +927,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.31.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32085ea23f3234fc7846555e85283ba4de91e21016dc0455a16286d87a292d64" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "governor" @@ -980,7 +974,7 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.12", - "indexmap 2.5.0", + "indexmap 2.6.0", "slab", "tokio", "tokio-util", @@ -999,7 +993,7 @@ dependencies = [ "futures-core", "futures-sink", "http 1.1.0", - "indexmap 2.5.0", + "indexmap 2.6.0", "slab", "tokio", "tokio-util", @@ -1017,9 +1011,16 @@ name = "hashbrown" version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" + +[[package]] +name = "hashbrown" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" dependencies = [ - "ahash", "allocator-api2", + "equivalent", + "foldhash", ] [[package]] @@ -1134,9 +1135,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.9.4" +version = "1.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" +checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" [[package]] name = "httpdate" @@ -1146,9 +1147,9 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "hyper" -version = "0.14.30" +version = "0.14.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" +checksum = "8c08302e8fa335b151b788c775ff56e7a03ae64ff85c548ee820fecb70356e85" dependencies = [ "bytes", "futures-channel", @@ -1170,9 +1171,9 @@ dependencies = [ [[package]] name = "hyper" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" +checksum = "bbbff0a806a4728c99295b254c8838933b5b082d75e3cb70c8dab21fdfbcfa9a" dependencies = [ "bytes", "futures-channel", @@ -1195,7 +1196,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3203a961e5c83b6f5498933e78b6b263e208c197b63e9c6c53cc82ffd3f63793" dependencies = [ - "hyper 1.4.1", + "hyper 1.5.0", "hyper-util", "pin-project-lite", "tokio", @@ -1209,7 +1210,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ "bytes", - "hyper 0.14.30", + "hyper 0.14.31", "native-tls", "tokio", "tokio-native-tls", @@ -1217,29 +1218,28 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da62f120a8a37763efb0cf8fdf264b884c7b8b9ac8660b900c8661030c00e6ba" +checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" dependencies = [ "bytes", "futures-channel", "futures-util", "http 1.1.0", "http-body 1.0.1", - "hyper 1.4.1", + "hyper 1.5.0", "pin-project-lite", "socket2", "tokio", - "tower 0.4.13", "tower-service", "tracing", ] [[package]] name = "iana-time-zone" -version = "0.1.60" +version = "0.1.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -1287,12 +1287,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5" +checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ "equivalent", - "hashbrown 0.14.5", + "hashbrown 0.15.0", "serde", ] @@ -1313,9 +1313,9 @@ checksum = "f958d3d68f4167080a18141e10381e7634563984a537f2a49a30fd8e53ac5767" [[package]] name = "ipnet" -version = "2.10.0" +version = "2.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "187674a687eed5fe42285b40c6291f9a01517d415fad1c3cbc6a9f778af7fcd4" +checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" [[package]] name = "itertools" @@ -1343,9 +1343,9 @@ checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "js-sys" -version = "0.3.70" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" +checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" dependencies = [ "wasm-bindgen", ] @@ -1375,9 +1375,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.158" +version = "0.2.161" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" +checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" [[package]] name = "libm" @@ -1409,11 +1409,11 @@ checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "lru" -version = "0.12.4" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37ee39891760e7d94734f6f63fedc29a2e4a152f836120753a72503f09fcf904" +checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" dependencies = [ - "hashbrown 0.14.5", + "hashbrown 0.15.0", ] [[package]] @@ -1487,7 +1487,7 @@ dependencies = [ "cfg-if", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.82", ] [[package]] @@ -1619,18 +1619,18 @@ dependencies = [ [[package]] name = "object" -version = "0.36.4" +version = "0.36.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "084f1a5821ac4c651660a94a7153d27ac9d8a53736203f58b31945ded098070a" +checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.19.0" +version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "openidconnect" @@ -1666,9 +1666,9 @@ dependencies = [ [[package]] name = "openssl" -version = "0.10.66" +version = "0.10.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" +checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" dependencies = [ "bitflags 2.6.0", "cfg-if", @@ -1687,7 +1687,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.82", ] [[package]] @@ -1698,9 +1698,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.103" +version = "0.9.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" +checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741" dependencies = [ "cc", "libc", @@ -1806,7 +1806,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ "fixedbitset", - "indexmap 2.5.0", + "indexmap 2.6.0", ] [[package]] @@ -1820,22 +1820,22 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.1.5" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +checksum = "baf123a161dde1e524adf36f90bc5d8d3462824a9c43553ad07a8183161189ec" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.5" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +checksum = "a4502d8515ca9f32f1fb543d987f63d95a14934883db45bdb48060b6b69257f8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.82", ] [[package]] @@ -1873,15 +1873,15 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] name = "portable-atomic" -version = "1.7.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da544ee218f0d287a911e9c99a39a8c9bc8fcad3cb8db5959940044ecfc67265" +checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2" [[package]] name = "powerfmt" @@ -1926,12 +1926,12 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.22" +version = "0.2.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479cf940fbbb3426c32c5d5176f62ad57549a0bb84773423ba8be9d089f5faba" +checksum = "910d41a655dac3b764f1ade94821093d3610248694320cd072303a8eedcf221d" dependencies = [ "proc-macro2", - "syn 2.0.77", + "syn 2.0.82", ] [[package]] @@ -1945,9 +1945,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" dependencies = [ "unicode-ident", ] @@ -1969,9 +1969,9 @@ dependencies = [ [[package]] name = "prost" -version = "0.13.2" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b2ecbe40f08db5c006b5764a2645f7f3f141ce756412ac9e1dd6087e6d32995" +checksum = "7b0487d90e047de87f984913713b85c601c05609aad5b0df4b4573fbf69aa13f" dependencies = [ "bytes", "prost-derive", @@ -1979,9 +1979,9 @@ dependencies = [ [[package]] name = "prost-build" -version = "0.13.2" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8650aabb6c35b860610e9cff5dc1af886c9e25073b7b1712a68972af4281302" +checksum = "0c1318b19085f08681016926435853bbf7858f9c082d0999b80550ff5d9abe15" dependencies = [ "bytes", "heck 0.5.0", @@ -1994,28 +1994,28 @@ dependencies = [ "prost", "prost-types", "regex", - "syn 2.0.77", + "syn 2.0.82", "tempfile", ] [[package]] name = "prost-derive" -version = "0.13.2" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acf0c195eebb4af52c752bec4f52f645da98b6e92077a04110c7f349477ae5ac" +checksum = "e9552f850d5f0964a4e4d0bf306459ac29323ddfbae05e35a7c0d35cb0803cc5" dependencies = [ "anyhow", "itertools 0.13.0", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.82", ] [[package]] name = "prost-types" -version = "0.13.2" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60caa6738c7369b940c3d49246a8d1749323674c65cb13010134f5c9bad5b519" +checksum = "4759aa0d3a6232fb8dbdb97b61de2c20047c68aca932c7ed76da9d788508d670" dependencies = [ "prost", ] @@ -2128,32 +2128,32 @@ dependencies = [ [[package]] name = "raw-cpuid" -version = "11.1.0" +version = "11.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb9ee317cfe3fbd54b36a511efc1edd42e216903c9cd575e686dd68a2ba90d8d" +checksum = "1ab240315c661615f2ee9f0f2cd32d5a7343a84d5ebcccb99d46e6637565e7b0" dependencies = [ "bitflags 2.6.0", ] [[package]] name = "redox_syscall" -version = "0.5.3" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" +checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" dependencies = [ "bitflags 2.6.0", ] [[package]] name = "regex" -version = "1.10.6" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" +checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.7", - "regex-syntax 0.8.4", + "regex-automata 0.4.8", + "regex-syntax 0.8.5", ] [[package]] @@ -2167,13 +2167,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.4", + "regex-syntax 0.8.5", ] [[package]] @@ -2184,9 +2184,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" @@ -2202,7 +2202,7 @@ dependencies = [ "h2 0.3.26", "http 0.2.12", "http-body 0.4.6", - "hyper 0.14.30", + "hyper 0.14.31", "hyper-tls", "ipnet", "js-sys", @@ -2255,11 +2255,12 @@ dependencies = [ [[package]] name = "ringbuf" -version = "0.4.4" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46f7f1b88601a8ee13cabf203611ccdf64345dc1c5d24de8b11e1a678ee619b6" +checksum = "726bb493fe9cac765e8f96a144c3a8396bdf766dedad22e504b70b908dcbceb4" dependencies = [ "crossbeam-utils", + "portable-atomic", ] [[package]] @@ -2300,7 +2301,7 @@ dependencies = [ [[package]] name = "rustfsm" version = "0.1.0" -source = "git+https://github.com/temporalio/sdk-core?branch=master#a8150d5c7c3fc1bfd5a941fd315abff1556cd9dc" +source = "git+https://github.com/temporalio/sdk-core?branch=master#730aadcc02767ae630e88f8f8c788a85d6bc81e6" dependencies = [ "rustfsm_procmacro", "rustfsm_trait", @@ -2309,25 +2310,25 @@ dependencies = [ [[package]] name = "rustfsm_procmacro" version = "0.1.0" -source = "git+https://github.com/temporalio/sdk-core?branch=master#a8150d5c7c3fc1bfd5a941fd315abff1556cd9dc" +source = "git+https://github.com/temporalio/sdk-core?branch=master#730aadcc02767ae630e88f8f8c788a85d6bc81e6" dependencies = [ "derive_more", "proc-macro2", "quote", "rustfsm_trait", - "syn 2.0.77", + "syn 2.0.82", ] [[package]] name = "rustfsm_trait" version = "0.1.0" -source = "git+https://github.com/temporalio/sdk-core?branch=master#a8150d5c7c3fc1bfd5a941fd315abff1556cd9dc" +source = "git+https://github.com/temporalio/sdk-core?branch=master#730aadcc02767ae630e88f8f8c788a85d6bc81e6" [[package]] name = "rustix" -version = "0.38.36" +version = "0.38.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f55e80d50763938498dd5ebb18647174e0c76dc38c5505294bb224624f30f36" +checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" dependencies = [ "bitflags 2.6.0", "errno", @@ -2338,9 +2339,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.13" +version = "0.23.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2dabaac7466917e566adb06783a81ca48944c6898a1b08b9374106dd671f4c8" +checksum = "5fbb44d7acc4e873d613422379f69f237a1b141928c02f6bc6ccfddddc2d7993" dependencies = [ "log", "once_cell", @@ -2353,12 +2354,12 @@ dependencies = [ [[package]] name = "rustls-native-certs" -version = "0.7.3" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5bfb394eeed242e909609f56089eecfe5fda225042e8b171791b9c95f5931e5" +checksum = "fcaf18a4f2be7326cd874a5fa579fae794320a0f388d365dca7e480e55f83f8a" dependencies = [ "openssl-probe", - "rustls-pemfile 2.1.3", + "rustls-pemfile 2.2.0", "rustls-pki-types", "schannel", "security-framework", @@ -2375,19 +2376,18 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "2.1.3" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "196fe16b00e106300d3e45ecfcb764fa292a535d7326a29a5875c579c7417425" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" dependencies = [ - "base64 0.22.1", "rustls-pki-types", ] [[package]] name = "rustls-pki-types" -version = "1.8.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0" +checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" [[package]] name = "rustls-webpki" @@ -2402,9 +2402,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" +checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" [[package]] name = "ryu" @@ -2414,9 +2414,9 @@ checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "schannel" -version = "0.1.24" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9aaafd5a2b6e3d657ff009d82fbd630b6bd54dd4eb06f21693925cdf80f9b8b" +checksum = "01227be5826fa0690321a2ba6c5cd57a19cf3f6a09e76973b58e61de6ab9d1c1" dependencies = [ "windows-sys 0.59.0", ] @@ -2456,9 +2456,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.11.1" +version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" +checksum = "ea4a292869320c0272d7bc55a5a6aafaff59b4f63404a003887b679a2e05b4b6" dependencies = [ "core-foundation-sys", "libc", @@ -2472,9 +2472,9 @@ checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.210" +version = "1.0.213" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" +checksum = "3ea7893ff5e2466df8d720bb615088341b295f849602c6956047f8f80f0e9bc1" dependencies = [ "serde_derive", ] @@ -2491,20 +2491,20 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.210" +version = "1.0.213" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" +checksum = "7e85ad2009c50b58e87caa8cd6dac16bdf511bbfb7af6c33df902396aa480fa5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.82", ] [[package]] name = "serde_json" -version = "1.0.128" +version = "1.0.132" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" +checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03" dependencies = [ "itoa", "memchr", @@ -2545,15 +2545,15 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.9.0" +version = "3.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69cecfa94848272156ea67b2b1a53f20fc7bc638c4a46d2f8abde08f05f4b857" +checksum = "8e28bdad6db2b8340e449f7108f020b3b092e8583a9e3fb82713e1d4e71fe817" dependencies = [ "base64 0.22.1", "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.5.0", + "indexmap 2.6.0", "serde", "serde_derive", "serde_json", @@ -2563,14 +2563,14 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.9.0" +version = "3.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8fee4991ef4f274617a51ad4af30519438dacb2f56ac773b08a1922ff743350" +checksum = "9d846214a9854ef724f3da161b426242d8de7c1fc7de2f89bb1efcb154dca79d" dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.82", ] [[package]] @@ -2728,9 +2728,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.77" +version = "2.0.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" +checksum = "83540f837a8afc019423a8edb95b52a8effe46957ee402287f4292fae35be021" dependencies = [ "proc-macro2", "quote", @@ -2751,9 +2751,9 @@ checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" [[package]] name = "sysinfo" -version = "0.31.4" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "355dbe4f8799b304b05e1b0f05fc59b2a18d36645cf169607da45bde2f69a1be" +checksum = "e3b5ae3f4f7d64646c46c4cae4e3f01d1c5d255c7406fdd7c7f999a94e488791" dependencies = [ "core-foundation-sys", "libc", @@ -2785,9 +2785,9 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.12.0" +version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" +checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" dependencies = [ "cfg-if", "fastrand", @@ -2799,7 +2799,7 @@ dependencies = [ [[package]] name = "temporal-client" version = "0.1.0" -source = "git+https://github.com/temporalio/sdk-core?branch=master#a8150d5c7c3fc1bfd5a941fd315abff1556cd9dc" +source = "git+https://github.com/temporalio/sdk-core?branch=master#730aadcc02767ae630e88f8f8c788a85d6bc81e6" dependencies = [ "anyhow", "async-trait", @@ -2807,13 +2807,12 @@ dependencies = [ "base64 0.22.1", "derive_builder", "derive_more", - "futures", "futures-retry", + "futures-util", "http 1.1.0", "http-body-util", - "hyper 1.4.1", + "hyper 1.5.0", "hyper-util", - "once_cell", "opentelemetry", "parking_lot", "prost-types", @@ -2832,13 +2831,12 @@ dependencies = [ [[package]] name = "temporal-sdk" version = "0.1.0-alpha.1" -source = "git+https://github.com/temporalio/sdk-core?branch=master#a8150d5c7c3fc1bfd5a941fd315abff1556cd9dc" +source = "git+https://github.com/temporalio/sdk-core?branch=master#730aadcc02767ae630e88f8f8c788a85d6bc81e6" dependencies = [ "anyhow", "async-trait", - "crossbeam-channel", "derive_more", - "futures", + "futures-util", "parking_lot", "prost-wkt-types", "serde", @@ -2856,7 +2854,7 @@ dependencies = [ [[package]] name = "temporal-sdk-core" version = "0.1.0" -source = "git+https://github.com/temporalio/sdk-core?branch=master#a8150d5c7c3fc1bfd5a941fd315abff1556cd9dc" +source = "git+https://github.com/temporalio/sdk-core?branch=master#730aadcc02767ae630e88f8f8c788a85d6bc81e6" dependencies = [ "anyhow", "async-trait", @@ -2868,13 +2866,12 @@ dependencies = [ "derive_more", "enum-iterator", "enum_dispatch", - "futures", + "futures-channel", "futures-util", "governor", "itertools 0.13.0", "lru", "mockall", - "once_cell", "parking_lot", "pid", "pin-project", @@ -2907,7 +2904,7 @@ dependencies = [ [[package]] name = "temporal-sdk-core-api" version = "0.1.0" -source = "git+https://github.com/temporalio/sdk-core?branch=master#a8150d5c7c3fc1bfd5a941fd315abff1556cd9dc" +source = "git+https://github.com/temporalio/sdk-core?branch=master#730aadcc02767ae630e88f8f8c788a85d6bc81e6" dependencies = [ "async-trait", "derive_builder", @@ -2925,12 +2922,13 @@ dependencies = [ [[package]] name = "temporal-sdk-core-protos" version = "0.1.0" -source = "git+https://github.com/temporalio/sdk-core?branch=master#a8150d5c7c3fc1bfd5a941fd315abff1556cd9dc" +source = "git+https://github.com/temporalio/sdk-core?branch=master#730aadcc02767ae630e88f8f8c788a85d6bc81e6" dependencies = [ "anyhow", "base64 0.22.1", "derive_more", "prost", + "prost-build", "prost-wkt", "prost-wkt-build", "prost-wkt-types", @@ -2960,22 +2958,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.63" +version = "1.0.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" +checksum = "5d11abd9594d9b38965ef50805c5e469ca9cc6f197f883f717e0269a3057b3d5" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.63" +version = "1.0.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" +checksum = "ae71770322cbd277e69d762a16c444af02aa0575ac0d174f0b9562d3b37f8602" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.82", ] [[package]] @@ -3036,9 +3034,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.40.0" +version = "1.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" +checksum = "145f3413504347a2be84393cc8a7d2fb4d863b375909ea59f2158261aa258bbb" dependencies = [ "backtrace", "bytes", @@ -3060,7 +3058,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.82", ] [[package]] @@ -3119,9 +3117,9 @@ dependencies = [ [[package]] name = "tonic" -version = "0.12.2" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6f6ba989e4b2c58ae83d862d3a3e27690b6e3ae630d0deb59f3697f32aa88ad" +checksum = "877c5b330756d856ffcc4553ab34a5684481ade925ecc54bcd1bf02b1d0d4d52" dependencies = [ "async-stream", "async-trait", @@ -3132,14 +3130,14 @@ dependencies = [ "http 1.1.0", "http-body 1.0.1", "http-body-util", - "hyper 1.4.1", + "hyper 1.5.0", "hyper-timeout", "hyper-util", "percent-encoding", "pin-project", "prost", "rustls-native-certs", - "rustls-pemfile 2.1.3", + "rustls-pemfile 2.2.0", "socket2", "tokio", "tokio-rustls", @@ -3152,15 +3150,16 @@ dependencies = [ [[package]] name = "tonic-build" -version = "0.12.2" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe4ee8877250136bd7e3d2331632810a4df4ea5e004656990d8d66d2f5ee8a67" +checksum = "9557ce109ea773b399c9b9e5dca39294110b74f1f342cb347a80d1fce8c26a11" dependencies = [ "prettyplease", "proc-macro2", "prost-build", + "prost-types", "quote", - "syn 2.0.77", + "syn 2.0.82", ] [[package]] @@ -3228,7 +3227,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.82", ] [[package]] @@ -3310,14 +3309,14 @@ checksum = "70b20a22c42c8f1cd23ce5e34f165d4d37038f5b663ad20fb6adbdf029172483" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.82", ] [[package]] name = "unicode-bidi" -version = "0.3.15" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" +checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" [[package]] name = "unicode-ident" @@ -3327,30 +3326,30 @@ checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "unicode-normalization" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" dependencies = [ "tinyvec", ] [[package]] name = "unicode-segmentation" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "unicode-width" -version = "0.1.13" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" [[package]] name = "unicode-xid" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "229730647fbc343e3a80e463c1db7f78f3855d3f3739bee0dda773c9a037c90a" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" [[package]] name = "untrusted" @@ -3372,9 +3371,9 @@ dependencies = [ [[package]] name = "uuid" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" +checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" dependencies = [ "getrandom", ] @@ -3420,9 +3419,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" +checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" dependencies = [ "cfg-if", "once_cell", @@ -3431,24 +3430,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" +checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.82", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.43" +version = "0.4.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" +checksum = "cc7ec4f8827a71586374db3e87abdb5a2bb3a15afed140221307c3ec06b1f63b" dependencies = [ "cfg-if", "js-sys", @@ -3458,9 +3457,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" +checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3468,28 +3467,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" +checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.82", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" +checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" [[package]] name = "web-sys" -version = "0.3.70" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" +checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112" dependencies = [ "js-sys", "wasm-bindgen", @@ -3556,7 +3555,7 @@ checksum = "9107ddc059d5b6fbfbffdfa7a7fe3e22a226def0b2608f72e9d552763d3e1ad7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.82", ] [[package]] @@ -3567,7 +3566,7 @@ checksum = "29bee4b38ea3cde66011baa44dba677c432a78593e202392d1e9070cf2a7fca7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.82", ] [[package]] @@ -3755,7 +3754,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.82", ] [[package]] From b7a6e106fd6dc762383d653c5c35efb44366e5ae Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Wed, 23 Oct 2024 14:08:57 -0400 Subject: [PATCH 07/24] Version increments. --- RELEASE-NOTES.md | 7 +++++++ debian/changelog | 6 ++++++ ext/installfiles/mac/ZeroTier One.pkgproj | 2 +- version.h | 2 +- zerotier-one.spec | 5 ++++- 5 files changed, 19 insertions(+), 3 deletions(-) diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 72ca1f3b..e6582207 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -1,6 +1,13 @@ ZeroTier Release Notes ====== +# 2024-10-23 -- Version 1.14.2 + + * Fix for missing entitlement on macOS Sequoia. + * Fix for a problem correctly parsing local.conf to enable low bandwidth mode. + * Increment versions of some dependent libraries. + * Other fixes. + # 2024-09-12 -- Version 1.14.1 * Multithreaded packet I/O support! Currently this is just for Linux and must diff --git a/debian/changelog b/debian/changelog index 660562f9..fdc85f86 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +zerotier-one (1.14.2) unstable; urgency=medium + + * See RELEASE-NOTES.md for release notes. + + -- Adam Ierymenko Wed, 23 Oct 2024 01:00:00 -0700 + zerotier-one (1.14.1) unstable; urgency=medium * See RELEASE-NOTES.md for release notes. diff --git a/ext/installfiles/mac/ZeroTier One.pkgproj b/ext/installfiles/mac/ZeroTier One.pkgproj index cf6af8e7..70cedf9f 100755 --- a/ext/installfiles/mac/ZeroTier One.pkgproj +++ b/ext/installfiles/mac/ZeroTier One.pkgproj @@ -701,7 +701,7 @@ USE_HFS+_COMPRESSION VERSION - 1.14.1 + 1.14.2 TYPE 0 diff --git a/version.h b/version.h index 8fff820a..6027e70e 100644 --- a/version.h +++ b/version.h @@ -27,7 +27,7 @@ /** * Revision */ -#define ZEROTIER_ONE_VERSION_REVISION 1 +#define ZEROTIER_ONE_VERSION_REVISION 2 /** * Build version diff --git a/zerotier-one.spec b/zerotier-one.spec index 414b0b62..655068bf 100644 --- a/zerotier-one.spec +++ b/zerotier-one.spec @@ -1,5 +1,5 @@ Name: zerotier-one -Version: 1.14.1 +Version: 1.14.2 Release: 1%{?dist} Summary: ZeroTier network virtualization service @@ -155,6 +155,9 @@ chmod 0755 $RPM_BUILD_ROOT/etc/init.d/zerotier-one %endif %changelog +* Wed Oct 23 2024 Adam Ierymenko - 1.14.2 +- see https://github.com/zerotier/ZeroTierOne for release notes + * Tue Mar 19 2024 Adam Ierymenko - 1.14.0 - see https://github.com/zerotier/ZeroTierOne for release notes From f959c2f4ca708a28cb20e62801d36d2c437881b9 Mon Sep 17 00:00:00 2001 From: Grant Limberg Date: Fri, 25 Oct 2024 09:26:24 -0700 Subject: [PATCH 08/24] Move osutils/OSUtils.o into CORE_OBJS When building via `make core` to make libzerotiercore.a, you can't link unless OSUtils.cpp is also built & linked. --- objects.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/objects.mk b/objects.mk index 1d8a6c0a..b58e9ca8 100644 --- a/objects.mk +++ b/objects.mk @@ -30,7 +30,8 @@ CORE_OBJS=\ node/Trace.o \ node/Utils.o \ node/Bond.o \ - node/PacketMultiplexer.o + node/PacketMultiplexer.o \ + osdep/OSUtils.o ONE_OBJS=\ controller/EmbeddedNetworkController.o \ @@ -42,7 +43,6 @@ ONE_OBJS=\ osdep/EthernetTap.o \ osdep/ManagedRoute.o \ osdep/Http.o \ - osdep/OSUtils.o \ service/SoftwareUpdater.o \ service/OneService.o From 3fcef51137ac9d32af951cb856279dcee7f1ce03 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Fri, 25 Oct 2024 14:14:01 -0400 Subject: [PATCH 09/24] Windows installer version bump. --- ext/installfiles/windows/ZeroTier One.aip | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ext/installfiles/windows/ZeroTier One.aip b/ext/installfiles/windows/ZeroTier One.aip index 0870201e..43b3223f 100644 --- a/ext/installfiles/windows/ZeroTier One.aip +++ b/ext/installfiles/windows/ZeroTier One.aip @@ -24,10 +24,10 @@ - + - + @@ -62,7 +62,7 @@ - + @@ -498,7 +498,7 @@ - + From 75a5b4438bd86e6d8243b937457a72adbe98dfbe Mon Sep 17 00:00:00 2001 From: Joseph Henry Date: Tue, 12 Nov 2024 05:59:49 -0800 Subject: [PATCH 10/24] Build fix for OpenBSD - See ticket #2397 --- osdep/EthernetTap.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osdep/EthernetTap.cpp b/osdep/EthernetTap.cpp index 0be209ec..6cfc3a9b 100644 --- a/osdep/EthernetTap.cpp +++ b/osdep/EthernetTap.cpp @@ -140,7 +140,7 @@ std::shared_ptr EthernetTap::newInstance( #endif // __NetBSD__ #ifdef __OpenBSD__ - return std::shared_ptr(new BSDEthernetTap(homePath,mac,mtu,metric,nwid,friendlyName,handler,arg)); + return std::shared_ptr(new BSDEthernetTap(homePath,concurrency,pinning,mac,mtu,metric,nwid,friendlyName,handler,arg)); #endif // __OpenBSD__ #endif // ZT_SDK? From 969c0ee6e367628d47a3fb15d5fb1339cce812bc Mon Sep 17 00:00:00 2001 From: Joseph Henry Date: Tue, 12 Nov 2024 14:40:24 -0800 Subject: [PATCH 11/24] Omit CPU pinning code on OpenBSD --- osdep/BSDEthernetTap.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/osdep/BSDEthernetTap.cpp b/osdep/BSDEthernetTap.cpp index d4dbf7f6..32a498ed 100644 --- a/osdep/BSDEthernetTap.cpp +++ b/osdep/BSDEthernetTap.cpp @@ -431,6 +431,7 @@ void BSDEthernetTap::threadMain() // constructing itself. Thread::sleep(500); +#ifndef __OpenBSD__ bool pinning = _pinning; for (unsigned int i = 0; i < _concurrency; ++i) { @@ -451,6 +452,7 @@ void BSDEthernetTap::threadMain() exit(1); } } +#endif // __OpenBSD__ uint8_t b[ZT_TAP_BUF_SIZE]; MAC to, from; From 82c6454950797287466691144785d93376062239 Mon Sep 17 00:00:00 2001 From: Joseph Henry Date: Wed, 13 Nov 2024 09:01:09 -0800 Subject: [PATCH 12/24] Fix broken ifdef on OpenBSD --- osdep/BSDEthernetTap.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/osdep/BSDEthernetTap.cpp b/osdep/BSDEthernetTap.cpp index 32a498ed..b2ea98b3 100644 --- a/osdep/BSDEthernetTap.cpp +++ b/osdep/BSDEthernetTap.cpp @@ -499,8 +499,10 @@ void BSDEthernetTap::threadMain() } } } +#ifndef __OpenBSD__ })); } +#endif // __OpenBSD__ } } // namespace ZeroTier From 003b4cf8762ae735c00d6598407d9fe5533db15c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Nov 2024 17:00:23 +0000 Subject: [PATCH 13/24] Bump rustls from 0.23.15 to 0.23.18 in /rustybits Bumps [rustls](https://github.com/rustls/rustls) from 0.23.15 to 0.23.18. - [Release notes](https://github.com/rustls/rustls/releases) - [Changelog](https://github.com/rustls/rustls/blob/main/CHANGELOG.md) - [Commits](https://github.com/rustls/rustls/compare/v/0.23.15...v/0.23.18) --- updated-dependencies: - dependency-name: rustls dependency-type: indirect ... Signed-off-by: dependabot[bot] --- rustybits/Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rustybits/Cargo.lock b/rustybits/Cargo.lock index dc5cb17f..24681f5f 100644 --- a/rustybits/Cargo.lock +++ b/rustybits/Cargo.lock @@ -2339,9 +2339,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.15" +version = "0.23.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fbb44d7acc4e873d613422379f69f237a1b141928c02f6bc6ccfddddc2d7993" +checksum = "9c9cc1d47e243d655ace55ed38201c19ae02c148ae56412ab8750e8f0166ab7f" dependencies = [ "log", "once_cell", From 724002f1420c9f7bdfa39b24740e3c290ae1f5b7 Mon Sep 17 00:00:00 2001 From: Grant Limberg Date: Wed, 4 Dec 2024 13:43:34 -0800 Subject: [PATCH 14/24] update rust dependencies --- rustybits/Cargo.lock | 793 ++++++++++++++++++++++++++++--------------- 1 file changed, 527 insertions(+), 266 deletions(-) diff --git a/rustybits/Cargo.lock b/rustybits/Cargo.lock index 24681f5f..1db2b9ea 100644 --- a/rustybits/Cargo.lock +++ b/rustybits/Cargo.lock @@ -28,9 +28,9 @@ dependencies = [ [[package]] name = "allocator-api2" -version = "0.2.18" +version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" [[package]] name = "android-tzdata" @@ -58,15 +58,15 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.8" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" +checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" [[package]] name = "anyhow" -version = "1.0.91" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c042108f3ed77fd83760a5fd79b53be043192bb3b9dba91d8c574c0ada7850c8" +checksum = "c1fd03a028ef38ba2276dce7e33fcd6369c158a1bca17946c4b1b701891c1ff7" [[package]] name = "async-stream" @@ -87,7 +87,7 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.90", ] [[package]] @@ -98,7 +98,7 @@ checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.90", ] [[package]] @@ -113,7 +113,7 @@ version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ - "hermit-abi 0.1.19", + "hermit-abi", "libc", "winapi", ] @@ -126,15 +126,15 @@ checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "axum" -version = "0.7.7" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "504e3947307ac8326a5437504c517c4b56716c9d98fac0028c2acc7ca47d70ae" +checksum = "edca88bc138befd0323b20752846e6587272d3b03b0343c8ea28a6f819e6e71f" dependencies = [ "async-trait", "axum-core", "bytes", "futures-util", - "http 1.1.0", + "http 1.2.0", "http-body 1.0.1", "http-body-util", "itoa", @@ -145,7 +145,7 @@ dependencies = [ "pin-project-lite", "rustversion", "serde", - "sync_wrapper 1.0.1", + "sync_wrapper 1.0.2", "tower 0.5.1", "tower-layer", "tower-service", @@ -160,13 +160,13 @@ dependencies = [ "async-trait", "bytes", "futures-util", - "http 1.1.0", + "http 1.2.0", "http-body 1.0.1", "http-body-util", "mime", "pin-project-lite", "rustversion", - "sync_wrapper 1.0.1", + "sync_wrapper 1.0.2", "tower-layer", "tower-service", ] @@ -262,9 +262,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da" +checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" [[package]] name = "cbindgen" @@ -287,9 +287,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.31" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2e7962b54006dcfcc61cb72735f4d89bb97061dd6a7ed882ec6b8ee53714c6f" +checksum = "f34d93e62b03caf570cccc334cbc6c2fceca82f39211051345108adcba3eebdc" dependencies = [ "shlex", ] @@ -346,6 +346,16 @@ dependencies = [ "libc", ] +[[package]] +name = "core-foundation" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b55271e5c8c478ad3f38ad24ef34923091e0548492a266d19b3c0b4d82574c63" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "core-foundation-sys" version = "0.8.7" @@ -354,9 +364,9 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.14" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" +checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3" dependencies = [ "libc", ] @@ -431,7 +441,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.90", ] [[package]] @@ -455,7 +465,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.11.1", - "syn 2.0.82", + "syn 2.0.90", ] [[package]] @@ -466,20 +476,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.82", -] - -[[package]] -name = "dashmap" -version = "5.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" -dependencies = [ - "cfg-if", - "hashbrown 0.14.5", - "lock_api", - "once_cell", - "parking_lot_core", + "syn 2.0.90", ] [[package]] @@ -535,7 +532,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.90", ] [[package]] @@ -545,7 +542,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c" dependencies = [ "derive_builder_core", - "syn 2.0.82", + "syn 2.0.90", ] [[package]] @@ -565,7 +562,7 @@ checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.90", "unicode-xid", ] @@ -581,6 +578,17 @@ dependencies = [ "subtle", ] +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + [[package]] name = "downcast" version = "0.11.0" @@ -660,9 +668,9 @@ dependencies = [ [[package]] name = "encoding_rs" -version = "0.8.34" +version = "0.8.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" dependencies = [ "cfg-if", ] @@ -684,7 +692,7 @@ checksum = "a1ab991c1362ac86c61ab6f556cff143daa22e5a15e4e189df818b2fd19fe65b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.90", ] [[package]] @@ -696,7 +704,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.90", ] [[package]] @@ -717,19 +725,19 @@ dependencies = [ [[package]] name = "errno" -version = "0.3.9" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "fastrand" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" +checksum = "486f806e73c5707928240ddc295403b1b93c96a02038563881c4a2fd84b81ac4" [[package]] name = "ff" @@ -851,7 +859,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.90", ] [[package]] @@ -933,14 +941,15 @@ checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "governor" -version = "0.6.3" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68a7f542ee6b35af73b06abc0dad1c1bae89964e4e253bc4b587b91c9637867b" +checksum = "0746aa765db78b521451ef74221663b57ba595bf83f75d0ce23cc09447c8139f" dependencies = [ "cfg-if", - "dashmap 5.5.3", - "futures", + "dashmap", + "futures-sink", "futures-timer", + "futures-util", "no-std-compat", "nonzero_ext", "parking_lot", @@ -974,7 +983,7 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.12", - "indexmap 2.6.0", + "indexmap 2.7.0", "slab", "tokio", "tokio-util", @@ -983,17 +992,17 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205" +checksum = "ccae279728d634d083c00f6099cb58f01cc99c145b84b8be2f6c74618d79922e" dependencies = [ "atomic-waker", "bytes", "fnv", "futures-core", "futures-sink", - "http 1.1.0", - "indexmap 2.6.0", + "http 1.2.0", + "indexmap 2.7.0", "slab", "tokio", "tokio-util", @@ -1014,9 +1023,9 @@ checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" [[package]] name = "hashbrown" -version = "0.15.0" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" dependencies = [ "allocator-api2", "equivalent", @@ -1047,12 +1056,6 @@ dependencies = [ "libc", ] -[[package]] -name = "hermit-abi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" - [[package]] name = "hex" version = "0.4.3" @@ -1090,9 +1093,9 @@ dependencies = [ [[package]] name = "http" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" +checksum = "f16ca2af56261c99fba8bac40a10251ce8188205a4c448fbb745a2e4daa76fea" dependencies = [ "bytes", "fnv", @@ -1117,7 +1120,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", - "http 1.1.0", + "http 1.2.0", ] [[package]] @@ -1128,7 +1131,7 @@ checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" dependencies = [ "bytes", "futures-util", - "http 1.1.0", + "http 1.2.0", "http-body 1.0.1", "pin-project-lite", ] @@ -1171,15 +1174,15 @@ dependencies = [ [[package]] name = "hyper" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbbff0a806a4728c99295b254c8838933b5b082d75e3cb70c8dab21fdfbcfa9a" +checksum = "97818827ef4f364230e16705d4706e2897df2bb60617d6ca15d598025a3c481f" dependencies = [ "bytes", "futures-channel", "futures-util", - "h2 0.4.6", - "http 1.1.0", + "h2 0.4.7", + "http 1.2.0", "http-body 1.0.1", "httparse", "httpdate", @@ -1192,11 +1195,11 @@ dependencies = [ [[package]] name = "hyper-timeout" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3203a961e5c83b6f5498933e78b6b263e208c197b63e9c6c53cc82ffd3f63793" +checksum = "2b90d566bffbce6a75bd8b09a05aa8c2cb1fabb6cb348f8840c9e4c90a0d83b0" dependencies = [ - "hyper 1.5.0", + "hyper 1.5.1", "hyper-util", "pin-project-lite", "tokio", @@ -1218,16 +1221,16 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" dependencies = [ "bytes", "futures-channel", "futures-util", - "http 1.1.0", + "http 1.2.0", "http-body 1.0.1", - "hyper 1.5.0", + "hyper 1.5.1", "pin-project-lite", "socket2", "tokio", @@ -1258,6 +1261,124 @@ dependencies = [ "cc", ] +[[package]] +name = "icu_collections" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + [[package]] name = "ident_case" version = "1.0.1" @@ -1266,12 +1387,23 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.5.0" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" +dependencies = [ + "icu_normalizer", + "icu_properties", ] [[package]] @@ -1287,12 +1419,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.6.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" +checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f" dependencies = [ "equivalent", - "hashbrown 0.15.0", + "hashbrown 0.15.2", "serde", ] @@ -1337,16 +1469,17 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.11" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" [[package]] name = "js-sys" -version = "0.3.72" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" +checksum = "a865e038f7f6ed956f788f0d7d60c541fff74c7bd74272c5d4cf15c63743e705" dependencies = [ + "once_cell", "wasm-bindgen", ] @@ -1375,15 +1508,15 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.161" +version = "0.2.167" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" +checksum = "09d6582e104315a817dff97f75133544b2e094ee22447d2acf4a74e189ba06fc" [[package]] name = "libm" -version = "0.2.8" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" +checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" [[package]] name = "linux-raw-sys" @@ -1391,6 +1524,12 @@ version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +[[package]] +name = "litemap" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" + [[package]] name = "lock_api" version = "0.4.12" @@ -1413,7 +1552,7 @@ version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" dependencies = [ - "hashbrown 0.15.0", + "hashbrown 0.15.2", ] [[package]] @@ -1454,11 +1593,10 @@ dependencies = [ [[package]] name = "mio" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" +checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" dependencies = [ - "hermit-abi 0.3.9", "libc", "wasi", "windows-sys 0.52.0", @@ -1466,9 +1604,9 @@ dependencies = [ [[package]] name = "mockall" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c28b3fb6d753d28c20e826cd46ee611fda1cf3cde03a443a974043247c065a" +checksum = "39a6bfcc6c8c7eed5ee98b9c3e33adc726054389233e201c95dab2d41a3839d2" dependencies = [ "cfg-if", "downcast", @@ -1480,14 +1618,14 @@ dependencies = [ [[package]] name = "mockall_derive" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "341014e7f530314e9a1fdbc7400b244efea7122662c96bfa248c31da5bfb2020" +checksum = "25ca3004c2efe9011bd4e461bd8256445052b9615405b4f7ea43fc8ca5c20898" dependencies = [ "cfg-if", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.90", ] [[package]] @@ -1508,7 +1646,7 @@ dependencies = [ "openssl-probe", "openssl-sys", "schannel", - "security-framework", + "security-framework 2.11.1", "security-framework-sys", "tempfile", ] @@ -1613,7 +1751,7 @@ dependencies = [ "serde_json", "serde_path_to_error", "sha2", - "thiserror", + "thiserror 1.0.69", "url", ] @@ -1660,7 +1798,7 @@ dependencies = [ "serde_with", "sha2", "subtle", - "thiserror", + "thiserror 1.0.69", "url", ] @@ -1687,7 +1825,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.90", ] [[package]] @@ -1710,16 +1848,16 @@ dependencies = [ [[package]] name = "opentelemetry" -version = "0.24.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c365a63eec4f55b7efeceb724f1336f26a9cf3427b70e59e2cd2a5b947fba96" +checksum = "570074cc999d1a58184080966e5bd3bf3a9a4af650c3b05047c2621e7405cd17" dependencies = [ "futures-core", "futures-sink", "js-sys", "once_cell", "pin-project-lite", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -1806,7 +1944,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ "fixedbitset", - "indexmap 2.6.0", + "indexmap 2.7.0", ] [[package]] @@ -1820,29 +1958,29 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.1.6" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf123a161dde1e524adf36f90bc5d8d3462824a9c43553ad07a8183161189ec" +checksum = "be57f64e946e500c8ee36ef6331845d40a93055567ec57e8fae13efd33759b95" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.6" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4502d8515ca9f32f1fb543d987f63d95a14934883db45bdb48060b6b69257f8" +checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.90", ] [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" [[package]] name = "pin-utils" @@ -1879,9 +2017,9 @@ checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] name = "portable-atomic" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2" +checksum = "280dc24453071f1b63954171985a0b0d30058d287960968b9b2aca264c8d4ee6" [[package]] name = "powerfmt" @@ -1926,12 +2064,12 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.24" +version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "910d41a655dac3b764f1ade94821093d3610248694320cd072303a8eedcf221d" +checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" dependencies = [ "proc-macro2", - "syn 2.0.82", + "syn 2.0.90", ] [[package]] @@ -1945,9 +2083,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.89" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" dependencies = [ "unicode-ident", ] @@ -1964,7 +2102,7 @@ dependencies = [ "memchr", "parking_lot", "protobuf", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -1994,7 +2132,7 @@ dependencies = [ "prost", "prost-types", "regex", - "syn 2.0.82", + "syn 2.0.90", "tempfile", ] @@ -2008,7 +2146,7 @@ dependencies = [ "itertools 0.13.0", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.90", ] [[package]] @@ -2146,13 +2284,13 @@ dependencies = [ [[package]] name = "regex" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.8", + "regex-automata 0.4.9", "regex-syntax 0.8.5", ] @@ -2167,9 +2305,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", @@ -2265,9 +2403,9 @@ dependencies = [ [[package]] name = "rsa" -version = "0.9.6" +version = "0.9.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d0e5124fcb30e76a7e79bfee683a2746db83784b86289f6251b54b7950a0dfc" +checksum = "47c75d7c5c6b673e58bf54d8544a9f432e3a925b0e80f7cd3602ab5c50c55519" dependencies = [ "const-oid", "digest", @@ -2301,7 +2439,7 @@ dependencies = [ [[package]] name = "rustfsm" version = "0.1.0" -source = "git+https://github.com/temporalio/sdk-core?branch=master#730aadcc02767ae630e88f8f8c788a85d6bc81e6" +source = "git+https://github.com/temporalio/sdk-core?branch=master#4a2368d19f57e971ca9b2465f1dbeede7a861c34" dependencies = [ "rustfsm_procmacro", "rustfsm_trait", @@ -2310,25 +2448,25 @@ dependencies = [ [[package]] name = "rustfsm_procmacro" version = "0.1.0" -source = "git+https://github.com/temporalio/sdk-core?branch=master#730aadcc02767ae630e88f8f8c788a85d6bc81e6" +source = "git+https://github.com/temporalio/sdk-core?branch=master#4a2368d19f57e971ca9b2465f1dbeede7a861c34" dependencies = [ "derive_more", "proc-macro2", "quote", "rustfsm_trait", - "syn 2.0.82", + "syn 2.0.90", ] [[package]] name = "rustfsm_trait" version = "0.1.0" -source = "git+https://github.com/temporalio/sdk-core?branch=master#730aadcc02767ae630e88f8f8c788a85d6bc81e6" +source = "git+https://github.com/temporalio/sdk-core?branch=master#4a2368d19f57e971ca9b2465f1dbeede7a861c34" [[package]] name = "rustix" -version = "0.38.37" +version = "0.38.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" +checksum = "d7f649912bc1495e167a6edee79151c84b1bad49748cb4f1f1167f459f6224f6" dependencies = [ "bitflags 2.6.0", "errno", @@ -2339,9 +2477,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.18" +version = "0.23.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c9cc1d47e243d655ace55ed38201c19ae02c148ae56412ab8750e8f0166ab7f" +checksum = "934b404430bb06b3fae2cba809eb45a1ab1aecd64491213d7c3301b88393f8d1" dependencies = [ "log", "once_cell", @@ -2354,15 +2492,14 @@ dependencies = [ [[package]] name = "rustls-native-certs" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcaf18a4f2be7326cd874a5fa579fae794320a0f388d365dca7e480e55f83f8a" +checksum = "7fcff2dd52b58a8d98a70243663a0d234c4e2b79235637849d15913394a247d3" dependencies = [ "openssl-probe", - "rustls-pemfile 2.2.0", "rustls-pki-types", "schannel", - "security-framework", + "security-framework 3.0.1", ] [[package]] @@ -2414,9 +2551,9 @@ checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "schannel" -version = "0.1.26" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01227be5826fa0690321a2ba6c5cd57a19cf3f6a09e76973b58e61de6ab9d1c1" +checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" dependencies = [ "windows-sys 0.59.0", ] @@ -2448,7 +2585,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ "bitflags 2.6.0", - "core-foundation", + "core-foundation 0.9.4", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1415a607e92bec364ea2cf9264646dcce0f91e6d65281bd6f2819cca3bf39c8" +dependencies = [ + "bitflags 2.6.0", + "core-foundation 0.10.0", "core-foundation-sys", "libc", "security-framework-sys", @@ -2456,9 +2606,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.12.0" +version = "2.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea4a292869320c0272d7bc55a5a6aafaff59b4f63404a003887b679a2e05b4b6" +checksum = "fa39c7303dc58b5543c94d22c1766b0d31f2ee58306363ea622b10bbc075eaa2" dependencies = [ "core-foundation-sys", "libc", @@ -2472,9 +2622,9 @@ checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.213" +version = "1.0.215" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ea7893ff5e2466df8d720bb615088341b295f849602c6956047f8f80f0e9bc1" +checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f" dependencies = [ "serde_derive", ] @@ -2491,20 +2641,20 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.213" +version = "1.0.215" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e85ad2009c50b58e87caa8cd6dac16bdf511bbfb7af6c33df902396aa480fa5" +checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.90", ] [[package]] name = "serde_json" -version = "1.0.132" +version = "1.0.133" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03" +checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377" dependencies = [ "itoa", "memchr", @@ -2553,7 +2703,7 @@ dependencies = [ "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.6.0", + "indexmap 2.7.0", "serde", "serde_derive", "serde_json", @@ -2570,7 +2720,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.90", ] [[package]] @@ -2664,9 +2814,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.7" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" +checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8" dependencies = [ "libc", "windows-sys 0.52.0", @@ -2697,6 +2847,12 @@ dependencies = [ "der", ] +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + [[package]] name = "strsim" version = "0.8.0" @@ -2728,9 +2884,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.82" +version = "2.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83540f837a8afc019423a8edb95b52a8effe46957ee402287f4292fae35be021" +checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" dependencies = [ "proc-macro2", "quote", @@ -2745,15 +2901,26 @@ checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" [[package]] name = "sync_wrapper" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" + +[[package]] +name = "synstructure" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] [[package]] name = "sysinfo" -version = "0.32.0" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3b5ae3f4f7d64646c46c4cae4e3f01d1c5d255c7406fdd7c7f999a94e488791" +checksum = "4c33cd241af0f2e9e3b5c32163b873b29956890b5342e6745b917ce9d490f4af" dependencies = [ "core-foundation-sys", "libc", @@ -2769,7 +2936,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" dependencies = [ "bitflags 1.3.2", - "core-foundation", + "core-foundation 0.9.4", "system-configuration-sys", ] @@ -2785,9 +2952,9 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.13.0" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" +checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c" dependencies = [ "cfg-if", "fastrand", @@ -2799,7 +2966,7 @@ dependencies = [ [[package]] name = "temporal-client" version = "0.1.0" -source = "git+https://github.com/temporalio/sdk-core?branch=master#730aadcc02767ae630e88f8f8c788a85d6bc81e6" +source = "git+https://github.com/temporalio/sdk-core?branch=master#4a2368d19f57e971ca9b2465f1dbeede7a861c34" dependencies = [ "anyhow", "async-trait", @@ -2809,9 +2976,9 @@ dependencies = [ "derive_more", "futures-retry", "futures-util", - "http 1.1.0", + "http 1.2.0", "http-body-util", - "hyper 1.5.0", + "hyper 1.5.1", "hyper-util", "opentelemetry", "parking_lot", @@ -2819,7 +2986,7 @@ dependencies = [ "slotmap", "temporal-sdk-core-api", "temporal-sdk-core-protos", - "thiserror", + "thiserror 2.0.4", "tokio", "tonic", "tower 0.5.1", @@ -2831,7 +2998,7 @@ dependencies = [ [[package]] name = "temporal-sdk" version = "0.1.0-alpha.1" -source = "git+https://github.com/temporalio/sdk-core?branch=master#730aadcc02767ae630e88f8f8c788a85d6bc81e6" +source = "git+https://github.com/temporalio/sdk-core?branch=master#4a2368d19f57e971ca9b2465f1dbeede7a861c34" dependencies = [ "anyhow", "async-trait", @@ -2844,7 +3011,7 @@ dependencies = [ "temporal-sdk-core", "temporal-sdk-core-api", "temporal-sdk-core-protos", - "thiserror", + "thiserror 2.0.4", "tokio", "tokio-stream", "tokio-util", @@ -2854,14 +3021,14 @@ dependencies = [ [[package]] name = "temporal-sdk-core" version = "0.1.0" -source = "git+https://github.com/temporalio/sdk-core?branch=master#730aadcc02767ae630e88f8f8c788a85d6bc81e6" +source = "git+https://github.com/temporalio/sdk-core?branch=master#4a2368d19f57e971ca9b2465f1dbeede7a861c34" dependencies = [ "anyhow", "async-trait", "crossbeam-channel", "crossbeam-queue", "crossbeam-utils", - "dashmap 6.1.0", + "dashmap", "derive_builder", "derive_more", "enum-iterator", @@ -2889,7 +3056,7 @@ dependencies = [ "temporal-client", "temporal-sdk-core-api", "temporal-sdk-core-protos", - "thiserror", + "thiserror 2.0.4", "tokio", "tokio-stream", "tokio-util", @@ -2904,16 +3071,17 @@ dependencies = [ [[package]] name = "temporal-sdk-core-api" version = "0.1.0" -source = "git+https://github.com/temporalio/sdk-core?branch=master#730aadcc02767ae630e88f8f8c788a85d6bc81e6" +source = "git+https://github.com/temporalio/sdk-core?branch=master#4a2368d19f57e971ca9b2465f1dbeede7a861c34" dependencies = [ "async-trait", "derive_builder", "derive_more", "opentelemetry", + "prost", "prost-types", "serde_json", "temporal-sdk-core-protos", - "thiserror", + "thiserror 2.0.4", "tonic", "tracing-core", "url", @@ -2922,20 +3090,21 @@ dependencies = [ [[package]] name = "temporal-sdk-core-protos" version = "0.1.0" -source = "git+https://github.com/temporalio/sdk-core?branch=master#730aadcc02767ae630e88f8f8c788a85d6bc81e6" +source = "git+https://github.com/temporalio/sdk-core?branch=master#4a2368d19f57e971ca9b2465f1dbeede7a861c34" dependencies = [ "anyhow", "base64 0.22.1", "derive_more", "prost", "prost-build", + "prost-types", "prost-wkt", "prost-wkt-build", "prost-wkt-types", "rand", "serde", "serde_json", - "thiserror", + "thiserror 2.0.4", "tonic", "tonic-build", "uuid", @@ -2958,22 +3127,42 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.65" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d11abd9594d9b38965ef50805c5e469ca9cc6f197f883f717e0269a3057b3d5" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ - "thiserror-impl", + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f49a1853cf82743e3b7950f77e0f4d622ca36cf4317cba00c767838bac8d490" +dependencies = [ + "thiserror-impl 2.0.4", ] [[package]] name = "thiserror-impl" -version = "1.0.65" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae71770322cbd277e69d762a16c444af02aa0575ac0d174f0b9562d3b37f8602" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.90", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8381894bb3efe0c4acac3ded651301ceee58a15d47c2e34885ed1908ad667061" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", ] [[package]] @@ -2988,9 +3177,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.36" +version = "0.3.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" +checksum = "35e7868883861bd0e56d9ac6efcaaca0d6d5d82a2a7ec8209ff492c07cf37b21" dependencies = [ "deranged", "itoa", @@ -3009,34 +3198,29 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" +checksum = "2834e6017e3e5e4b9834939793b282bc03b37a3336245fa820e35e233e2a85de" dependencies = [ "num-conv", "time-core", ] [[package]] -name = "tinyvec" -version = "1.8.0" +name = "tinystr" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" dependencies = [ - "tinyvec_macros", + "displaydoc", + "zerovec", ] -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - [[package]] name = "tokio" -version = "1.41.0" +version = "1.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "145f3413504347a2be84393cc8a7d2fb4d863b375909ea59f2158261aa258bbb" +checksum = "5cec9b21b0450273377fc97bd4c33a8acffc8c996c987a7c5b319a0083707551" dependencies = [ "backtrace", "bytes", @@ -3058,7 +3242,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.90", ] [[package]] @@ -3095,9 +3279,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.12" +version = "0.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" +checksum = "d7fcaa8d55a2bdd6b83ace262b016eca0d79ee02818c5c1bcdf0305114081078" dependencies = [ "bytes", "futures-core", @@ -3126,11 +3310,11 @@ dependencies = [ "axum", "base64 0.22.1", "bytes", - "h2 0.4.6", - "http 1.1.0", + "h2 0.4.7", + "http 1.2.0", "http-body 1.0.1", "http-body-util", - "hyper 1.5.0", + "hyper 1.5.1", "hyper-timeout", "hyper-util", "percent-encoding", @@ -3159,7 +3343,7 @@ dependencies = [ "prost-build", "prost-types", "quote", - "syn 2.0.82", + "syn 2.0.90", ] [[package]] @@ -3210,9 +3394,9 @@ checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" -version = "0.1.40" +version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" dependencies = [ "pin-project-lite", "tracing-attributes", @@ -3221,20 +3405,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.27" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.90", ] [[package]] name = "tracing-core" -version = "0.1.32" +version = "0.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" dependencies = [ "once_cell", "valuable", @@ -3253,9 +3437,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.18" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" dependencies = [ "matchers", "nu-ansi-term", @@ -3309,29 +3493,14 @@ checksum = "70b20a22c42c8f1cd23ce5e34f165d4d37038f5b663ad20fb6adbdf029172483" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.90", ] -[[package]] -name = "unicode-bidi" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" - [[package]] name = "unicode-ident" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" - -[[package]] -name = "unicode-normalization" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" -dependencies = [ - "tinyvec", -] +checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" [[package]] name = "unicode-segmentation" @@ -3359,9 +3528,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.2" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" +checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" dependencies = [ "form_urlencoded", "idna", @@ -3369,6 +3538,18 @@ dependencies = [ "serde", ] +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + [[package]] name = "uuid" version = "1.11.0" @@ -3419,9 +3600,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.95" +version = "0.2.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" +checksum = "d15e63b4482863c109d70a7b8706c1e364eb6ea449b201a76c5b89cedcec2d5c" dependencies = [ "cfg-if", "once_cell", @@ -3430,36 +3611,37 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.95" +version = "0.2.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" +checksum = "8d36ef12e3aaca16ddd3f67922bc63e48e953f126de60bd33ccc0101ef9998cd" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.90", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.45" +version = "0.4.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc7ec4f8827a71586374db3e87abdb5a2bb3a15afed140221307c3ec06b1f63b" +checksum = "9dfaf8f50e5f293737ee323940c7d8b08a66a95a419223d9f41610ca08b0833d" dependencies = [ "cfg-if", "js-sys", + "once_cell", "wasm-bindgen", "web-sys", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.95" +version = "0.2.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" +checksum = "705440e08b42d3e4b36de7d66c944be628d579796b8090bfa3471478a2260051" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3467,28 +3649,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.95" +version = "0.2.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" +checksum = "98c9ae5a76e46f4deecd0f0255cc223cfa18dc9b261213b8aa0c7b36f61b3f1d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.90", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.95" +version = "0.2.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" +checksum = "6ee99da9c5ba11bd675621338ef6fa52296b76b83305e9b6e5c77d4c286d6d49" [[package]] name = "web-sys" -version = "0.3.72" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112" +checksum = "a98bc3c33f0fe7e59ad7cd041b89034fa82a7c2d4365ca538dda6cdaf513863c" dependencies = [ "js-sys", "wasm-bindgen", @@ -3555,7 +3737,7 @@ checksum = "9107ddc059d5b6fbfbffdfa7a7fe3e22a226def0b2608f72e9d552763d3e1ad7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.90", ] [[package]] @@ -3566,7 +3748,7 @@ checksum = "29bee4b38ea3cde66011baa44dba677c432a78593e202392d1e9070cf2a7fca7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.90", ] [[package]] @@ -3736,6 +3918,42 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + +[[package]] +name = "yoke" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", + "synstructure", +] + [[package]] name = "zerocopy" version = "0.7.35" @@ -3754,7 +3972,28 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.90", +] + +[[package]] +name = "zerofrom" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", + "synstructure", ] [[package]] @@ -3768,7 +4007,7 @@ dependencies = [ "openidconnect", "reqwest", "serde", - "thiserror", + "thiserror 1.0.69", "time", "tokio", "url", @@ -3779,3 +4018,25 @@ name = "zeroize" version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" + +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] From 91bec01da861966872abdf3ff47db9ef772c7598 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Feb 2025 18:50:34 +0000 Subject: [PATCH 15/24] Bump openssl from 0.10.68 to 0.10.70 in /rustybits Bumps [openssl](https://github.com/sfackler/rust-openssl) from 0.10.68 to 0.10.70. - [Release notes](https://github.com/sfackler/rust-openssl/releases) - [Commits](https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.68...openssl-v0.10.70) --- updated-dependencies: - dependency-name: openssl dependency-type: indirect ... Signed-off-by: dependabot[bot] --- rustybits/Cargo.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rustybits/Cargo.lock b/rustybits/Cargo.lock index 1db2b9ea..d7e99f49 100644 --- a/rustybits/Cargo.lock +++ b/rustybits/Cargo.lock @@ -1804,9 +1804,9 @@ dependencies = [ [[package]] name = "openssl" -version = "0.10.68" +version = "0.10.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" +checksum = "61cfb4e166a8bb8c9b55c500bc2308550148ece889be90f609377e58140f42c6" dependencies = [ "bitflags 2.6.0", "cfg-if", @@ -1836,9 +1836,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.104" +version = "0.9.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741" +checksum = "8b22d5b84be05a8d6947c7cb71f7c849aa0f112acd4bf51c2a7c1c988ac0a9dc" dependencies = [ "cc", "libc", From b736b6835d24edbe2e60bd545da016ec670d79fa Mon Sep 17 00:00:00 2001 From: Grant Limberg Date: Tue, 4 Feb 2025 15:30:25 -0800 Subject: [PATCH 16/24] Update upload-artifact action to use v4 V3 is no longer supported and throws an error on use --- .github/workflows/validate.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index bb362fb8..76c1b716 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -44,7 +44,7 @@ jobs: sudo ./.github/workflows/validate-linux.sh - name: Archive test results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{github.sha}}-test-results path: "*test-results*" From 6b113c827063972d43bf55d25b6baa66374992ac Mon Sep 17 00:00:00 2001 From: Joseph Henry Date: Wed, 26 Feb 2025 09:55:08 -0800 Subject: [PATCH 17/24] Add auto-detection of platform integer size in prometheus --- .../core/include/prometheus/counter.h | 13 ++++++++++++- .../core/include/prometheus/gauge.h | 10 ++++++++++ .../simpleapi/include/prometheus/simpleapi.h | 15 +++++++++++++-- 3 files changed, 35 insertions(+), 3 deletions(-) diff --git a/ext/prometheus-cpp-lite-1.0/core/include/prometheus/counter.h b/ext/prometheus-cpp-lite-1.0/core/include/prometheus/counter.h index 5d805373..bd309c43 100644 --- a/ext/prometheus-cpp-lite-1.0/core/include/prometheus/counter.h +++ b/ext/prometheus-cpp-lite-1.0/core/include/prometheus/counter.h @@ -25,7 +25,18 @@ namespace prometheus { /// /// The class is thread-safe. No concurrent call to any API of this type causes /// a data race. - template + +#include + +#if UINTPTR_MAX == 0xffFFffFF +// 32-bit platform +template +#elif UINTPTR_MAX == 0xffFFffFFffFFffFF +// 64-bit platform +template +#else +#error Unknown platform - does not look either like 32-bit or 64-bit +#endif class Counter : public Metric { std::atomic value{ 0 }; diff --git a/ext/prometheus-cpp-lite-1.0/core/include/prometheus/gauge.h b/ext/prometheus-cpp-lite-1.0/core/include/prometheus/gauge.h index fcda1463..2e4a4db8 100644 --- a/ext/prometheus-cpp-lite-1.0/core/include/prometheus/gauge.h +++ b/ext/prometheus-cpp-lite-1.0/core/include/prometheus/gauge.h @@ -23,7 +23,17 @@ namespace prometheus { /// /// The class is thread-safe. No concurrent call to any API of this type causes /// a data race. + #include + + #if UINTPTR_MAX == 0xffFFffFF + // 32-bit + template + #elif UINTPTR_MAX == 0xffFFffFFffFFffFF + // 64-bit template + #else + #error Unknown platform - does not look either like 32-bit or 64-bit + #endif class Gauge : public Metric { std::atomic value { 0 }; diff --git a/ext/prometheus-cpp-lite-1.0/simpleapi/include/prometheus/simpleapi.h b/ext/prometheus-cpp-lite-1.0/simpleapi/include/prometheus/simpleapi.h index bf2ec483..12e11584 100644 --- a/ext/prometheus-cpp-lite-1.0/simpleapi/include/prometheus/simpleapi.h +++ b/ext/prometheus-cpp-lite-1.0/simpleapi/include/prometheus/simpleapi.h @@ -15,6 +15,17 @@ #include #include #include +#include + +#if UINTPTR_MAX == 0xffFFffFF +// 32-bit +typedef uint32_tmetric_size; +#elif UINTPTR_MAX == 0xffFFffFFffFFffFF +// 64-bit +typedef uint64_t metric_size; +#else +#error Unknown platform - does not look either like 32-bit or 64-bit +#endif namespace prometheus { namespace simpleapi { @@ -46,7 +57,7 @@ namespace prometheus { public: - using Metric = Counter; + using Metric = Counter; using Family = Metric::Family; private: @@ -82,7 +93,7 @@ namespace prometheus { public: - using Metric = Gauge; + using Metric = Gauge; using Family = Metric::Family; private: From 3e7aacf301eab14f87ff3c8adff7685f3925ad30 Mon Sep 17 00:00:00 2001 From: Joseph Henry Date: Wed, 26 Feb 2025 09:56:08 -0800 Subject: [PATCH 18/24] Expose routing() method in httplib so changes can be made in OneService --- ext/cpp-httplib/httplib.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/cpp-httplib/httplib.h b/ext/cpp-httplib/httplib.h index dfdd260a..862e97e9 100644 --- a/ext/cpp-httplib/httplib.h +++ b/ext/cpp-httplib/httplib.h @@ -917,6 +917,8 @@ public: std::function new_task_queue; + bool routing(Request &req, Response &res, Stream &strm); + protected: bool process_request(Stream &strm, bool close_connection, bool &connection_closed, @@ -949,7 +951,6 @@ private: int bind_internal(const std::string &host, int port, int socket_flags); bool listen_internal(); - bool routing(Request &req, Response &res, Stream &strm); bool handle_file_request(const Request &req, Response &res, bool head = false); bool dispatch_request(Request &req, Response &res, From cd191778c2b3a684625ff080d8750cd2d6cbecff Mon Sep 17 00:00:00 2001 From: Joseph Henry Date: Wed, 26 Feb 2025 10:27:23 -0800 Subject: [PATCH 19/24] Add custom management plane for 3rd party vendors --- make-linux.mk | 20 +- one.cpp | 31 ++- osdep/Binder.hpp | 22 ++ osdep/EthernetTap.cpp | 5 + osdep/ExtOsdep.cpp | 534 +++++++++++++++++++++++++++++++++++++++++ osdep/ExtOsdep.hpp | 198 +++++++++++++++ osdep/ManagedRoute.cpp | 10 + service/OneService.cpp | 63 ++++- 8 files changed, 874 insertions(+), 9 deletions(-) create mode 100644 osdep/ExtOsdep.cpp create mode 100644 osdep/ExtOsdep.hpp diff --git a/make-linux.mk b/make-linux.mk index efc1badf..30eae329 100644 --- a/make-linux.mk +++ b/make-linux.mk @@ -16,8 +16,13 @@ DESTDIR?= EXTRA_DEPS?= include objects.mk -ONE_OBJS+=osdep/LinuxEthernetTap.o -ONE_OBJS+=osdep/LinuxNetLink.o +ifeq ($(ZT_EXTOSDEP),1) + ONE_OBJS+=osdep/ExtOsdep.o + override DEFS += -DZT_EXTOSDEP +else + ONE_OBJS+=osdep/LinuxEthernetTap.o + ONE_OBJS+=osdep/LinuxNetLink.o +endif # for central controller buildsk TIMESTAMP=$(shell date +"%Y%m%d%H%M") @@ -275,6 +280,10 @@ ifeq ($(CC_MACH),loongarch64) override DEFS+=-DZT_NO_TYPE_PUNNING endif +ifeq ($(ZT_EXTOSDEP), 1) + ZT_SSO_SUPPORTED=0 +endif + # Fail if system architecture could not be determined ifeq ($(ZT_ARCHITECTURE),999) ERR=$(error FATAL: architecture could not be determined from $(CC) -dumpmachine: $(CC_MACH)) @@ -339,8 +348,11 @@ ifeq ($(ZT_ARCHITECTURE),3) override CXXFLAGS+=-march=armv5t -mfloat-abi=soft -msoft-float -mno-unaligned-access -marm ZT_USE_ARM32_NEON_ASM_CRYPTO=0 else - override CFLAGS+=-mfloat-abi=hard -march=armv6zk -marm -mfpu=vfp -mno-unaligned-access -mtp=cp15 -mcpu=arm1176jzf-s - override CXXFLAGS+=-mfloat-abi=hard -march=armv6zk -marm -mfpu=vfp -fexceptions -mno-unaligned-access -mtp=cp15 -mcpu=arm1176jzf-s + ifeq ($(ZT_EXTOSDEP), 0) + override CFLAGS+=-mfloat-abi=hard -march=armv6zk -marm -mfpu=vfp -mno-unaligned-access -mtp=cp15 -mcpu=arm1176jzf-s + override CXXFLAGS+=-mfloat-abi=hard -march=armv6zk -marm -mfpu=vfp -fexceptions -mno-unaligned-access -mtp=cp15 -mcpu=arm1176jzf-s + override DEFS+=-DZT_NO_PEER_METRICS + endif ZT_USE_ARM32_NEON_ASM_CRYPTO=0 endif endif diff --git a/one.cpp b/one.cpp index 2e4e6384..61cc65f8 100644 --- a/one.cpp +++ b/one.cpp @@ -57,6 +57,7 @@ #include #include #include +#include "osdep/ExtOsdep.hpp" #ifndef ZT_NO_CAPABILITIES #include #include @@ -2110,6 +2111,17 @@ int main(int argc,char **argv) signal(SIGQUIT,&_sighandlerQuit); signal(SIGINT,&_sighandlerQuit); +#ifdef ZT_EXTOSDEP + int extosdepFd1 = -1; + int extosdepFd2 = -1; + for(int i=1;i mfd) mfd = STDOUT_FILENO; if (STDERR_FILENO > mfd) mfd = STDERR_FILENO; - for(int f=mfd+1;f<1024;++f) + for(int f=mfd+1;f<1024;++f) { +#ifdef ZT_EXTOSDEP + if (f == extosdepFd1 || f == extosdepFd2) continue; +#endif // ZT_EXTOSDEP ::close(f); + } } bool runAsDaemon = false; @@ -2224,7 +2240,9 @@ int main(int argc,char **argv) return 0; } break; #endif // __WINDOWS__ - +#ifdef ZT_EXTOSDEP + case 'x': break; +#endif case 'h': case '?': default: @@ -2354,6 +2372,15 @@ int main(int argc,char **argv) } #endif // __UNIX_LIKE__ +#ifdef ZT_EXTOSDEP + if (extosdepFd1 < 0) { + fprintf(stderr, "no extosdepFd specified\n"); + OSUtils::rm(pidPath.c_str()); + return 1; + } + ExtOsdep::init(extosdepFd1, extosdepFd2); +#endif + _OneServiceRunner thr(argv[0],homeDir,port); thr.threadMain(); //Thread::join(Thread::start(&thr)); diff --git a/osdep/Binder.hpp b/osdep/Binder.hpp index 23e6393a..5ed26ff5 100644 --- a/osdep/Binder.hpp +++ b/osdep/Binder.hpp @@ -53,6 +53,7 @@ #include "../node/Utils.hpp" #include "OSUtils.hpp" #include "Phy.hpp" +#include "../osdep/ExtOsdep.hpp" #include #include @@ -136,6 +137,25 @@ class Binder { bool interfacesEnumerated = true; if (explicitBind.empty()) { +#ifdef ZT_EXTOSDEP + std::map addrs; + interfacesEnumerated = ExtOsdep::getBindAddrs(addrs); + for (auto &a : addrs) { + auto ip = a.first; + switch(ip.ipScope()) { + default: break; + case InetAddress::IP_SCOPE_PSEUDOPRIVATE: + case InetAddress::IP_SCOPE_GLOBAL: + case InetAddress::IP_SCOPE_SHARED: + case InetAddress::IP_SCOPE_PRIVATE: + for(int x=0;x<(int)portCount;++x) { + ip.setPort(ports[x]); + localIfAddrs.insert(std::pair(ip,a.second)); + } + break; + } + } +#else // ZT_EXTOSDEP #ifdef __WINDOWS__ char aabuf[32768]; @@ -386,6 +406,8 @@ class Binder { #endif #endif + +#endif // ZT_EXTOSDEP } else { for (std::vector::const_iterator i(explicitBind.begin()); i != explicitBind.end(); ++i) { diff --git a/osdep/EthernetTap.cpp b/osdep/EthernetTap.cpp index 6cfc3a9b..6ef292cf 100644 --- a/osdep/EthernetTap.cpp +++ b/osdep/EthernetTap.cpp @@ -32,6 +32,7 @@ #endif // __APPLE__ #ifdef __LINUX__ +#include "ExtOsdep.hpp" #include "LinuxEthernetTap.hpp" #endif // __LINUX__ @@ -94,7 +95,11 @@ std::shared_ptr EthernetTap::newInstance( #endif // __APPLE__ #ifdef __LINUX__ +#ifdef ZT_EXTOSDEP + return std::shared_ptr(new ExtOsdepTap(homePath,mac,mtu,metric,nwid,friendlyName,handler,arg)); +#else return std::shared_ptr(new LinuxEthernetTap(homePath,concurrency,pinning,mac,mtu,metric,nwid,friendlyName,handler,arg)); +#endif // ZT_EXTOSDEP #endif // __LINUX__ #ifdef __WINDOWS__ diff --git a/osdep/ExtOsdep.cpp b/osdep/ExtOsdep.cpp new file mode 100644 index 00000000..9ea03340 --- /dev/null +++ b/osdep/ExtOsdep.cpp @@ -0,0 +1,534 @@ +#include +#include +#include +#include +#include "ExtOsdep.hpp" +#include +#include "../node/AtomicCounter.hpp" + +#define ZT_TAP_BUF_SIZE 16384 + +namespace ZeroTier { + +static int eodFd = -1; +static Mutex eodMutex; +static int eodMgmtFd = -1; + +struct EodRoute { + InetAddress target; + InetAddress via; + InetAddress src; + std::string ifname; +}; +static std::list allRoutes; + +template static void __eodSend(const T &t) { + write(eodFd, &t, sizeof(t)); +} + +static void strncpyx(char *dest, const char *src, size_t n) { + strncpy(dest, src, n); + if (n > 1) dest[n - 1] = 0; +} + +static int __eodWait(unsigned char msg, unsigned char *d, unsigned l, + unsigned maxl = 0, int *recvfd = nullptr) { + if (!maxl) maxl = l; + auto start = times(NULL); + while (1) { + msghdr mh; + iovec iov; + struct { + size_t cmsg_len; + int cmsg_level; + int cmsg_type; + int fd; + } __attribute__((packed)) cmsg; + memset(&mh, 0, sizeof(mh)); + mh.msg_iov = &iov; + mh.msg_iovlen = 1; + if (recvfd) { + mh.msg_control = &cmsg; + mh.msg_controllen = sizeof(cmsg); + } + iov.iov_base = d; + iov.iov_len = maxl; + + int r = recvmsg(eodFd, &mh, MSG_TRUNC | MSG_CMSG_CLOEXEC); + if (r > 0) { + if (recvfd && mh.msg_controllen >= sizeof(cmsg) + && cmsg.cmsg_len == sizeof(cmsg) + && cmsg.cmsg_level == SOL_SOCKET + && cmsg.cmsg_type == SCM_RIGHTS) { + *recvfd = cmsg.fd; + fprintf(stderr, "eodWait: received fd %d\n", *recvfd); + } + + if (d[0] != msg) { + fprintf(stderr, "eodWait: wrong msg, expected %u got %u\n", msg, d[0]); + return -1; + } + if ((unsigned)r < l || (unsigned)r > maxl) { + fprintf(stderr, "eodWait: wrong len, expected %u got %d\n", l, r); + return -1; + } + return r; + } + if (times(NULL) - start > 500) { + fprintf(stderr, "eodWait: timeout\n"); + return -1; + } + usleep(100000); + } +} + +template static bool __eodWait(unsigned msg, T &t) { + return __eodWait(msg, (unsigned char *)&t, sizeof(T)) == (int)sizeof(T); +} + +template static bool __eodXchg(const M &m, unsigned rm, R &r) { + __eodSend(m); + return __eodWait(rm, r); +} + +template static bool eodXchg(const M &m, unsigned rm, R &r) { + Mutex::Lock l(eodMutex); + return __eodXchg(m, rm, r); +} + +void ExtOsdep::init(int fd1, int fd2) { + eodFd = fd1; + eodMgmtFd = fd2; + fcntl(eodMgmtFd,F_SETFL,O_NONBLOCK); +} + +void ExtOsdep::started(int *f, void **cp) { + *f = eodMgmtFd; + *cp = (void *)eodMgmtFd; + + unsigned char msg = ZT_EOD_MSG_STARTED; + Mutex::Lock l(eodMutex); + __eodSend(msg); +} + +static std::string mgmtrd; +static std::string mgmtwr; + +bool ExtOsdep::mgmtWritable(void *cookie) { + if (cookie != (void *)eodMgmtFd) return false; + if (mgmtwr.size() == 0) return true; + auto sz = write(eodMgmtFd, mgmtwr.data(), mgmtwr.size()); + if (sz <= 0) return false; + mgmtwr.erase(mgmtwr.begin(), mgmtwr.begin() + sz); + return mgmtwr.empty(); +} + +bool ExtOsdep::mgmtRecv(void *cookie, void *data, unsigned long len, + std::function cb) { + if (cookie != (void *)eodMgmtFd) return false; + mgmtrd.append((char *)data, len); + while (1) { + auto req = (zt_eod_mgmt_req *)mgmtrd.data(); + if (mgmtrd.size() < sizeof(*req)) break; + unsigned reqsz = sizeof(*req) + req->pathlen + req->datalen; + if (mgmtrd.size() < reqsz) break; + + std::string resp; + char *p = (char *)req->data; + zt_eod_mgmt_reply rep; + rep.scode = cb(req->method, std::string(p, p + req->pathlen), + std::string(p + req->pathlen, p + req->pathlen + req->datalen), resp); + rep.datalen = resp.size(); + + mgmtrd.erase(mgmtrd.begin(), mgmtrd.begin() + reqsz); + + mgmtwr.append((char *)&rep, sizeof(rep)); + mgmtwr.append(resp); + + auto sz = write(eodMgmtFd, mgmtwr.data(), mgmtwr.size()); + if (sz > 0) mgmtwr.erase(mgmtwr.begin(), mgmtwr.begin() + sz); + } + return !mgmtwr.empty(); +} + +void ExtOsdep::routeAddDel(bool add, const InetAddress &target, const InetAddress &via, const InetAddress &src, const char *ifname) { + Mutex::Lock l(eodMutex); + + std::string ifn; + if (ifname) ifn = ifname; + if (add) { + for (auto x = allRoutes.begin(); x != allRoutes.end(); ++x) { + if (x->target == target && x->via == via + && x->src == src && x->ifname == ifn) return; + } + allRoutes.push_back({target, via, src, ifn}); + } + else { + bool found = false; + for (auto x = allRoutes.begin(); x != allRoutes.end(); ++x) { + if (x->target == target && x->via == via + && x->src == src && x->ifname == ifn) { + allRoutes.erase(x); + found = true; + break; + } + } + if (!found) return; + } + + zt_eod_msg_route req; + memset(&req, 0, sizeof(req)); + req.cmd = add ? ZT_EOD_MSG_ADDROUTE : ZT_EOD_MSG_DELROUTE; + req.afi = target.isV4() ? 1 : 2; + req.dstlen = target.netmaskBits(); + memcpy(req.dst, target.rawIpData(), target.isV4() ? 4 : 16); + if (ifname) strncpyx(req.dev, ifname, sizeof(req.dev)); + if (via) memcpy(req.gw, via.rawIpData(), target.isV4() ? 4 : 16); + if (src) memcpy(req.src, src.rawIpData(), target.isV4() ? 4 : 16); + + unsigned char resp; + __eodXchg(req, add ? ZT_EOD_MSG_ADDROUTERESP : ZT_EOD_MSG_DELROUTERESP, resp); +} + +bool ExtOsdep::getBindAddrs(std::map &ret) { + Mutex::Lock l(eodMutex); + + unsigned char req = ZT_EOD_MSG_GETBINDADDRS; + __eodSend(req); + + zt_eod_msg_getbindaddrsresp *resp; + unsigned char buf[ZT_EOD_MAXMSGSIZE]; + int r = __eodWait(ZT_EOD_MSG_GETBINDADDRSRESP, (unsigned char *)buf, sizeof(*resp), sizeof(buf)); + if (r < (int)sizeof(*resp)) return false; + + int c = (r - (int)sizeof(*resp)) / sizeof(resp->addrs[0]); + resp = (zt_eod_msg_getbindaddrsresp *)buf; + for (int i = 0; i < c; ++i) { + ret[InetAddress(resp->addrs[i].data, resp->addrs[i].afi == 1 ? 4 : 16, resp->addrs[i].len)] + = resp->addrs[i].ifname; + } + + return resp->result; +} + +ExtOsdepTap::ExtOsdepTap( + const char *homePath, + const MAC &mac, + unsigned int mtu, + unsigned int metric, + uint64_t nwid, + const char *friendlyName, + void (*handler)(void *,void *,uint64_t,const MAC &,const MAC &,unsigned int,unsigned int,const void *,unsigned int), + void *arg) : + _handler(handler), + _arg(arg), + _nwid(nwid), + _mac(mac), + _homePath(homePath), + _mtu(mtu), + _fd(0), + _enabled(true), + _run(true) + { + zt_eod_msg_addtap req; + req.cmd = ZT_EOD_MSG_ADDTAP; + req.nwid = nwid; + req.mtu = mtu; + req.metric = metric; + strncpyx(req.fname, friendlyName, sizeof(req.fname)); + mac.copyTo(req.mac, 6); + + zt_eod_msg_addtapresp resp; + + Mutex::Lock l(eodMutex); + __eodSend(req); + _fd = -1; + if (__eodWait(ZT_EOD_MSG_ADDTAPRESP, (unsigned char *)&resp, sizeof(resp), sizeof(resp), &_fd) != sizeof(resp)) + throw std::runtime_error(std::string("could not create TAP")); + + _dev = resp.name; + if (_dev.empty() || _fd < 0) + throw std::runtime_error(std::string("could not create TAP")); + + fcntl(_fd,F_SETFL,O_NONBLOCK); + + // processing shamelessly copied from LinuxEthernetTap + (void)::pipe(_shutdownSignalPipe); + for(unsigned int t=0;t<2;++t) { + _tapReaderThread[t] = std::thread([this, t]{ + fd_set readfds,nullfds; + int n,nfds,r; + void *buf = nullptr; + std::vector buffers; + + if (!_run) + return; + + FD_ZERO(&readfds); + FD_ZERO(&nullfds); + nfds = (int)std::max(_shutdownSignalPipe[0],_fd) + 1; + + r = 0; + for(;;) { + FD_SET(_shutdownSignalPipe[0],&readfds); + FD_SET(_fd,&readfds); + select(nfds,&readfds,&nullfds,&nullfds,(struct timeval *)0); + + if (FD_ISSET(_shutdownSignalPipe[0],&readfds)) // writes to shutdown pipe terminate thread + break; + + if (FD_ISSET(_fd,&readfds)) { + for(;;) { // read until there are no more packets, then return to outer select() loop + if (!buf) { + // To reduce use of the mutex, we keep a local buffer vector and + // swap (which is a pointer swap) with the global one when it's + // empty. This retrieves a batch of buffers to use. + if (buffers.empty()) { + std::lock_guard l(_buffers_l); + buffers.swap(_buffers); + } + if (buffers.empty()) { + buf = malloc(ZT_TAP_BUF_SIZE); + if (!buf) + break; + } else { + buf = buffers.back(); + buffers.pop_back(); + } + } + + n = (int)::read(_fd,reinterpret_cast(buf) + r,ZT_TAP_BUF_SIZE - r); + if (n > 0) { + // Some tap drivers like to send the ethernet frame and the + // payload in two chunks, so handle that by accumulating + // data until we have at least a frame. + r += n; + if (r > 14) { + if (r > ((int)_mtu + 14)) // sanity check for weird TAP behavior on some platforms + r = _mtu + 14; + + if (_enabled && _tapqsize.load() < 1000) { + ++_tapqsize; + _tapq.post(std::pair(buf,r)); + buf = nullptr; + } + + r = 0; + } + } else { + r = 0; + break; + } + } + } + } + }); + } + + _tapProcessorThread = std::thread([this] { + MAC to,from; + std::pair qi; + while (_tapq.get(qi)) { + --_tapqsize; + uint8_t *const b = reinterpret_cast(qi.first); + if (b) { + to.setTo(b, 6); + from.setTo(b + 6, 6); + unsigned int etherType = Utils::ntoh(((const uint16_t *)b)[6]); + _handler(_arg, nullptr, _nwid, from, to, etherType, 0, (const void *)(b + 14),(unsigned int)(qi.second - 14)); + { + std::lock_guard l(_buffers_l); + if (_buffers.size() < 128) + _buffers.push_back(qi.first); + else free(qi.first); + } + } else break; + } + }); +} + +ExtOsdepTap::~ExtOsdepTap() { + _run = false; + + (void)::write(_shutdownSignalPipe[1],"\0",1); // causes reader thread(s) to exit + _tapq.post(std::pair(nullptr,0)); // causes processor thread to exit + + _tapReaderThread[0].join(); + _tapReaderThread[1].join(); + _tapProcessorThread.join(); + + ::close(_fd); + ::close(_shutdownSignalPipe[0]); + ::close(_shutdownSignalPipe[1]); + + for(std::vector::iterator i(_buffers.begin());i!=_buffers.end();++i) + free(*i); + std::vector< std::pair > dv(_tapq.drain()); + for(std::vector< std::pair >::iterator i(dv.begin());i!=dv.end();++i) { + if (i->first) + free(i->first); + } + + zt_eod_msg_deltap req; + req.cmd = ZT_EOD_MSG_DELTAP; + strcpy(req.name, _dev.c_str()); + + unsigned char resp; + eodXchg(req, ZT_EOD_MSG_DELTAPRESP, resp); +} + +void ExtOsdepTap::setEnabled(bool en) { + _enabled = en; +} + +bool ExtOsdepTap::enabled() const { + return _enabled; +} + +void ExtOsdepTap::doRemoveIp(const InetAddress &ip) { + zt_eod_msg_ip req; + req.cmd = ZT_EOD_MSG_DELIP; + strcpy(req.name, _dev.c_str()); + req.afi = ip.isV4() ? 1 : 2; + req.len = ip.netmaskBits(); + memcpy(req.data, ip.rawIpData(), ip.isV4() ? 4 : 16); + + unsigned char resp; + __eodXchg(req, ZT_EOD_MSG_DELIPRESP, resp); +} + +bool ExtOsdepTap::addIp(const InetAddress &ip) { + Mutex::Lock l(eodMutex); + + for(auto i = allIps.begin();i!=allIps.end();++i) { + if (*i == ip) return true; + if (i->ipsEqual(ip)) doRemoveIp(*i); + } + + zt_eod_msg_ip req; + req.cmd = ZT_EOD_MSG_ADDIP; + strcpy(req.name, _dev.c_str()); + req.afi = ip.isV4() ? 1 : 2; + req.len = ip.netmaskBits(); + memcpy(req.data, ip.rawIpData(), ip.isV4() ? 4 : 16); + + unsigned char resp; + __eodXchg(req, ZT_EOD_MSG_ADDIPRESP, resp); + + allIps.push_back(ip); + + return true; +} +bool ExtOsdepTap::addIps(std::vector ips) { + return false; +} +bool ExtOsdepTap::removeIp(const InetAddress &ip) { + Mutex::Lock l(eodMutex); + for(auto i = allIps.begin();i!=allIps.end();++i) { + if (*i == ip) { + doRemoveIp(*i); + return true; + } + } + return false; +} +std::vector ExtOsdepTap::ips() const { + std::vector ret; + + Mutex::Lock l(eodMutex); + + zt_eod_msg_getips req; + req.cmd = ZT_EOD_MSG_GETIPS; + strcpy(req.name, _dev.c_str()); + __eodSend(req); + + zt_eod_msg_getipsresp *resp; + unsigned char buf[ZT_EOD_MAXMSGSIZE]; + int r = __eodWait(ZT_EOD_MSG_GETIPSRESP, (unsigned char *)buf, sizeof(*resp), sizeof(buf)); + if (r < (int)sizeof(*resp)) return ret; + + int c = (r - (int)sizeof(*resp)) / sizeof(resp->addrs[0]); + resp = (zt_eod_msg_getipsresp *)buf; + for (int i = 0; i < c; ++i) { + ret.push_back(InetAddress(resp->addrs[i].data, resp->addrs[i].afi == 1 ? 4 : 16, resp->addrs[i].len)); + } + + return ret; +} +void ExtOsdepTap::put(const MAC &from,const MAC &to,unsigned int etherType,const void *data,unsigned int len) { + char putBuf[ZT_MAX_MTU + 64]; + if ((_fd > 0)&&(len <= _mtu)&&(_enabled)) { + to.copyTo(putBuf,6); + from.copyTo(putBuf + 6,6); + *((uint16_t *)(putBuf + 12)) = htons((uint16_t)etherType); + memcpy(putBuf + 14,data,len); + len += 14; + (void)::write(_fd,putBuf,len); + } +} +std::string ExtOsdepTap::deviceName() const { + return _dev; +} +void ExtOsdepTap::setFriendlyName(const char *friendlyName) {} + +void ExtOsdepTap::scanMulticastGroups(std::vector &added,std::vector &removed) { + char *ptr,*ptr2; + unsigned char mac[6]; + std::vector newGroups; + + int fd = ::open("/proc/net/dev_mcast",O_RDONLY); + if (fd > 0) { + char buf[131072]; + int n = (int)::read(fd,buf,sizeof(buf)); + if ((n > 0)&&(n < (int)sizeof(buf))) { + buf[n] = (char)0; + for(char *l=strtok_r(buf,"\r\n",&ptr);(l);l=strtok_r((char *)0,"\r\n",&ptr)) { + int fno = 0; + char *devname = (char *)0; + char *mcastmac = (char *)0; + for(char *f=strtok_r(l," \t",&ptr2);(f);f=strtok_r((char *)0," \t",&ptr2)) { + if (fno == 1) + devname = f; + else if (fno == 4) + mcastmac = f; + ++fno; + } + if ((devname)&&(!strcmp(devname,_dev.c_str()))&&(mcastmac)&&(Utils::unhex(mcastmac,mac,6) == 6)) + newGroups.push_back(MulticastGroup(MAC(mac,6),0)); + } + } + ::close(fd); + } + + std::vector allIps(ips()); + for(std::vector::iterator ip(allIps.begin());ip!=allIps.end();++ip) + newGroups.push_back(MulticastGroup::deriveMulticastGroupForAddressResolution(*ip)); + + std::sort(newGroups.begin(),newGroups.end()); + newGroups.erase(std::unique(newGroups.begin(),newGroups.end()),newGroups.end()); + + for(std::vector::iterator m(newGroups.begin());m!=newGroups.end();++m) { + if (!std::binary_search(_multicastGroups.begin(),_multicastGroups.end(),*m)) + added.push_back(*m); + } + for(std::vector::iterator m(_multicastGroups.begin());m!=_multicastGroups.end();++m) { + if (!std::binary_search(newGroups.begin(),newGroups.end(),*m)) + removed.push_back(*m); + } + + _multicastGroups.swap(newGroups); +} +void ExtOsdepTap::setMtu(unsigned int mtu) { + if (mtu == _mtu) return; + _mtu = mtu; + + zt_eod_msg_setmtu req; + req.cmd = ZT_EOD_MSG_SETMTU; + strcpy(req.name, _dev.c_str()); + req.mtu = mtu; + + unsigned char resp; + eodXchg(req, ZT_EOD_MSG_SETMTURESP, resp); +} + +} // namespace ZeroTier diff --git a/osdep/ExtOsdep.hpp b/osdep/ExtOsdep.hpp new file mode 100644 index 00000000..a224c467 --- /dev/null +++ b/osdep/ExtOsdep.hpp @@ -0,0 +1,198 @@ +#ifndef ZT_EXTOSDEP_HPP +#define ZT_EXTOSDEP_HPP + +#ifdef ZT_EXTOSDEP + +#define ZT_EOD_MAXMSGSIZE (64 * 1024) + +#define ZT_EOD_MSG_STARTED 1 // no data +#define ZT_EOD_MSG_ADDTAP 2 +#define ZT_EOD_MSG_ADDTAPRESP 3 +#define ZT_EOD_MSG_DELTAP 4 +#define ZT_EOD_MSG_DELTAPRESP 5 // no data +#define ZT_EOD_MSG_SETMTU 6 +#define ZT_EOD_MSG_SETMTURESP 7 +#define ZT_EOD_MSG_ADDIP 8 +#define ZT_EOD_MSG_ADDIPRESP 9 +#define ZT_EOD_MSG_DELIP 10 +#define ZT_EOD_MSG_DELIPRESP 11 +#define ZT_EOD_MSG_GETIPS 12 +#define ZT_EOD_MSG_GETIPSRESP 13 +#define ZT_EOD_MSG_GETBINDADDRS 14 +#define ZT_EOD_MSG_GETBINDADDRSRESP 15 +#define ZT_EOD_MSG_ADDROUTE 16 +#define ZT_EOD_MSG_ADDROUTERESP 17 +#define ZT_EOD_MSG_DELROUTE 18 +#define ZT_EOD_MSG_DELROUTERESP 19 + +struct zt_eod_msg_addtap { + unsigned char cmd; + uint64_t nwid; + uint32_t mtu; + uint32_t metric; + char fname[128]; + unsigned char mac[6]; +} __attribute__((packed)); + +struct zt_eod_msg_addtapresp { + unsigned char cmd; + char name[16]; +} __attribute__((packed)); + +struct zt_eod_msg_deltap { + unsigned char cmd; + char name[16]; +} __attribute__((packed)); + +struct zt_eod_msg_setmtu { + unsigned char cmd; + char name[16]; + unsigned mtu; +} __attribute__((packed)); + +struct zt_eod_msg_ip { + unsigned char cmd; + char name[16]; + unsigned char afi; // 1 ip, 2 ip6 + unsigned char len; // bits in mask + unsigned char data[16]; +} __attribute__((packed)); + +struct zt_eod_msg_getips { + unsigned char cmd; + char name[16]; +} __attribute__((packed)); + +struct zt_eod_msg_getipsresp { + unsigned char cmd; + struct addr { + unsigned char afi; + unsigned char len; + unsigned char data[16]; + } __attribute__((packed)) addrs[0]; +} __attribute__((packed)); +#define ZT_EOD_GETIPSRESP_MAXADDRS ((ZT_EOD_MAXMSGSIZE - sizeof(zt_eod_msg_getipsresp)) / sizeof(zt_eod_msg_getipsresp::addr)) + +struct zt_eod_msg_getbindaddrsresp { + unsigned char cmd; + unsigned char result; + struct addr { + unsigned char afi; + unsigned char len; + unsigned char data[16]; + char ifname[16]; + } __attribute__((packed)) addrs[0]; +} __attribute__((packed)); +#define ZT_EOD_GETBINDADDRSRESP_MAXADDRS ((ZT_EOD_MAXMSGSIZE - sizeof(zt_eod_msg_getbindaddrsresp)) / sizeof(zt_eod_msg_getbindaddrsresp::addr)) + +struct zt_eod_msg_route { + unsigned char cmd; + unsigned char afi; // 1 ip, 2 ip6 + unsigned char dstlen; + unsigned char dst[16]; + unsigned char gw[16]; + char dev[16]; + unsigned char src[16]; +} __attribute__((packed)); + +struct zt_eod_mgmt_req { + uint32_t method; + uint32_t pathlen; + uint32_t datalen; + unsigned char data[0]; +} __attribute__((packed)); + +struct zt_eod_mgmt_reply { + uint32_t scode; + uint32_t datalen; + unsigned char data[0]; +} __attribute__((packed)); + +#ifndef ZT_EXTOSDEP_IFACEONLY + +#include "../node/InetAddress.hpp" +#include "../node/MAC.hpp" +#include "Thread.hpp" +#include "../node/Hashtable.hpp" +#include "../node/Mutex.hpp" +#include "../node/AtomicCounter.hpp" +#include "EthernetTap.hpp" +#include "BlockingQueue.hpp" +#include +#include +#include +#include +#include + +namespace ZeroTier { + +class ExtOsdep { +public: + static void init(int, int); + static void started(int *, void **); + + static void routeAddDel(bool, const InetAddress &target, const InetAddress &via, const InetAddress &src, const char *ifaceName); + static bool getBindAddrs(std::map &); + + static bool mgmtRecv(void *cookie, void *data, unsigned long len, + std::function); + static bool mgmtWritable(void *); +}; + +class ExtOsdepTap : public EthernetTap +{ +public: + ExtOsdepTap( + const char *homePath, + const MAC &mac, + unsigned int mtu, + unsigned int metric, + uint64_t nwid, + const char *friendlyName, + void (*handler)(void *,void *,uint64_t,const MAC &,const MAC &,unsigned int,unsigned int,const void *,unsigned int), + void *arg); + + virtual ~ExtOsdepTap(); + + virtual void setEnabled(bool en); + virtual bool enabled() const; + virtual bool addIp(const InetAddress &ip); + virtual bool addIps(std::vector ips); + virtual bool removeIp(const InetAddress &ip); + virtual std::vector ips() const; + virtual void put(const MAC &from,const MAC &to,unsigned int etherType,const void *data,unsigned int len); + virtual std::string deviceName() const; + virtual void setFriendlyName(const char *friendlyName); + virtual void scanMulticastGroups(std::vector &added,std::vector &removed); + virtual void setMtu(unsigned int mtu); + virtual void setDns(const char *domain, const std::vector &servers) {} +private: + void (*_handler)(void *,void *,uint64_t,const MAC &,const MAC &,unsigned int,unsigned int,const void *,unsigned int); + void *_arg; + uint64_t _nwid; + MAC _mac; + std::string _homePath; + std::string _dev; + std::vector _multicastGroups; + unsigned int _mtu; + int _fd; + int _shutdownSignalPipe[2]; + std::atomic_bool _enabled; + std::atomic_bool _run; + std::thread _tapReaderThread[2]; + std::thread _tapProcessorThread; + std::mutex _buffers_l; + std::vector _buffers; + BlockingQueue< std::pair > _tapq; + AtomicCounter _tapqsize; + + std::vector allIps; + void doRemoveIp(const InetAddress &); +}; + +} // namespace ZeroTier + +#endif // ZT_EXTOSDEP_IFACEONLY +#endif // ZT_EXTOSDEP + +#endif diff --git a/osdep/ManagedRoute.cpp b/osdep/ManagedRoute.cpp index 9be2eda1..e65ffac4 100644 --- a/osdep/ManagedRoute.cpp +++ b/osdep/ManagedRoute.cpp @@ -51,6 +51,7 @@ #include "ManagedRoute.hpp" #ifdef __LINUX__ +#include "ExtOsdep.hpp" #include "LinuxNetLink.hpp" #endif @@ -550,6 +551,10 @@ bool ManagedRoute::sync() #ifdef __LINUX__ // ---------------------------------------------------------- +#ifdef ZT_EXTOSDEP + _applied[_target] = false; + ExtOsdep::routeAddDel(true, _target, _via, _src, _device); +#else if ((leftt)&&(!LinuxNetLink::getInstance().routeIsSet(leftt,_via,_src,_device))) { _applied[leftt] = false; // boolean unused LinuxNetLink::getInstance().addRoute(leftt, _via, _src, _device); @@ -558,6 +563,7 @@ bool ManagedRoute::sync() _applied[rightt] = false; // boolean unused LinuxNetLink::getInstance().addRoute(rightt, _via, _src, _device); } +#endif // ZT_EXTOSDEP #endif // __LINUX__ ---------------------------------------------------------- @@ -609,7 +615,11 @@ void ManagedRoute::remove() #ifdef __LINUX__ // ---------------------------------------------------------- //_routeCmd("del",r->first,_via,(_via) ? (const char *)0 : _device); +#ifdef ZT_EXTOSDEP + ExtOsdep::routeAddDel(false, r->first,_via,_src,(_via) ? (const char *)0 : _device); +#else LinuxNetLink::getInstance().delRoute(r->first,_via,_src,(_via) ? (const char *)0 : _device); +#endif // ZT_EXTOSDEP #endif // __LINUX__ ---------------------------------------------------------- #ifdef __WINDOWS__ // -------------------------------------------------------- diff --git a/service/OneService.cpp b/service/OneService.cpp index 594ff02d..4beee1ad 100644 --- a/service/OneService.cpp +++ b/service/OneService.cpp @@ -55,6 +55,7 @@ #include "../osdep/Binder.hpp" #include "../osdep/ManagedRoute.hpp" #include "../osdep/BlockingQueue.hpp" +#include "../osdep/ExtOsdep.hpp" #include "OneService.hpp" #include "SoftwareUpdater.hpp" @@ -1125,6 +1126,15 @@ public: } #endif +#ifdef ZT_EXTOSDEP + { + int mgmtfd; + void *mgmtcookie; + ExtOsdep::started(&mgmtfd, &mgmtcookie); + _phy.wrapSocket(mgmtfd, mgmtcookie); + } +#endif + // Delete legacy iddb.d if present (cleanup) OSUtils::rmDashRf((_homePath + ZT_PATH_SEPARATOR_S "iddb.d").c_str()); @@ -2165,7 +2175,6 @@ public: auto statusGet = [&, setContent](const httplib::Request &req, httplib::Response &res) { ZT_NodeStatus status; _node->status(&status); - auto out = json::object(); char tmp[256] = {}; @@ -2335,7 +2344,9 @@ public: _controller->configureHTTPControlPlane(_controlPlane, _controlPlaneV6, setContent); } +#ifndef ZT_EXTOSDEP _controlPlane.set_pre_routing_handler(authCheck); +#endif // ZT_EXTOSDEP _controlPlaneV6.set_pre_routing_handler(authCheck); #if ZT_DEBUG==1 @@ -2351,6 +2362,7 @@ public: exit(-1); } +#ifndef ZT_EXTOSDEP bool v4controlPlaneBound = false; _controlPlane.set_address_family(AF_INET); if(_controlPlane.bind_to_port("0.0.0.0", _primaryPort)) { @@ -2391,6 +2403,7 @@ public: fprintf(stderr, "ERROR: Could not bind control plane. Exiting...\n"); exit(-1); } +#endif // ZT_EXTOSDEP } // Must be called after _localConfig is read or modified @@ -3162,8 +3175,52 @@ public: inline void phyOnFileDescriptorActivity(PhySocket *sock,void **uptr,bool readable,bool writable) {} inline void phyOnUnixAccept(PhySocket *sockL,PhySocket *sockN,void **uptrL,void **uptrN) {} inline void phyOnUnixClose(PhySocket *sock,void **uptr) {} - inline void phyOnUnixData(PhySocket *sock,void **uptr,void *data,unsigned long len) {} - inline void phyOnUnixWritable(PhySocket *sock,void **uptr) {} + inline void phyOnUnixData(PhySocket *sock,void **uptr,void *data,unsigned long len) { +#ifdef ZT_EXTOSDEP + if (ExtOsdep::mgmtRecv(*uptr, data, len, [&](unsigned method, const std::string &path, const std::string &data, std::string &resp) { + // fprintf(stderr, "mgmtRecv: %u %s %s\n", method, path.c_str(), data.c_str()); + httplib::Request req; + httplib::Response res; + req.path = "/" + path; + if (method == 1) req.method = "GET"; + else if (method == 3) req.method = "POST"; + else if (method == 0) req.method = "DELETE"; + struct S : public httplib::Stream { + const char *ptr; + unsigned size; + S(const std::string &s) : ptr(s.c_str()), size(s.size()) {} + virtual bool is_readable() const { return true; } + virtual bool is_writable() const { return true; } + virtual ssize_t read(char *p, size_t sz) { + // fprintf(stderr, "S::read %d\n", (int)size); + if (sz > (size_t)size) sz = size; + memcpy(p, ptr, sz); + size -= (unsigned)sz; + ptr += sz; + return (ssize_t)sz; + } + virtual ssize_t write(const char *ptr, size_t size) { + // fprintf(stderr, "S::write %d\n", (int)size); + return size; + } + virtual void get_remote_ip_and_port(std::string &ip, int &port) const {} + virtual void get_local_ip_and_port(std::string &ip, int &port) const {}; + virtual socket_t socket() const { return 0; } + }; + S s(data); + + bool x = _controlPlane.routing(req, res, s); + // fprintf(stderr, "mgmtRecv: done, x %d status %u body %s\n", x, res.status, res.body.c_str()); + resp = res.body; + return res.status; + })) _phy.setNotifyWritable(sock,true); +#endif + } + inline void phyOnUnixWritable(PhySocket *sock,void **uptr) { +#ifdef ZT_EXTOSDEP + if (ExtOsdep::mgmtWritable(*uptr)) _phy.setNotifyWritable(sock,false); +#endif + } inline int nodeVirtualNetworkConfigFunction(uint64_t nwid,void **nuptr,enum ZT_VirtualNetworkConfigOperation op,const ZT_VirtualNetworkConfig *nwc) { From 269c8d415ae5813c75d5a1ffd9958be94acb249b Mon Sep 17 00:00:00 2001 From: Joseph Henry Date: Wed, 26 Feb 2025 11:16:03 -0800 Subject: [PATCH 20/24] Style match --- osdep/ExtOsdep.cpp | 612 ++++++++++++++++++++++++++------------------- osdep/ExtOsdep.hpp | 153 +++++++----- 2 files changed, 437 insertions(+), 328 deletions(-) diff --git a/osdep/ExtOsdep.cpp b/osdep/ExtOsdep.cpp index 9ea03340..47543ae4 100644 --- a/osdep/ExtOsdep.cpp +++ b/osdep/ExtOsdep.cpp @@ -1,11 +1,26 @@ -#include -#include -#include -#include +/* + * Copyright (c)2019 ZeroTier, Inc. + * + * Use of this software is governed by the Business Source License included + * in the LICENSE.TXT file in the project's root directory. + * + * Change Date: 2026-01-01 + * + * On the date above, in accordance with the Business Source License, use + * of this software will be governed by version 2.0 of the Apache License. + */ +/****/ + #include "ExtOsdep.hpp" -#include + #include "../node/AtomicCounter.hpp" +#include +#include +#include +#include +#include + #define ZT_TAP_BUF_SIZE 16384 namespace ZeroTier { @@ -22,18 +37,24 @@ struct EodRoute { }; static std::list allRoutes; -template static void __eodSend(const T &t) { +template static void __eodSend(const T& t) +{ write(eodFd, &t, sizeof(t)); } -static void strncpyx(char *dest, const char *src, size_t n) { +static void strncpyx(char* dest, const char* src, size_t n) +{ strncpy(dest, src, n); - if (n > 1) dest[n - 1] = 0; + if (n > 1) { + dest[n - 1] = 0; + } } -static int __eodWait(unsigned char msg, unsigned char *d, unsigned l, - unsigned maxl = 0, int *recvfd = nullptr) { - if (!maxl) maxl = l; +static int __eodWait(unsigned char msg, unsigned char* d, unsigned l, unsigned maxl = 0, int* recvfd = nullptr) +{ + if (! maxl) { + maxl = l; + } auto start = times(NULL); while (1) { msghdr mh; @@ -56,10 +77,7 @@ static int __eodWait(unsigned char msg, unsigned char *d, unsigned l, int r = recvmsg(eodFd, &mh, MSG_TRUNC | MSG_CMSG_CLOEXEC); if (r > 0) { - if (recvfd && mh.msg_controllen >= sizeof(cmsg) - && cmsg.cmsg_len == sizeof(cmsg) - && cmsg.cmsg_level == SOL_SOCKET - && cmsg.cmsg_type == SCM_RIGHTS) { + if (recvfd && mh.msg_controllen >= sizeof(cmsg) && cmsg.cmsg_len == sizeof(cmsg) && cmsg.cmsg_level == SOL_SOCKET && cmsg.cmsg_type == SCM_RIGHTS) { *recvfd = cmsg.fd; fprintf(stderr, "eodWait: received fd %d\n", *recvfd); } @@ -82,29 +100,34 @@ static int __eodWait(unsigned char msg, unsigned char *d, unsigned l, } } -template static bool __eodWait(unsigned msg, T &t) { - return __eodWait(msg, (unsigned char *)&t, sizeof(T)) == (int)sizeof(T); +template static bool __eodWait(unsigned msg, T& t) +{ + return __eodWait(msg, (unsigned char*)&t, sizeof(T)) == (int)sizeof(T); } -template static bool __eodXchg(const M &m, unsigned rm, R &r) { +template static bool __eodXchg(const M& m, unsigned rm, R& r) +{ __eodSend(m); return __eodWait(rm, r); } -template static bool eodXchg(const M &m, unsigned rm, R &r) { +template static bool eodXchg(const M& m, unsigned rm, R& r) +{ Mutex::Lock l(eodMutex); return __eodXchg(m, rm, r); } -void ExtOsdep::init(int fd1, int fd2) { +void ExtOsdep::init(int fd1, int fd2) +{ eodFd = fd1; eodMgmtFd = fd2; - fcntl(eodMgmtFd,F_SETFL,O_NONBLOCK); + fcntl(eodMgmtFd, F_SETFL, O_NONBLOCK); } -void ExtOsdep::started(int *f, void **cp) { +void ExtOsdep::started(int* f, void** cp) +{ *f = eodMgmtFd; - *cp = (void *)eodMgmtFd; + *cp = (void*)eodMgmtFd; unsigned char msg = ZT_EOD_MSG_STARTED; Mutex::Lock l(eodMutex); @@ -114,66 +137,85 @@ void ExtOsdep::started(int *f, void **cp) { static std::string mgmtrd; static std::string mgmtwr; -bool ExtOsdep::mgmtWritable(void *cookie) { - if (cookie != (void *)eodMgmtFd) return false; - if (mgmtwr.size() == 0) return true; +bool ExtOsdep::mgmtWritable(void* cookie) +{ + if (cookie != (void*)eodMgmtFd) { + return false; + } + if (mgmtwr.size() == 0) { + return true; + } auto sz = write(eodMgmtFd, mgmtwr.data(), mgmtwr.size()); - if (sz <= 0) return false; + if (sz <= 0) { + return false; + } mgmtwr.erase(mgmtwr.begin(), mgmtwr.begin() + sz); return mgmtwr.empty(); } -bool ExtOsdep::mgmtRecv(void *cookie, void *data, unsigned long len, - std::function cb) { - if (cookie != (void *)eodMgmtFd) return false; - mgmtrd.append((char *)data, len); +bool ExtOsdep::mgmtRecv(void* cookie, void* data, unsigned long len, std::function cb) +{ + if (cookie != (void*)eodMgmtFd) { + return false; + } + mgmtrd.append((char*)data, len); while (1) { - auto req = (zt_eod_mgmt_req *)mgmtrd.data(); - if (mgmtrd.size() < sizeof(*req)) break; + auto req = (zt_eod_mgmt_req*)mgmtrd.data(); + if (mgmtrd.size() < sizeof(*req)) { + break; + } unsigned reqsz = sizeof(*req) + req->pathlen + req->datalen; - if (mgmtrd.size() < reqsz) break; + if (mgmtrd.size() < reqsz) { + break; + } std::string resp; - char *p = (char *)req->data; + char* p = (char*)req->data; zt_eod_mgmt_reply rep; - rep.scode = cb(req->method, std::string(p, p + req->pathlen), - std::string(p + req->pathlen, p + req->pathlen + req->datalen), resp); + rep.scode = cb(req->method, std::string(p, p + req->pathlen), std::string(p + req->pathlen, p + req->pathlen + req->datalen), resp); rep.datalen = resp.size(); mgmtrd.erase(mgmtrd.begin(), mgmtrd.begin() + reqsz); - mgmtwr.append((char *)&rep, sizeof(rep)); + mgmtwr.append((char*)&rep, sizeof(rep)); mgmtwr.append(resp); auto sz = write(eodMgmtFd, mgmtwr.data(), mgmtwr.size()); - if (sz > 0) mgmtwr.erase(mgmtwr.begin(), mgmtwr.begin() + sz); + if (sz > 0) { + mgmtwr.erase(mgmtwr.begin(), mgmtwr.begin() + sz); + } } - return !mgmtwr.empty(); + return ! mgmtwr.empty(); } -void ExtOsdep::routeAddDel(bool add, const InetAddress &target, const InetAddress &via, const InetAddress &src, const char *ifname) { +void ExtOsdep::routeAddDel(bool add, const InetAddress& target, const InetAddress& via, const InetAddress& src, const char* ifname) +{ Mutex::Lock l(eodMutex); std::string ifn; - if (ifname) ifn = ifname; + if (ifname) { + ifn = ifname; + } if (add) { for (auto x = allRoutes.begin(); x != allRoutes.end(); ++x) { - if (x->target == target && x->via == via - && x->src == src && x->ifname == ifn) return; + if (x->target == target && x->via == via && x->src == src && x->ifname == ifn) { + return; + } } - allRoutes.push_back({target, via, src, ifn}); + allRoutes.push_back({ target, via, src, ifn }); } else { bool found = false; for (auto x = allRoutes.begin(); x != allRoutes.end(); ++x) { - if (x->target == target && x->via == via - && x->src == src && x->ifname == ifn) { + if (x->target == target && x->via == via && x->src == src && x->ifname == ifn) { allRoutes.erase(x); found = true; break; } } - if (!found) return; + if (! found) { + return; + } } zt_eod_msg_route req; @@ -182,54 +224,62 @@ void ExtOsdep::routeAddDel(bool add, const InetAddress &target, const InetAddres req.afi = target.isV4() ? 1 : 2; req.dstlen = target.netmaskBits(); memcpy(req.dst, target.rawIpData(), target.isV4() ? 4 : 16); - if (ifname) strncpyx(req.dev, ifname, sizeof(req.dev)); - if (via) memcpy(req.gw, via.rawIpData(), target.isV4() ? 4 : 16); - if (src) memcpy(req.src, src.rawIpData(), target.isV4() ? 4 : 16); + if (ifname) { + strncpyx(req.dev, ifname, sizeof(req.dev)); + } + if (via) { + memcpy(req.gw, via.rawIpData(), target.isV4() ? 4 : 16); + } + if (src) { + memcpy(req.src, src.rawIpData(), target.isV4() ? 4 : 16); + } unsigned char resp; __eodXchg(req, add ? ZT_EOD_MSG_ADDROUTERESP : ZT_EOD_MSG_DELROUTERESP, resp); } -bool ExtOsdep::getBindAddrs(std::map &ret) { +bool ExtOsdep::getBindAddrs(std::map& ret) +{ Mutex::Lock l(eodMutex); unsigned char req = ZT_EOD_MSG_GETBINDADDRS; __eodSend(req); - zt_eod_msg_getbindaddrsresp *resp; + zt_eod_msg_getbindaddrsresp* resp; unsigned char buf[ZT_EOD_MAXMSGSIZE]; - int r = __eodWait(ZT_EOD_MSG_GETBINDADDRSRESP, (unsigned char *)buf, sizeof(*resp), sizeof(buf)); - if (r < (int)sizeof(*resp)) return false; + int r = __eodWait(ZT_EOD_MSG_GETBINDADDRSRESP, (unsigned char*)buf, sizeof(*resp), sizeof(buf)); + if (r < (int)sizeof(*resp)) { + return false; + } int c = (r - (int)sizeof(*resp)) / sizeof(resp->addrs[0]); - resp = (zt_eod_msg_getbindaddrsresp *)buf; + resp = (zt_eod_msg_getbindaddrsresp*)buf; for (int i = 0; i < c; ++i) { - ret[InetAddress(resp->addrs[i].data, resp->addrs[i].afi == 1 ? 4 : 16, resp->addrs[i].len)] - = resp->addrs[i].ifname; + ret[InetAddress(resp->addrs[i].data, resp->addrs[i].afi == 1 ? 4 : 16, resp->addrs[i].len)] = resp->addrs[i].ifname; } return resp->result; } ExtOsdepTap::ExtOsdepTap( - const char *homePath, - const MAC &mac, - unsigned int mtu, - unsigned int metric, - uint64_t nwid, - const char *friendlyName, - void (*handler)(void *,void *,uint64_t,const MAC &,const MAC &,unsigned int,unsigned int,const void *,unsigned int), - void *arg) : - _handler(handler), - _arg(arg), - _nwid(nwid), - _mac(mac), - _homePath(homePath), - _mtu(mtu), - _fd(0), - _enabled(true), - _run(true) - { + const char* homePath, + const MAC& mac, + unsigned int mtu, + unsigned int metric, + uint64_t nwid, + const char* friendlyName, + void (*handler)(void*, void*, uint64_t, const MAC&, const MAC&, unsigned int, unsigned int, const void*, unsigned int), + void* arg) + : _handler(handler) + , _arg(arg) + , _nwid(nwid) + , _mac(mac) + , _homePath(homePath) + , _mtu(mtu) + , _fd(0) + , _enabled(true) + , _run(true) +{ zt_eod_msg_addtap req; req.cmd = ZT_EOD_MSG_ADDTAP; req.nwid = nwid; @@ -243,131 +293,147 @@ ExtOsdepTap::ExtOsdepTap( Mutex::Lock l(eodMutex); __eodSend(req); _fd = -1; - if (__eodWait(ZT_EOD_MSG_ADDTAPRESP, (unsigned char *)&resp, sizeof(resp), sizeof(resp), &_fd) != sizeof(resp)) + if (__eodWait(ZT_EOD_MSG_ADDTAPRESP, (unsigned char*)&resp, sizeof(resp), sizeof(resp), &_fd) != sizeof(resp)) { throw std::runtime_error(std::string("could not create TAP")); + } _dev = resp.name; - if (_dev.empty() || _fd < 0) + if (_dev.empty() || _fd < 0) { throw std::runtime_error(std::string("could not create TAP")); + } - fcntl(_fd,F_SETFL,O_NONBLOCK); + fcntl(_fd, F_SETFL, O_NONBLOCK); - // processing shamelessly copied from LinuxEthernetTap - (void)::pipe(_shutdownSignalPipe); - for(unsigned int t=0;t<2;++t) { - _tapReaderThread[t] = std::thread([this, t]{ - fd_set readfds,nullfds; - int n,nfds,r; - void *buf = nullptr; - std::vector buffers; + (void)::pipe(_shutdownSignalPipe); + for (unsigned int t = 0; t < 2; ++t) { + _tapReaderThread[t] = std::thread([this, t] { + fd_set readfds, nullfds; + int n, nfds, r; + void* buf = nullptr; + std::vector buffers; - if (!_run) - return; + if (! _run) { + return; + } - FD_ZERO(&readfds); - FD_ZERO(&nullfds); - nfds = (int)std::max(_shutdownSignalPipe[0],_fd) + 1; + FD_ZERO(&readfds); + FD_ZERO(&nullfds); + nfds = (int)std::max(_shutdownSignalPipe[0], _fd) + 1; - r = 0; - for(;;) { - FD_SET(_shutdownSignalPipe[0],&readfds); - FD_SET(_fd,&readfds); - select(nfds,&readfds,&nullfds,&nullfds,(struct timeval *)0); + r = 0; + for (;;) { + FD_SET(_shutdownSignalPipe[0], &readfds); + FD_SET(_fd, &readfds); + select(nfds, &readfds, &nullfds, &nullfds, (struct timeval*)0); - if (FD_ISSET(_shutdownSignalPipe[0],&readfds)) // writes to shutdown pipe terminate thread - break; + if (FD_ISSET(_shutdownSignalPipe[0], &readfds)) { // writes to shutdown pipe terminate thread + break; + } - if (FD_ISSET(_fd,&readfds)) { - for(;;) { // read until there are no more packets, then return to outer select() loop - if (!buf) { - // To reduce use of the mutex, we keep a local buffer vector and - // swap (which is a pointer swap) with the global one when it's - // empty. This retrieves a batch of buffers to use. - if (buffers.empty()) { - std::lock_guard l(_buffers_l); - buffers.swap(_buffers); - } - if (buffers.empty()) { - buf = malloc(ZT_TAP_BUF_SIZE); - if (!buf) - break; - } else { - buf = buffers.back(); - buffers.pop_back(); - } - } + if (FD_ISSET(_fd, &readfds)) { + for (;;) { // read until there are no more packets, then return to outer select() loop + if (! buf) { + // To reduce use of the mutex, we keep a local buffer vector and + // swap (which is a pointer swap) with the global one when it's + // empty. This retrieves a batch of buffers to use. + if (buffers.empty()) { + std::lock_guard l(_buffers_l); + buffers.swap(_buffers); + } + if (buffers.empty()) { + buf = malloc(ZT_TAP_BUF_SIZE); + if (! buf) { + break; + } + } + else { + buf = buffers.back(); + buffers.pop_back(); + } + } - n = (int)::read(_fd,reinterpret_cast(buf) + r,ZT_TAP_BUF_SIZE - r); - if (n > 0) { - // Some tap drivers like to send the ethernet frame and the - // payload in two chunks, so handle that by accumulating - // data until we have at least a frame. - r += n; - if (r > 14) { - if (r > ((int)_mtu + 14)) // sanity check for weird TAP behavior on some platforms - r = _mtu + 14; + n = (int)::read(_fd, reinterpret_cast(buf) + r, ZT_TAP_BUF_SIZE - r); + if (n > 0) { + // Some tap drivers like to send the ethernet frame and the + // payload in two chunks, so handle that by accumulating + // data until we have at least a frame. + r += n; + if (r > 14) { + if (r > ((int)_mtu + 14)) { // sanity check for weird TAP behavior on some platforms + r = _mtu + 14; + } - if (_enabled && _tapqsize.load() < 1000) { + if (_enabled && _tapqsize.load() < 1000) { ++_tapqsize; - _tapq.post(std::pair(buf,r)); - buf = nullptr; - } + _tapq.post(std::pair(buf, r)); + buf = nullptr; + } - r = 0; - } - } else { - r = 0; - break; - } - } - } - } - }); - } + r = 0; + } + } + else { + r = 0; + break; + } + } + } + } + }); + } - _tapProcessorThread = std::thread([this] { - MAC to,from; - std::pair qi; - while (_tapq.get(qi)) { + _tapProcessorThread = std::thread([this] { + MAC to, from; + std::pair qi; + while (_tapq.get(qi)) { --_tapqsize; - uint8_t *const b = reinterpret_cast(qi.first); - if (b) { - to.setTo(b, 6); - from.setTo(b + 6, 6); - unsigned int etherType = Utils::ntoh(((const uint16_t *)b)[6]); - _handler(_arg, nullptr, _nwid, from, to, etherType, 0, (const void *)(b + 14),(unsigned int)(qi.second - 14)); - { - std::lock_guard l(_buffers_l); - if (_buffers.size() < 128) - _buffers.push_back(qi.first); - else free(qi.first); - } - } else break; - } - }); + uint8_t* const b = reinterpret_cast(qi.first); + if (b) { + to.setTo(b, 6); + from.setTo(b + 6, 6); + unsigned int etherType = Utils::ntoh(((const uint16_t*)b)[6]); + _handler(_arg, nullptr, _nwid, from, to, etherType, 0, (const void*)(b + 14), (unsigned int)(qi.second - 14)); + { + std::lock_guard l(_buffers_l); + if (_buffers.size() < 128) { + _buffers.push_back(qi.first); + } + else { + free(qi.first); + } + } + } + else { + break; + } + } + }); } -ExtOsdepTap::~ExtOsdepTap() { - _run = false; +ExtOsdepTap::~ExtOsdepTap() +{ + _run = false; - (void)::write(_shutdownSignalPipe[1],"\0",1); // causes reader thread(s) to exit - _tapq.post(std::pair(nullptr,0)); // causes processor thread to exit + (void)::write(_shutdownSignalPipe[1], "\0", 1); // causes reader thread(s) to exit + _tapq.post(std::pair(nullptr, 0)); // causes processor thread to exit - _tapReaderThread[0].join(); - _tapReaderThread[1].join(); - _tapProcessorThread.join(); + _tapReaderThread[0].join(); + _tapReaderThread[1].join(); + _tapProcessorThread.join(); - ::close(_fd); - ::close(_shutdownSignalPipe[0]); - ::close(_shutdownSignalPipe[1]); + ::close(_fd); + ::close(_shutdownSignalPipe[0]); + ::close(_shutdownSignalPipe[1]); - for(std::vector::iterator i(_buffers.begin());i!=_buffers.end();++i) - free(*i); - std::vector< std::pair > dv(_tapq.drain()); - for(std::vector< std::pair >::iterator i(dv.begin());i!=dv.end();++i) { - if (i->first) - free(i->first); - } + for (std::vector::iterator i(_buffers.begin()); i != _buffers.end(); ++i) { + free(*i); + } + std::vector > dv(_tapq.drain()); + for (std::vector >::iterator i(dv.begin()); i != dv.end(); ++i) { + if (i->first) { + free(i->first); + } + } zt_eod_msg_deltap req; req.cmd = ZT_EOD_MSG_DELTAP; @@ -377,15 +443,18 @@ ExtOsdepTap::~ExtOsdepTap() { eodXchg(req, ZT_EOD_MSG_DELTAPRESP, resp); } -void ExtOsdepTap::setEnabled(bool en) { - _enabled = en; +void ExtOsdepTap::setEnabled(bool en) +{ + _enabled = en; } -bool ExtOsdepTap::enabled() const { - return _enabled; +bool ExtOsdepTap::enabled() const +{ + return _enabled; } -void ExtOsdepTap::doRemoveIp(const InetAddress &ip) { +void ExtOsdepTap::doRemoveIp(const InetAddress& ip) +{ zt_eod_msg_ip req; req.cmd = ZT_EOD_MSG_DELIP; strcpy(req.name, _dev.c_str()); @@ -397,13 +466,18 @@ void ExtOsdepTap::doRemoveIp(const InetAddress &ip) { __eodXchg(req, ZT_EOD_MSG_DELIPRESP, resp); } -bool ExtOsdepTap::addIp(const InetAddress &ip) { +bool ExtOsdepTap::addIp(const InetAddress& ip) +{ Mutex::Lock l(eodMutex); - for(auto i = allIps.begin();i!=allIps.end();++i) { - if (*i == ip) return true; - if (i->ipsEqual(ip)) doRemoveIp(*i); - } + for (auto i = allIps.begin(); i != allIps.end(); ++i) { + if (*i == ip) { + return true; + } + if (i->ipsEqual(ip)) { + doRemoveIp(*i); + } + } zt_eod_msg_ip req; req.cmd = ZT_EOD_MSG_ADDIP; @@ -419,20 +493,24 @@ bool ExtOsdepTap::addIp(const InetAddress &ip) { return true; } -bool ExtOsdepTap::addIps(std::vector ips) { +bool ExtOsdepTap::addIps(std::vector ips) +{ return false; } -bool ExtOsdepTap::removeIp(const InetAddress &ip) { + +bool ExtOsdepTap::removeIp(const InetAddress& ip) +{ Mutex::Lock l(eodMutex); - for(auto i = allIps.begin();i!=allIps.end();++i) { + for (auto i = allIps.begin(); i != allIps.end(); ++i) { if (*i == ip) { doRemoveIp(*i); return true; } - } + } return false; } -std::vector ExtOsdepTap::ips() const { +std::vector ExtOsdepTap::ips() const +{ std::vector ret; Mutex::Lock l(eodMutex); @@ -442,84 +520,100 @@ std::vector ExtOsdepTap::ips() const { strcpy(req.name, _dev.c_str()); __eodSend(req); - zt_eod_msg_getipsresp *resp; + zt_eod_msg_getipsresp* resp; unsigned char buf[ZT_EOD_MAXMSGSIZE]; - int r = __eodWait(ZT_EOD_MSG_GETIPSRESP, (unsigned char *)buf, sizeof(*resp), sizeof(buf)); - if (r < (int)sizeof(*resp)) return ret; + int r = __eodWait(ZT_EOD_MSG_GETIPSRESP, (unsigned char*)buf, sizeof(*resp), sizeof(buf)); + if (r < (int)sizeof(*resp)) { + return ret; + } int c = (r - (int)sizeof(*resp)) / sizeof(resp->addrs[0]); - resp = (zt_eod_msg_getipsresp *)buf; + resp = (zt_eod_msg_getipsresp*)buf; for (int i = 0; i < c; ++i) { ret.push_back(InetAddress(resp->addrs[i].data, resp->addrs[i].afi == 1 ? 4 : 16, resp->addrs[i].len)); } return ret; } -void ExtOsdepTap::put(const MAC &from,const MAC &to,unsigned int etherType,const void *data,unsigned int len) { - char putBuf[ZT_MAX_MTU + 64]; - if ((_fd > 0)&&(len <= _mtu)&&(_enabled)) { - to.copyTo(putBuf,6); - from.copyTo(putBuf + 6,6); - *((uint16_t *)(putBuf + 12)) = htons((uint16_t)etherType); - memcpy(putBuf + 14,data,len); - len += 14; - (void)::write(_fd,putBuf,len); - } +void ExtOsdepTap::put(const MAC& from, const MAC& to, unsigned int etherType, const void* data, unsigned int len) +{ + char putBuf[ZT_MAX_MTU + 64]; + if ((_fd > 0) && (len <= _mtu) && (_enabled)) { + to.copyTo(putBuf, 6); + from.copyTo(putBuf + 6, 6); + *((uint16_t*)(putBuf + 12)) = htons((uint16_t)etherType); + memcpy(putBuf + 14, data, len); + len += 14; + (void)::write(_fd, putBuf, len); + } } -std::string ExtOsdepTap::deviceName() const { +std::string ExtOsdepTap::deviceName() const +{ return _dev; } -void ExtOsdepTap::setFriendlyName(const char *friendlyName) {} - -void ExtOsdepTap::scanMulticastGroups(std::vector &added,std::vector &removed) { - char *ptr,*ptr2; - unsigned char mac[6]; - std::vector newGroups; - - int fd = ::open("/proc/net/dev_mcast",O_RDONLY); - if (fd > 0) { - char buf[131072]; - int n = (int)::read(fd,buf,sizeof(buf)); - if ((n > 0)&&(n < (int)sizeof(buf))) { - buf[n] = (char)0; - for(char *l=strtok_r(buf,"\r\n",&ptr);(l);l=strtok_r((char *)0,"\r\n",&ptr)) { - int fno = 0; - char *devname = (char *)0; - char *mcastmac = (char *)0; - for(char *f=strtok_r(l," \t",&ptr2);(f);f=strtok_r((char *)0," \t",&ptr2)) { - if (fno == 1) - devname = f; - else if (fno == 4) - mcastmac = f; - ++fno; - } - if ((devname)&&(!strcmp(devname,_dev.c_str()))&&(mcastmac)&&(Utils::unhex(mcastmac,mac,6) == 6)) - newGroups.push_back(MulticastGroup(MAC(mac,6),0)); - } - } - ::close(fd); - } - - std::vector allIps(ips()); - for(std::vector::iterator ip(allIps.begin());ip!=allIps.end();++ip) - newGroups.push_back(MulticastGroup::deriveMulticastGroupForAddressResolution(*ip)); - - std::sort(newGroups.begin(),newGroups.end()); - newGroups.erase(std::unique(newGroups.begin(),newGroups.end()),newGroups.end()); - - for(std::vector::iterator m(newGroups.begin());m!=newGroups.end();++m) { - if (!std::binary_search(_multicastGroups.begin(),_multicastGroups.end(),*m)) - added.push_back(*m); - } - for(std::vector::iterator m(_multicastGroups.begin());m!=_multicastGroups.end();++m) { - if (!std::binary_search(newGroups.begin(),newGroups.end(),*m)) - removed.push_back(*m); - } - - _multicastGroups.swap(newGroups); +void ExtOsdepTap::setFriendlyName(const char* friendlyName) +{ } -void ExtOsdepTap::setMtu(unsigned int mtu) { - if (mtu == _mtu) return; + +void ExtOsdepTap::scanMulticastGroups(std::vector& added, std::vector& removed) +{ + char *ptr, *ptr2; + unsigned char mac[6]; + std::vector newGroups; + + int fd = ::open("/proc/net/dev_mcast", O_RDONLY); + if (fd > 0) { + char buf[131072]; + int n = (int)::read(fd, buf, sizeof(buf)); + if ((n > 0) && (n < (int)sizeof(buf))) { + buf[n] = (char)0; + for (char* l = strtok_r(buf, "\r\n", &ptr); (l); l = strtok_r((char*)0, "\r\n", &ptr)) { + int fno = 0; + char* devname = (char*)0; + char* mcastmac = (char*)0; + for (char* f = strtok_r(l, " \t", &ptr2); (f); f = strtok_r((char*)0, " \t", &ptr2)) { + if (fno == 1) { + devname = f; + } + else if (fno == 4) { + mcastmac = f; + } + ++fno; + } + if ((devname) && (! strcmp(devname, _dev.c_str())) && (mcastmac) && (Utils::unhex(mcastmac, mac, 6) == 6)) { + newGroups.push_back(MulticastGroup(MAC(mac, 6), 0)); + } + } + } + ::close(fd); + } + + std::vector allIps(ips()); + for (std::vector::iterator ip(allIps.begin()); ip != allIps.end(); ++ip) { + newGroups.push_back(MulticastGroup::deriveMulticastGroupForAddressResolution(*ip)); + } + + std::sort(newGroups.begin(), newGroups.end()); + newGroups.erase(std::unique(newGroups.begin(), newGroups.end()), newGroups.end()); + + for (std::vector::iterator m(newGroups.begin()); m != newGroups.end(); ++m) { + if (! std::binary_search(_multicastGroups.begin(), _multicastGroups.end(), *m)) { + added.push_back(*m); + } + } + for (std::vector::iterator m(_multicastGroups.begin()); m != _multicastGroups.end(); ++m) { + if (! std::binary_search(newGroups.begin(), newGroups.end(), *m)) { + removed.push_back(*m); + } + } + + _multicastGroups.swap(newGroups); +} +void ExtOsdepTap::setMtu(unsigned int mtu) +{ + if (mtu == _mtu) { + return; + } _mtu = mtu; zt_eod_msg_setmtu req; @@ -531,4 +625,4 @@ void ExtOsdepTap::setMtu(unsigned int mtu) { eodXchg(req, ZT_EOD_MSG_SETMTURESP, resp); } -} // namespace ZeroTier +} // namespace ZeroTier diff --git a/osdep/ExtOsdep.hpp b/osdep/ExtOsdep.hpp index a224c467..328d0061 100644 --- a/osdep/ExtOsdep.hpp +++ b/osdep/ExtOsdep.hpp @@ -1,3 +1,16 @@ +/* + * Copyright (c)2019 ZeroTier, Inc. + * + * Use of this software is governed by the Business Source License included + * in the LICENSE.TXT file in the project's root directory. + * + * Change Date: 2026-01-01 + * + * On the date above, in accordance with the Business Source License, use + * of this software will be governed by version 2.0 of the Apache License. + */ +/****/ + #ifndef ZT_EXTOSDEP_HPP #define ZT_EXTOSDEP_HPP @@ -5,25 +18,25 @@ #define ZT_EOD_MAXMSGSIZE (64 * 1024) -#define ZT_EOD_MSG_STARTED 1 // no data -#define ZT_EOD_MSG_ADDTAP 2 -#define ZT_EOD_MSG_ADDTAPRESP 3 -#define ZT_EOD_MSG_DELTAP 4 -#define ZT_EOD_MSG_DELTAPRESP 5 // no data -#define ZT_EOD_MSG_SETMTU 6 -#define ZT_EOD_MSG_SETMTURESP 7 -#define ZT_EOD_MSG_ADDIP 8 -#define ZT_EOD_MSG_ADDIPRESP 9 -#define ZT_EOD_MSG_DELIP 10 -#define ZT_EOD_MSG_DELIPRESP 11 -#define ZT_EOD_MSG_GETIPS 12 -#define ZT_EOD_MSG_GETIPSRESP 13 -#define ZT_EOD_MSG_GETBINDADDRS 14 +#define ZT_EOD_MSG_STARTED 1 // no data +#define ZT_EOD_MSG_ADDTAP 2 +#define ZT_EOD_MSG_ADDTAPRESP 3 +#define ZT_EOD_MSG_DELTAP 4 +#define ZT_EOD_MSG_DELTAPRESP 5 // no data +#define ZT_EOD_MSG_SETMTU 6 +#define ZT_EOD_MSG_SETMTURESP 7 +#define ZT_EOD_MSG_ADDIP 8 +#define ZT_EOD_MSG_ADDIPRESP 9 +#define ZT_EOD_MSG_DELIP 10 +#define ZT_EOD_MSG_DELIPRESP 11 +#define ZT_EOD_MSG_GETIPS 12 +#define ZT_EOD_MSG_GETIPSRESP 13 +#define ZT_EOD_MSG_GETBINDADDRS 14 #define ZT_EOD_MSG_GETBINDADDRSRESP 15 -#define ZT_EOD_MSG_ADDROUTE 16 -#define ZT_EOD_MSG_ADDROUTERESP 17 -#define ZT_EOD_MSG_DELROUTE 18 -#define ZT_EOD_MSG_DELROUTERESP 19 +#define ZT_EOD_MSG_ADDROUTE 16 +#define ZT_EOD_MSG_ADDROUTERESP 17 +#define ZT_EOD_MSG_DELROUTE 18 +#define ZT_EOD_MSG_DELROUTERESP 19 struct zt_eod_msg_addtap { unsigned char cmd; @@ -53,8 +66,8 @@ struct zt_eod_msg_setmtu { struct zt_eod_msg_ip { unsigned char cmd; char name[16]; - unsigned char afi; // 1 ip, 2 ip6 - unsigned char len; // bits in mask + unsigned char afi; // 1 ip, 2 ip6 + unsigned char len; // bits in mask unsigned char data[16]; } __attribute__((packed)); @@ -87,7 +100,7 @@ struct zt_eod_msg_getbindaddrsresp { struct zt_eod_msg_route { unsigned char cmd; - unsigned char afi; // 1 ip, 2 ip6 + unsigned char afi; // 1 ip, 2 ip6 unsigned char dstlen; unsigned char dst[16]; unsigned char gw[16]; @@ -110,89 +123,91 @@ struct zt_eod_mgmt_reply { #ifndef ZT_EXTOSDEP_IFACEONLY +#include "../node/AtomicCounter.hpp" +#include "../node/Hashtable.hpp" #include "../node/InetAddress.hpp" #include "../node/MAC.hpp" -#include "Thread.hpp" -#include "../node/Hashtable.hpp" #include "../node/Mutex.hpp" -#include "../node/AtomicCounter.hpp" -#include "EthernetTap.hpp" #include "BlockingQueue.hpp" +#include "EthernetTap.hpp" +#include "Thread.hpp" + #include -#include -#include #include +#include #include +#include namespace ZeroTier { class ExtOsdep { -public: + public: static void init(int, int); - static void started(int *, void **); + static void started(int*, void**); - static void routeAddDel(bool, const InetAddress &target, const InetAddress &via, const InetAddress &src, const char *ifaceName); - static bool getBindAddrs(std::map &); + static void routeAddDel(bool, const InetAddress& target, const InetAddress& via, const InetAddress& src, const char* ifaceName); + static bool getBindAddrs(std::map&); - static bool mgmtRecv(void *cookie, void *data, unsigned long len, - std::function); - static bool mgmtWritable(void *); + static bool mgmtRecv(void* cookie, void* data, unsigned long len, std::function); + static bool mgmtWritable(void*); }; -class ExtOsdepTap : public EthernetTap -{ -public: +class ExtOsdepTap : public EthernetTap { + public: ExtOsdepTap( - const char *homePath, - const MAC &mac, + const char* homePath, + const MAC& mac, unsigned int mtu, unsigned int metric, uint64_t nwid, - const char *friendlyName, - void (*handler)(void *,void *,uint64_t,const MAC &,const MAC &,unsigned int,unsigned int,const void *,unsigned int), - void *arg); + const char* friendlyName, + void (*handler)(void*, void*, uint64_t, const MAC&, const MAC&, unsigned int, unsigned int, const void*, unsigned int), + void* arg); virtual ~ExtOsdepTap(); virtual void setEnabled(bool en); virtual bool enabled() const; - virtual bool addIp(const InetAddress &ip); + virtual bool addIp(const InetAddress& ip); virtual bool addIps(std::vector ips); - virtual bool removeIp(const InetAddress &ip); + virtual bool removeIp(const InetAddress& ip); virtual std::vector ips() const; - virtual void put(const MAC &from,const MAC &to,unsigned int etherType,const void *data,unsigned int len); + virtual void put(const MAC& from, const MAC& to, unsigned int etherType, const void* data, unsigned int len); virtual std::string deviceName() const; - virtual void setFriendlyName(const char *friendlyName); - virtual void scanMulticastGroups(std::vector &added,std::vector &removed); + virtual void setFriendlyName(const char* friendlyName); + virtual void scanMulticastGroups(std::vector& added, std::vector& removed); virtual void setMtu(unsigned int mtu); - virtual void setDns(const char *domain, const std::vector &servers) {} -private: - void (*_handler)(void *,void *,uint64_t,const MAC &,const MAC &,unsigned int,unsigned int,const void *,unsigned int); - void *_arg; - uint64_t _nwid; - MAC _mac; - std::string _homePath; - std::string _dev; - std::vector _multicastGroups; - unsigned int _mtu; + virtual void setDns(const char* domain, const std::vector& servers) + { + } + + private: + void (*_handler)(void*, void*, uint64_t, const MAC&, const MAC&, unsigned int, unsigned int, const void*, unsigned int); + void* _arg; + uint64_t _nwid; + MAC _mac; + std::string _homePath; + std::string _dev; + std::vector _multicastGroups; + unsigned int _mtu; int _fd; - int _shutdownSignalPipe[2]; - std::atomic_bool _enabled; - std::atomic_bool _run; - std::thread _tapReaderThread[2]; - std::thread _tapProcessorThread; - std::mutex _buffers_l; - std::vector _buffers; - BlockingQueue< std::pair > _tapq; + int _shutdownSignalPipe[2]; + std::atomic_bool _enabled; + std::atomic_bool _run; + std::thread _tapReaderThread[2]; + std::thread _tapProcessorThread; + std::mutex _buffers_l; + std::vector _buffers; + BlockingQueue > _tapq; AtomicCounter _tapqsize; std::vector allIps; - void doRemoveIp(const InetAddress &); + void doRemoveIp(const InetAddress&); }; -} // namespace ZeroTier +} // namespace ZeroTier -#endif // ZT_EXTOSDEP_IFACEONLY -#endif // ZT_EXTOSDEP +#endif // ZT_EXTOSDEP_IFACEONLY +#endif // ZT_EXTOSDEP #endif From 05b60bd81868fefd67371498a9c70e93fb428f75 Mon Sep 17 00:00:00 2001 From: Joseph Henry Date: Tue, 4 Mar 2025 10:25:06 -0800 Subject: [PATCH 21/24] Fix typo --- .../simpleapi/include/prometheus/simpleapi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/prometheus-cpp-lite-1.0/simpleapi/include/prometheus/simpleapi.h b/ext/prometheus-cpp-lite-1.0/simpleapi/include/prometheus/simpleapi.h index 12e11584..73c34097 100644 --- a/ext/prometheus-cpp-lite-1.0/simpleapi/include/prometheus/simpleapi.h +++ b/ext/prometheus-cpp-lite-1.0/simpleapi/include/prometheus/simpleapi.h @@ -19,7 +19,7 @@ #if UINTPTR_MAX == 0xffFFffFF // 32-bit -typedef uint32_tmetric_size; +typedef uint32_t metric_size; #elif UINTPTR_MAX == 0xffFFffFFffFFffFF // 64-bit typedef uint64_t metric_size; From 17abb5865116960ff69463f5f0238694ebf13ec0 Mon Sep 17 00:00:00 2001 From: Joseph Henry Date: Tue, 4 Mar 2025 10:26:31 -0800 Subject: [PATCH 22/24] Add missing include to ExtOsDep.hpp --- osdep/ExtOsdep.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/osdep/ExtOsdep.hpp b/osdep/ExtOsdep.hpp index 328d0061..f16893ce 100644 --- a/osdep/ExtOsdep.hpp +++ b/osdep/ExtOsdep.hpp @@ -16,6 +16,8 @@ #ifdef ZT_EXTOSDEP +#include + #define ZT_EOD_MAXMSGSIZE (64 * 1024) #define ZT_EOD_MSG_STARTED 1 // no data From 47e05d5a23f84bab873e2b49e20fd2d7db9cb30a Mon Sep 17 00:00:00 2001 From: Joseph Henry Date: Tue, 4 Mar 2025 10:34:57 -0800 Subject: [PATCH 23/24] Disable peer metrics for ExtOSDep builds --- make-linux.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/make-linux.mk b/make-linux.mk index 30eae329..2087be69 100644 --- a/make-linux.mk +++ b/make-linux.mk @@ -351,6 +351,7 @@ ifeq ($(ZT_ARCHITECTURE),3) ifeq ($(ZT_EXTOSDEP), 0) override CFLAGS+=-mfloat-abi=hard -march=armv6zk -marm -mfpu=vfp -mno-unaligned-access -mtp=cp15 -mcpu=arm1176jzf-s override CXXFLAGS+=-mfloat-abi=hard -march=armv6zk -marm -mfpu=vfp -fexceptions -mno-unaligned-access -mtp=cp15 -mcpu=arm1176jzf-s + else override DEFS+=-DZT_NO_PEER_METRICS endif ZT_USE_ARM32_NEON_ASM_CRYPTO=0 From dcb4bc5ef44164f33cdc31b2d7af79162b8d91d6 Mon Sep 17 00:00:00 2001 From: Joseph Henry Date: Tue, 4 Mar 2025 11:18:13 -0800 Subject: [PATCH 24/24] Fix path typo: 3rdpatry --- .../http-client-lite/CMakeLists.txt | 0 .../http-client-lite/LICENSE | 0 .../http-client-lite/README.md | 0 .../http-client-lite/examples/CMakeLists.txt | 0 .../examples/simple_request.cpp | 0 .../include/jdl/httpclientlite.h | 0 ext/prometheus-cpp-lite-1.0/CMakeLists.txt | 4 +- ext/prometheus-cpp-lite-1.0/README.md | 50 +++++++++++-------- 8 files changed, 32 insertions(+), 22 deletions(-) rename ext/prometheus-cpp-lite-1.0/{3rdpatry => 3rdparty}/http-client-lite/CMakeLists.txt (100%) rename ext/prometheus-cpp-lite-1.0/{3rdpatry => 3rdparty}/http-client-lite/LICENSE (100%) rename ext/prometheus-cpp-lite-1.0/{3rdpatry => 3rdparty}/http-client-lite/README.md (100%) rename ext/prometheus-cpp-lite-1.0/{3rdpatry => 3rdparty}/http-client-lite/examples/CMakeLists.txt (100%) rename ext/prometheus-cpp-lite-1.0/{3rdpatry => 3rdparty}/http-client-lite/examples/simple_request.cpp (100%) rename ext/prometheus-cpp-lite-1.0/{3rdpatry => 3rdparty}/http-client-lite/include/jdl/httpclientlite.h (100%) diff --git a/ext/prometheus-cpp-lite-1.0/3rdpatry/http-client-lite/CMakeLists.txt b/ext/prometheus-cpp-lite-1.0/3rdparty/http-client-lite/CMakeLists.txt similarity index 100% rename from ext/prometheus-cpp-lite-1.0/3rdpatry/http-client-lite/CMakeLists.txt rename to ext/prometheus-cpp-lite-1.0/3rdparty/http-client-lite/CMakeLists.txt diff --git a/ext/prometheus-cpp-lite-1.0/3rdpatry/http-client-lite/LICENSE b/ext/prometheus-cpp-lite-1.0/3rdparty/http-client-lite/LICENSE similarity index 100% rename from ext/prometheus-cpp-lite-1.0/3rdpatry/http-client-lite/LICENSE rename to ext/prometheus-cpp-lite-1.0/3rdparty/http-client-lite/LICENSE diff --git a/ext/prometheus-cpp-lite-1.0/3rdpatry/http-client-lite/README.md b/ext/prometheus-cpp-lite-1.0/3rdparty/http-client-lite/README.md similarity index 100% rename from ext/prometheus-cpp-lite-1.0/3rdpatry/http-client-lite/README.md rename to ext/prometheus-cpp-lite-1.0/3rdparty/http-client-lite/README.md diff --git a/ext/prometheus-cpp-lite-1.0/3rdpatry/http-client-lite/examples/CMakeLists.txt b/ext/prometheus-cpp-lite-1.0/3rdparty/http-client-lite/examples/CMakeLists.txt similarity index 100% rename from ext/prometheus-cpp-lite-1.0/3rdpatry/http-client-lite/examples/CMakeLists.txt rename to ext/prometheus-cpp-lite-1.0/3rdparty/http-client-lite/examples/CMakeLists.txt diff --git a/ext/prometheus-cpp-lite-1.0/3rdpatry/http-client-lite/examples/simple_request.cpp b/ext/prometheus-cpp-lite-1.0/3rdparty/http-client-lite/examples/simple_request.cpp similarity index 100% rename from ext/prometheus-cpp-lite-1.0/3rdpatry/http-client-lite/examples/simple_request.cpp rename to ext/prometheus-cpp-lite-1.0/3rdparty/http-client-lite/examples/simple_request.cpp diff --git a/ext/prometheus-cpp-lite-1.0/3rdpatry/http-client-lite/include/jdl/httpclientlite.h b/ext/prometheus-cpp-lite-1.0/3rdparty/http-client-lite/include/jdl/httpclientlite.h similarity index 100% rename from ext/prometheus-cpp-lite-1.0/3rdpatry/http-client-lite/include/jdl/httpclientlite.h rename to ext/prometheus-cpp-lite-1.0/3rdparty/http-client-lite/include/jdl/httpclientlite.h diff --git a/ext/prometheus-cpp-lite-1.0/CMakeLists.txt b/ext/prometheus-cpp-lite-1.0/CMakeLists.txt index 390e9091..899eca89 100644 --- a/ext/prometheus-cpp-lite-1.0/CMakeLists.txt +++ b/ext/prometheus-cpp-lite-1.0/CMakeLists.txt @@ -5,7 +5,7 @@ option(PROMETHEUS_BUILD_EXAMPLES "Build with examples" OFF) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin) -if(WIN32) +if(WIN32) # it prevent create Debug/ and Release folders in Visual Studio foreach( OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES} ) @@ -25,7 +25,7 @@ add_subdirectory("./core") add_subdirectory("./simpleapi") -add_subdirectory("./3rdpatry/http-client-lite") +add_subdirectory("./3rdparty/http-client-lite") if(PROMETHEUS_BUILD_EXAMPLES) add_subdirectory("./examples") diff --git a/ext/prometheus-cpp-lite-1.0/README.md b/ext/prometheus-cpp-lite-1.0/README.md index 5aeae60d..997e787d 100644 --- a/ext/prometheus-cpp-lite-1.0/README.md +++ b/ext/prometheus-cpp-lite-1.0/README.md @@ -6,70 +6,81 @@ It is a tool for quickly adding metrics (and profiling) functionality to C++ pro 1. Written in pure C++, 2. Header-only, -2. Cross-platform, -3. Compiles with C ++ 11, C ++ 14, C ++ 17 standards, -4. Has no third-party dependencies, -5. Several APIs for use in your projects, -6. Saving metrics to a file (and then works with node_exporter) or sending via http (uses built-in header-only http-client-lite library), -7. Possiblity to use different types for storing metrics data (default is uint32_t, but you can use double or uint64_t types if you want), -8. Five types of metrics are supported: counter, gauge, summary, histogram and benchmark, +3. Cross-platform, +4. Compiles with C ++ 11, C ++ 14, C ++ 17 standards, +5. Has no third-party dependencies, +6. Several APIs for use in your projects, +7. Saving metrics to a file (and then works with node_exporter) or sending via http (uses built-in header-only http-client-lite library), +8. Possiblity to use different types for storing metrics data (default is uint32_t, but you can use double or uint64_t types if you want), +9. Five types of metrics are supported: counter, gauge, summary, histogram and benchmark, 10. Has detailed examples of use (see examples folder) ## How it differs from the [jupp0r/prometheus-cpp](https://github.com/jupp0r/prometheus-cpp) project: + 1. I need a simple header only wariant library without dependencies to write metrics to a .prom file, 2. I need the fastest possible work using integer values of counters (original project use only floating pointer values), 3. The origianl project have problems on compilers that do not know how to do LTO optimization, 4. I did not like the python style of the original project and the large amount of extra code in it and I wanted to make it lighter and more c++ classic. ## How to use it: + The library has two API: + 1. Complex API for those who want to control everything, 2. Simple API for those who want to quickly add metrics to their C ++ (and it is actually just a wrapper around the complex API). - ### Let's start with a simple API because it's simple: To add it to your C++ project add these lines to your CMakeLists.txt file: + ``` add_subdirectory("prometheus-cpp-lite/core") -add_subdirectory("prometheus-cpp-lite/3rdpatry/http-client-lite") +add_subdirectory("prometheus-cpp-lite/3rdparty/http-client-lite") add_subdirectory("prometheus-cpp-lite/simpleapi") target_link_libraries(your_target prometheus-cpp-simpleapi) ``` The simplest way to create a metric would be like this: -``` c++ + +```c++ prometheus::simpleapi::METRIC_metric_t metric1 { "metric1", "first simple metric without any tag" }; prometheus::simpleapi::METRIC_metric_t metric2 { "metric2", "second simple metric without any tag" }; ``` -where ```METRIC``` can be ```counter```, ```gauge```, ```summary```, ```histogram``` or ```benchmark```. + +where `METRIC` can be `counter`, `gauge`, `summary`, `histogram` or `benchmark`. If you want to access an existing metric again elsewhere in the code, you can do this: -``` c++ + +```c++ prometheus::simpleapi::METRIC_metric_t metric2_yet_another_link { "metric2", "" }; ``` + this works because when adding a metric, it checks whether there is already a metric with the same name and, if there is one, a link to it is returned. You can create a family of metrics (metrics with tags) as follows: -``` c++ + +```c++ prometheus::simpleapi::METRIC_family_t family { "metric_family", "metric family" }; prometheus::simpleapi::METRIC_metric_t metric1 { family.Add({{"name", "metric1"}}) }; prometheus::simpleapi::METRIC_metric_t metric2 { family.Add({{"name", "metric2"}}) }; ``` -where METRIC can be ```counter```, ```gauge```, ```summary```, ```histogram``` or ```benchmark```. + +where METRIC can be `counter`, `gauge`, `summary`, `histogram` or `benchmark`. Next, you can do the following things with metrics: -``` c++ + +```c++ metric++; // for increment it (only for counter and gauge metrics) metric += value; // for add value to metric (only for gauge metric) -metric -= value; // for sub value from metric (only for gauge metric) +metric -= value; // for sub value from metric (only for gauge metric) metric = value; // save current value (only gauge metrics) metric.start(); // start calculate time (only for benchmark metric) metric.stop(); // stop calculate time (only for benchmark metric) ``` You can change the settings of save (or send) metrics data as follows: -``` c++ + +```c++ prometheus::simpleapi::saver.set_delay(period_in_seconds); // change the period of saving (or sending) metrics data in seconds (5 seconds by default) prometheus::simpleapi::saver.set_out_file(filename); // change the name of the output file (metrics.prom by default) prometheus::simpleapi::saver.set_server_url(url); // change the name of prometheus server (unset by default) @@ -77,7 +88,7 @@ prometheus::simpleapi::saver.set_server_url(url); // change the name of ### Simple API complex example 1 (examples/simpleapi_example.cpp): -``` c++ +```c++ #include void main() { @@ -120,7 +131,7 @@ simple_counter_2 8 ### Simple API complex example 2 (examples/simpleapi_use_in_class_example.cpp): -``` c++ +```c++ #include using namespace prometheus::simpleapi; @@ -198,4 +209,3 @@ simple_benchmark_family{benchmark="2"} 1.48e-05 # TYPE simple_benchmark counter simple_benchmark 6.0503248 ``` -