From 0238d1ab7e17dbb0cb6af7c4d219ffdce3849658 Mon Sep 17 00:00:00 2001 From: lbl <1791778603@qq.com> Date: Fri, 21 Feb 2025 16:31:48 +0800 Subject: [PATCH 01/12] Modify the compilation method for the MIPS target platform. --- .github/workflows/rust.yml | 116 ++++++++++++++++++++++++++++--------- 1 file changed, 89 insertions(+), 27 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 2be7935..b7503f0 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -12,6 +12,9 @@ defaults: run: # necessary for windows shell: bash +permissions: + contents: write + packages: write jobs: # test: @@ -78,6 +81,11 @@ jobs: - TARGET: mips-unknown-linux-musl # openwrt OS: ubuntu-latest FEATURES: ring-cipher,wss +# - TARGET: x86_64-unknown-freebsd +# OS: ubuntu-latest +# ARTIFACT_NAME: freebsd-13.2-x86_64 +# FEATURES: default +# BSD_VERSION: 13.2 # needs: test runs-on: ${{ matrix.OS }} env: @@ -101,7 +109,38 @@ jobs: run: echo OPENSSL_SRC_PERL=C:/Strawberry/perl/bin/perl >> $GITHUB_ENV - name: List run: find ./ + - name: Build NetLink X86_64-FreeBSD + uses: cross-platform-actions/action@v0.23.0 + if: ${{ endsWith(matrix.TARGET, 'freebsd') }} + env: + TARGET: ${{ matrix.TARGET }} + with: + operating_system: freebsd + environment_variables: TARGET + architecture: x86-64 + version: ${{ matrix.BSD_VERSION }} + shell: bash + memory: 5G + cpu_count: 4 + run: | + uname -a + echo $SHELL + pwd + ls -lah + whoami + env | sort + sudo pkg install -y git protobuf + curl --proto 'https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + source $HOME/.cargo/env + rustup set auto-self-update disable + rustup install 1.77 + rustup default 1.77 + export CC=clang + export CXX=clang++ + export CARGO_TERM_COLOR=always + cargo build --release --verbose --target $TARGET - name: Install and configure dependencies + if: ${{ ! endsWith(matrix.TARGET, 'freebsd') }} run: | # dependencies are only needed on ubuntu as that's the only place where # we make cross-compilation @@ -112,7 +151,8 @@ jobs: # curl -s musl.cc | grep mipsel case $TARGET in mipsel-unknown-linux-musl) - MUSL_URI=mipsel-linux-musl-cross + MUSL_URI=mipsel-linux-muslsf-cross + URL=mipsel-linux-muslsf ;; aarch64-unknown-linux-musl) MUSL_URI=aarch64-linux-musl-cross @@ -122,7 +162,7 @@ jobs: ;; armv7-unknown-linux-musleabi) MUSL_URI=armv7m-linux-musleabi-cross - ;; + ;; arm-unknown-linux-musleabihf) MUSL_URI=arm-linux-musleabihf-cross ;; @@ -130,28 +170,31 @@ jobs: MUSL_URI=arm-linux-musleabi-cross ;; mips-unknown-linux-musl) - MUSL_URI=mips-linux-musl-cross + MUSL_URI=mips-linux-muslsf-cross + URL=mips-linux-muslsf ;; esac - - if [[ $TARGET =~ ^mips.*$ ]]; then - # mips平台使用1.71.1版本 - rustup install 1.71.1 - rustup default 1.71.1 - else - rustup install 1.77 - rustup default 1.77 - fi - + if [ -n "$MUSL_URI" ]; then - mkdir -p ./musl_gcc - wget -c https://musl.cc/$MUSL_URI.tgz -P ./musl_gcc/ - tar zxf ./musl_gcc/$MUSL_URI.tgz -C ./musl_gcc/ - sudo ln -s $(pwd)/musl_gcc/$MUSL_URI/bin/*gcc /usr/bin/ + mkdir -p /opt/musl_gcc + wget -c https://musl.cc/$MUSL_URI.tgz -P /opt/musl_gcc/ + tar zxf /opt/musl_gcc/$MUSL_URI.tgz -C /opt/musl_gcc/ + sudo ln -s /opt/musl_gcc/$MUSL_URI/bin/*gcc /usr/bin/ fi - else - rustup install 1.77 - rustup default 1.77 + fi + if [[ $TARGET =~ ^mips.*$ ]]; then + cd /opt/musl_gcc/${URL}-cross/lib/gcc/${URL}/11.2.1 + cp libgcc_eh.a libunwind.a + rustup toolchain install nightly-x86_64-unknown-linux-gnu + rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu + RUST_LIB_SRC=$HOME/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/ + if [[ -f $RUST_LIB_SRC/library/Cargo.lock && ! -f $RUST_LIB_SRC/Cargo.lock ]]; then + cp -f $RUST_LIB_SRC/library/Cargo.lock $RUST_LIB_SRC/Cargo.lock + fi + elif [[ $OS =~ ^windows.*$ ]]; then + # Windows 平台使用 1.77 版本 + rustup install 1.77.0 + rustup default 1.77.0 fi rustup -V @@ -175,11 +218,17 @@ jobs: linker = "arm-linux-musleabi-gcc" rustflags = ["-C", "target-feature=+crt-static","-C", "strip=symbols"] [target.mipsel-unknown-linux-musl] - linker = "mipsel-linux-musl-gcc" - rustflags = ["-C", "target-feature=+crt-static","-C", "strip=symbols"] + linker = "mipsel-linux-muslsf-gcc" + rustflags = ["-C", "target-feature=+crt-static","-C", "strip=symbols","-C", "link-arg=-static", + "-C", "relocation-model=static","-C", "link-arg=-no-pie","--cfg", "compiler_builtins_no_debug", + "-L", "/opt/musl_gcc/mipsel-linux-muslsf-cross/mipsel-linux-muslsf/lib", + "-L", "/opt/musl_gcc/mipsel-linux-muslsf-cross/lib/gcc/mipsel-linux-muslsf/11.2.1"] [target.mips-unknown-linux-musl] - linker = "mips-linux-musl-gcc" - rustflags = ["-C", "target-feature=+crt-static","-C", "strip=symbols"] + linker = "mips-linux-muslsf-gcc" + rustflags = ["-C", "target-feature=+crt-static","-C", "strip=symbols","-C", "link-arg=-static", + "-C", "relocation-model=static","-C", "link-arg=-no-pie","--cfg", "compiler_builtins_no_debug", + "-L", "/opt/musl_gcc/mips-linux-muslsf-cross/mips-linux-muslsf/lib", + "-L", "/opt/musl_gcc/mips-linux-muslsf-cross/lib/gcc/mips-linux-muslsf/11.2.1"] [target.x86_64-pc-windows-msvc] rustflags = ["-C", "target-feature=+crt-static","-C", "strip=symbols"] [target.i686-pc-windows-msvc] @@ -192,11 +241,24 @@ jobs: rustflags = ["-C", "target-feature=+crt-static","-C", "strip=symbols"] EOF - name: Install rust target + if: ${{ ! endsWith(matrix.TARGET, 'freebsd') && ! startsWith(matrix.TARGET, 'mips') }} run: rustup target add $TARGET - name: Run build vn-link-cli - run: cargo build --package vn-link-cli --release --verbose --target $TARGET --features $FEATURES + if: ${{ ! endsWith(matrix.TARGET, 'freebsd') }} + run: | + if [[ $TARGET =~ ^mips.*$ ]]; then + cargo +nightly build --package vn-link-cli --release --verbose --target $TARGET -Z build-std=std,panic_abort --features $FEATURES + else + cargo build --package vn-link-cli --release --verbose --target $TARGET --features $FEATURES + fi - name: Run build vnt-cli - run: cargo build --package vnt-cli --release --verbose --target $TARGET --features $FEATURES + if: ${{ ! endsWith(matrix.TARGET, 'freebsd') }} + run: | + if [[ $TARGET =~ ^mips.*$ ]]; then + cargo +nightly build --package vnt-cli --release --verbose --target $TARGET -Z build-std=std,panic_abort --features $FEATURES + else + cargo build --package vnt-cli --release --verbose --target $TARGET --features $FEATURES + fi - name: List target run: find ./target - name: Compress @@ -243,7 +305,7 @@ jobs: - name: Release uses: svenstaro/upload-release-action@v2 with: - repo_token: ${{ secrets.YOURTOKEN }} + repo_token: ${{ secrets.GITHUB_TOKEN }} file: ./artifacts/**/*.tar.gz tag: ${{ github.ref }} overwrite: true From 1d5257363c96fd39a607f099c34b0e6b459ffcc5 Mon Sep 17 00:00:00 2001 From: lbl <1791778603@qq.com> Date: Mon, 24 Feb 2025 10:24:48 +0800 Subject: [PATCH 02/12] use SyncDevice --- Cargo.lock | 2 +- vnt/src/handle/recv_data/server.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 68253e9..9f34761 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2083,7 +2083,7 @@ dependencies = [ [[package]] name = "tun-rs" -version = "2.0.3" +version = "2.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57cff936a4d3a03480e462b2b384dabd5baf64794f10f172965b18e0223d5fc7" dependencies = [ diff --git a/vnt/src/handle/recv_data/server.rs b/vnt/src/handle/recv_data/server.rs index 28de416..9cbae94 100644 --- a/vnt/src/handle/recv_data/server.rs +++ b/vnt/src/handle/recv_data/server.rs @@ -390,7 +390,7 @@ impl ServerPacketHandler { "device_fd == 0".into(), )); } else { - match tun_rs::platform::Device::from_fd(device_fd as _) { + match tun_rs::SyncDevice::from_fd(device_fd as _) { Ok(device) => { if let Err(e) = self.tun_device_helper.start( Arc::new(device), From ef48007922006ee7eb0755d097d96fb0f1dd2ded Mon Sep 17 00:00:00 2001 From: lbl <1791778603@qq.com> Date: Mon, 24 Feb 2025 10:57:11 +0800 Subject: [PATCH 03/12] fix type error --- vnt/src/handle/recv_data/server.rs | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/vnt/src/handle/recv_data/server.rs b/vnt/src/handle/recv_data/server.rs index 9cbae94..9cef364 100644 --- a/vnt/src/handle/recv_data/server.rs +++ b/vnt/src/handle/recv_data/server.rs @@ -390,24 +390,15 @@ impl ServerPacketHandler { "device_fd == 0".into(), )); } else { - match tun_rs::SyncDevice::from_fd(device_fd as _) { - Ok(device) => { - if let Err(e) = self.tun_device_helper.start( - Arc::new(device), - self.config_info.allow_wire_guard, - ) { - self.callback.error(ErrorInfo::new_msg( - ErrorType::FailedToCrateDevice, - format!("{:?}", e), - )); - } - } - Err(e) => { - self.callback.error(ErrorInfo::new_msg( - ErrorType::FailedToCrateDevice, - format!("{:?}", e), - )); - } + let device = tun_rs::SyncDevice::from_fd(device_fd as _); + if let Err(e) = self.tun_device_helper.start( + Arc::new(device), + self.config_info.allow_wire_guard, + ) { + self.callback.error(ErrorInfo::new_msg( + ErrorType::FailedToCrateDevice, + format!("{:?}", e), + )); } } } From 2225edeb2e7285a49c070138073ae73526392c13 Mon Sep 17 00:00:00 2001 From: lbl <1791778603@qq.com> Date: Mon, 24 Feb 2025 11:09:22 +0800 Subject: [PATCH 04/12] add unsafe block --- vnt/src/handle/recv_data/server.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vnt/src/handle/recv_data/server.rs b/vnt/src/handle/recv_data/server.rs index 9cef364..bd6dd53 100644 --- a/vnt/src/handle/recv_data/server.rs +++ b/vnt/src/handle/recv_data/server.rs @@ -390,7 +390,7 @@ impl ServerPacketHandler { "device_fd == 0".into(), )); } else { - let device = tun_rs::SyncDevice::from_fd(device_fd as _); + let device = unsafe { tun_rs::SyncDevice::from_fd(device_fd as _) }; if let Err(e) = self.tun_device_helper.start( Arc::new(device), self.config_info.allow_wire_guard, From 774a80dc466ad084d207be8cb81f6a0813aabfb6 Mon Sep 17 00:00:00 2001 From: "VNT-[bot]" Date: Sat, 26 Apr 2025 09:57:33 +0800 Subject: [PATCH 05/12] =?UTF-8?q?=E5=8D=87=E7=BA=A7mips=E5=92=8Ci686?= =?UTF-8?q?=E7=9A=84=E7=BC=96=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/rust.yml | 91 ++++++++++++-------------------------- 1 file changed, 29 insertions(+), 62 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index b7503f0..7774898 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -7,14 +7,12 @@ on: env: CARGO_TERM_COLOR: always - +permissions: + contents: write defaults: run: # necessary for windows shell: bash -permissions: - contents: write - packages: write jobs: # test: @@ -44,7 +42,7 @@ jobs: include: - TARGET: i686-unknown-linux-musl # test in an alpine container on a mac OS: ubuntu-latest - FEATURES: default + FEATURES: ring-cipher,openssl-vendored,wss - TARGET: x86_64-unknown-linux-musl # test in an alpine container on a mac OS: ubuntu-latest FEATURES: ring-cipher,wss @@ -81,11 +79,6 @@ jobs: - TARGET: mips-unknown-linux-musl # openwrt OS: ubuntu-latest FEATURES: ring-cipher,wss -# - TARGET: x86_64-unknown-freebsd -# OS: ubuntu-latest -# ARTIFACT_NAME: freebsd-13.2-x86_64 -# FEATURES: default -# BSD_VERSION: 13.2 # needs: test runs-on: ${{ matrix.OS }} env: @@ -98,7 +91,7 @@ jobs: - name: Init submodules uses: snickerbockers/submodules-init@v4 - name: Cargo cache - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: | ~/.cargo/registry @@ -109,38 +102,7 @@ jobs: run: echo OPENSSL_SRC_PERL=C:/Strawberry/perl/bin/perl >> $GITHUB_ENV - name: List run: find ./ - - name: Build NetLink X86_64-FreeBSD - uses: cross-platform-actions/action@v0.23.0 - if: ${{ endsWith(matrix.TARGET, 'freebsd') }} - env: - TARGET: ${{ matrix.TARGET }} - with: - operating_system: freebsd - environment_variables: TARGET - architecture: x86-64 - version: ${{ matrix.BSD_VERSION }} - shell: bash - memory: 5G - cpu_count: 4 - run: | - uname -a - echo $SHELL - pwd - ls -lah - whoami - env | sort - sudo pkg install -y git protobuf - curl --proto 'https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y - source $HOME/.cargo/env - rustup set auto-self-update disable - rustup install 1.77 - rustup default 1.77 - export CC=clang - export CXX=clang++ - export CARGO_TERM_COLOR=always - cargo build --release --verbose --target $TARGET - name: Install and configure dependencies - if: ${{ ! endsWith(matrix.TARGET, 'freebsd') }} run: | # dependencies are only needed on ubuntu as that's the only place where # we make cross-compilation @@ -162,7 +124,7 @@ jobs: ;; armv7-unknown-linux-musleabi) MUSL_URI=armv7m-linux-musleabi-cross - ;; + ;; arm-unknown-linux-musleabihf) MUSL_URI=arm-linux-musleabihf-cross ;; @@ -173,28 +135,34 @@ jobs: MUSL_URI=mips-linux-muslsf-cross URL=mips-linux-muslsf ;; + i686-unknown-linux-musl) + MUSL_URI=i686-linux-musl-cross + ;; esac - + if [ -n "$MUSL_URI" ]; then mkdir -p /opt/musl_gcc wget -c https://musl.cc/$MUSL_URI.tgz -P /opt/musl_gcc/ tar zxf /opt/musl_gcc/$MUSL_URI.tgz -C /opt/musl_gcc/ sudo ln -s /opt/musl_gcc/$MUSL_URI/bin/*gcc /usr/bin/ fi + else + rustup install 1.77 + rustup default 1.77 fi if [[ $TARGET =~ ^mips.*$ ]]; then - cd /opt/musl_gcc/${URL}-cross/lib/gcc/${URL}/11.2.1 - cp libgcc_eh.a libunwind.a - rustup toolchain install nightly-x86_64-unknown-linux-gnu - rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu - RUST_LIB_SRC=$HOME/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/ - if [[ -f $RUST_LIB_SRC/library/Cargo.lock && ! -f $RUST_LIB_SRC/Cargo.lock ]]; then - cp -f $RUST_LIB_SRC/library/Cargo.lock $RUST_LIB_SRC/Cargo.lock - fi - elif [[ $OS =~ ^windows.*$ ]]; then - # Windows 平台使用 1.77 版本 - rustup install 1.77.0 - rustup default 1.77.0 + # mips平台使用nightly版本 + cd /opt/musl_gcc/${URL}-cross/lib/gcc/${URL}/11.2.1 + cp libgcc_eh.a libunwind.a + rustup toolchain install nightly-x86_64-unknown-linux-gnu + rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu + RUST_LIB_SRC=$HOME/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/ + if [[ -f $RUST_LIB_SRC/library/Cargo.lock && ! -f $RUST_LIB_SRC/Cargo.lock ]]; then + cp -f $RUST_LIB_SRC/library/Cargo.lock $RUST_LIB_SRC/Cargo.lock + fi + else + rustup install 1.77 + rustup default 1.77 fi rustup -V @@ -238,13 +206,13 @@ jobs: [target.aarch64-apple-darwin] rustflags = ["-C", "target-feature=+crt-static","-C", "strip=symbols"] [target.i686-unknown-linux-musl] - rustflags = ["-C", "target-feature=+crt-static","-C", "strip=symbols"] + linker = "i686-linux-musl-gcc" + rustflags = ["-C", "target-feature=+crt-static","-C", "strip=symbols"] EOF - name: Install rust target - if: ${{ ! endsWith(matrix.TARGET, 'freebsd') && ! startsWith(matrix.TARGET, 'mips') }} + if: ${{ ! startsWith(matrix.TARGET, 'mips') }} run: rustup target add $TARGET - name: Run build vn-link-cli - if: ${{ ! endsWith(matrix.TARGET, 'freebsd') }} run: | if [[ $TARGET =~ ^mips.*$ ]]; then cargo +nightly build --package vn-link-cli --release --verbose --target $TARGET -Z build-std=std,panic_abort --features $FEATURES @@ -252,7 +220,6 @@ jobs: cargo build --package vn-link-cli --release --verbose --target $TARGET --features $FEATURES fi - name: Run build vnt-cli - if: ${{ ! endsWith(matrix.TARGET, 'freebsd') }} run: | if [[ $TARGET =~ ^mips.*$ ]]; then cargo +nightly build --package vnt-cli --release --verbose --target $TARGET -Z build-std=std,panic_abort --features $FEATURES @@ -305,8 +272,8 @@ jobs: - name: Release uses: svenstaro/upload-release-action@v2 with: - repo_token: ${{ secrets.GITHUB_TOKEN }} + repo_token: ${{ secrets.GITHUB_TOKEN }} file: ./artifacts/**/*.tar.gz tag: ${{ github.ref }} overwrite: true - file_glob: true \ No newline at end of file + file_glob: true From 04b60773b90c5894909565e5a179726127217672 Mon Sep 17 00:00:00 2001 From: "VNT-[bot]" Date: Sat, 26 Apr 2025 10:08:48 +0800 Subject: [PATCH 06/12] =?UTF-8?q?=E5=A2=9E=E5=8A=A030x=E9=87=8D=E5=AE=9A?= =?UTF-8?q?=E5=90=91=E5=8A=9F=E8=83=BD=EF=BC=88=E6=9C=8D=E5=8A=A1=E5=99=A8?= =?UTF-8?q?=E5=9C=B0=E5=9D=80=E4=BB=A5http:=E5=89=8D=E7=BC=80=EF=BC=89?= =?UTF-8?q?=E4=BE=8B=E5=A6=82=20tcp://http:=E5=9F=9F=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vnt/Cargo.toml | 3 +- vnt/src/channel/ws_channel.rs | 11 ++- vnt/src/util/dns_query.rs | 132 +++++++++++++++++++++++++++++++--- 3 files changed, 135 insertions(+), 11 deletions(-) diff --git a/vnt/Cargo.toml b/vnt/Cargo.toml index ae8907b..fd98962 100644 --- a/vnt/Cargo.toml +++ b/vnt/Cargo.toml @@ -31,6 +31,7 @@ rsa = { version = "0.9.2", features = [], optional = true } spki = { version = "0.7.2", features = ["fingerprint", "alloc", "base64"], optional = true } openssl-sys = { git = "https://github.com/vnt-dev/rust-openssl", optional = true } libsm = { git = "https://github.com/vnt-dev/libsm", optional = true } +http_req = { git = "https://github.com/lmq8267/http_req.git", default-features = false, features = ["rust-tls"] } mio = { version = "=0.8.11", features = ["os-poll", "net", "os-ext"] } crossbeam-queue = "0.3.11" @@ -84,4 +85,4 @@ zstd_compress = ["zstd"] integrated_tun = ["tun-rs"] upnp = ["igd"] ws = ["tokio-tungstenite"] -wss = ["ws", "tokio-tungstenite/rustls-tls-native-roots", "tokio-tungstenite/rustls-tls-webpki-roots", "rustls"] \ No newline at end of file +wss = ["ws", "tokio-tungstenite/rustls-tls-native-roots", "tokio-tungstenite/rustls-tls-webpki-roots", "rustls"] diff --git a/vnt/src/channel/ws_channel.rs b/vnt/src/channel/ws_channel.rs index bb7409a..30af458 100644 --- a/vnt/src/channel/ws_channel.rs +++ b/vnt/src/channel/ws_channel.rs @@ -103,7 +103,16 @@ where if let Ok(redirect) = v.to_str() { log::info!("url重定向响应头 {:?}", res.headers()); log::info!("url重定向地址 {}", redirect); - url = redirect.to_string(); + // 替换协议前缀 + if redirect.starts_with("http://") { + url = redirect.replacen("http://", "ws://", 1); + } else if redirect.starts_with("https://") { + url = redirect.replacen("https://", "wss://", 1); + } else { + url = redirect.to_string(); + } + println!("Location:{}", url); + log::info!("最终地址: {}", url); continue; } } diff --git a/vnt/src/util/dns_query.rs b/vnt/src/util/dns_query.rs index 04314f3..58d3399 100644 --- a/vnt/src/util/dns_query.rs +++ b/vnt/src/util/dns_query.rs @@ -4,7 +4,8 @@ use std::net::{Ipv4Addr, Ipv6Addr, SocketAddr, ToSocketAddrs, UdpSocket}; use std::str::FromStr; use std::time::Duration; use std::{io, thread}; - +use http_req::request::{Request, RedirectPolicy}; +use http_req::uri::Uri; use crate::channel::socket::LocalInterface; use anyhow::Context; use dns_parser::{Builder, Packet, QueryClass, QueryType, RData, ResponseCode}; @@ -82,21 +83,48 @@ pub fn dns_query_all( mut name_servers: Vec, default_interface: &LocalInterface, ) -> anyhow::Result> { - match SocketAddr::from_str(domain) { + let mut current_domain = domain.to_string(); // 引入可变变量存储当前域名 + match SocketAddr::from_str(¤t_domain) { Ok(addr) => Ok(vec![addr]), Err(_) => { - let txt_domain = domain + // 重定向判断 http: + let current_domain_lower = current_domain.to_lowercase(); + let redirect_domain = current_domain_lower + .strip_prefix("http:") + .or_else(|| current_domain_lower.strip_prefix("https:")) + .map(|v| v.to_string()); + + // 执行重定向检查 + if let Some(stripped) = redirect_domain { + if let Some(redirected_url) = check_for_redirect(&stripped)? { + + // 去掉 URL 开头的协议部分 + let final_domain = remove_http_prefix(&redirected_url); + println!("Server Address: {}", final_domain); + + // 检查是否为 IP 和端口组合 + if let Ok(socket_addr) = SocketAddr::from_str(&final_domain) { + // 如果是 IP 和端口格式,直接返回结果 + return Ok(vec![socket_addr]); + } else { + // 如果不是 IP 和端口格式,则更新为重定向地址 + current_domain = final_domain; + } + } + } + let txt_domain = current_domain .to_lowercase() .strip_prefix("txt:") .map(|v| v.to_string()); if name_servers.is_empty() { if txt_domain.is_some() { name_servers.push("223.5.5.5:53".into()); + name_servers.push("119.29.29.29:53".into()); name_servers.push("114.114.114.114:53".into()); } else { - return Ok(domain + return Ok(current_domain .to_socket_addrs() - .with_context(|| format!("DNS query failed {:?}", domain))? + .with_context(|| format!("DNS query failed {:?}", current_domain))? .collect()); } } @@ -107,6 +135,7 @@ pub fn dns_query_all( match txt_dns(domain, name_server, default_interface) { Ok(addr) => { if !addr.is_empty() { + println!("TXT: {:?}", addr); return Ok(addr); } } @@ -120,12 +149,13 @@ pub fn dns_query_all( } continue; } - let end_index = domain + + let end_index = current_domain .rfind(':') - .with_context(|| format!("{:?} not port", domain))?; + .with_context(|| format!("{:?} not port", current_domain))?; let host = &domain[..end_index]; let port = u16::from_str(&domain[end_index + 1..]) - .with_context(|| format!("{:?} not port", domain))?; + .with_context(|| format!("{:?} not port", current_domain))?; let th1 = { let host = host.to_string(); let name_server = name_server.clone(); @@ -174,12 +204,96 @@ pub fn dns_query_all( if let Some(e) = err { Err(e) } else { - Err(anyhow::anyhow!("DNS query failed {:?}", domain)) + Err(anyhow::anyhow!("DNS query failed {:?}", current_domain)) } } } } +fn parse_host_port(addr: &str) -> bool { + // 处理 IPv6 地址(格式为 [::1]:8080) + if addr.starts_with('[') { + if let Some(idx) = addr.rfind(']') { + if let Some(port_idx) = addr[idx+1..].find(':') { + let port = &addr[idx+1+port_idx+1..]; // 提取端口部分 + return !port.is_empty() && port.chars().all(|c| c.is_numeric()); + } + } + } else { + // 处理 IPv4 和普通域名(格式为 example.com:443 或 192.168.1.1:8080) + if let Some((_host, port)) = addr.rsplit_once(':') { + return !port.is_empty() && port.chars().all(|c| c.is_numeric()); + } + } + false +} + +fn check_for_redirect(domain: &String) -> anyhow::Result> { + // 确保域名有 http:// 或 https:// 前缀 + let mut url = if domain.starts_with("http://") || domain.starts_with("https://") { + domain.clone() + } else { + format!("http://{}", domain) + }; + // 解析 URL + let uri = match Uri::try_from(url.as_str()) { + Ok(u) => u, + Err(e) => { + println!("解析地址失败: {}", e); + return Ok(None); + } + }; + + let mut response_body = Vec::new(); + + // 发送 HTTP 请求 + let response = match Request::new(&uri) + .timeout(Duration::from_secs(20)) + .redirect_policy(RedirectPolicy::Limit(0)) + .send(&mut response_body) + { + Ok(resp) => { + println!("HTTP Status Code: {}", resp.status_code()); + resp + } + Err(_) => { + return Ok(None); + } + }; + + let body_str = String::from_utf8_lossy(&response_body); + let cleaned_body = body_str.replace('\n', "").replace('\r', ""); + println!("Response Body: {}", cleaned_body); + // 处理 3XX 重定向 + if response.status_code().is_redirect() { + if let Some(location) = response.headers().get("Location") { + url = location.to_string().trim_end_matches('/').to_string(); + println!("Location: {}", url); + return Ok(Some(url)); + } + } + + // 处理 200 响应 + if response.status_code().is_success() { + for line in body_str.lines() { + let trimmed = line.trim(); + if parse_host_port(trimmed) { + println!("text: {}", trimmed); + return Ok(Some(trimmed.to_string())); + } + } + return Ok(None); + } + Ok(None) +} + +/// 去掉 http:// 或 https:// 前缀 +fn remove_http_prefix(url: &str) -> String { + url.trim_start_matches("http://") + .trim_start_matches("https://") + .to_string() +} + fn query<'a>( udp: &UdpSocket, domain: &str, From 8d39d6045ade92c45072ccc2ac5d7ec0a84bd023 Mon Sep 17 00:00:00 2001 From: "VNT-[bot]" Date: Sat, 26 Apr 2025 10:15:27 +0800 Subject: [PATCH 07/12] =?UTF-8?q?=E6=B7=BB=E5=8A=A0thunk-rs=E9=93=BE?= =?UTF-8?q?=E6=8E=A5Windows=207=E5=85=BC=E5=AE=B9=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vn-link-cli/Cargo.toml | 3 +++ vn-link-cli/build.rs | 6 ++++++ vnt-cli/Cargo.toml | 5 ++++- vnt/build.rs | 3 +++ 4 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 vn-link-cli/build.rs diff --git a/vn-link-cli/Cargo.toml b/vn-link-cli/Cargo.toml index 9430979..df9ef7c 100644 --- a/vn-link-cli/Cargo.toml +++ b/vn-link-cli/Cargo.toml @@ -9,6 +9,9 @@ common = { path = "../common", default-features = false } tokio = { version = "1.37.0", features = ["full"] } log = "0.4.17" +[target.'cfg(windows)'.build-dependencies] +thunk-rs = { version = "0.3.3", features = ["win7"] } + [features] default = ["default-feature"] default-feature = ["server_encrypt", "aes_gcm", "aes_cbc", "aes_ecb", "sm4_cbc", "chacha20_poly1305", "port_mapping", "log", "command", "file_config", "lz4", "ws"] diff --git a/vn-link-cli/build.rs b/vn-link-cli/build.rs new file mode 100644 index 0000000..60bfdd2 --- /dev/null +++ b/vn-link-cli/build.rs @@ -0,0 +1,6 @@ + +fn main() { + // 配置 thunk-rs 来链接 Windows 7 兼容库,并自动设置链接参数 + #[cfg(target_os = "windows")] + thunk::thunk(); +} diff --git a/vnt-cli/Cargo.toml b/vnt-cli/Cargo.toml index 050d7a6..0569ed7 100644 --- a/vnt-cli/Cargo.toml +++ b/vnt-cli/Cargo.toml @@ -19,6 +19,9 @@ signal-hook = "0.3.17" [target.'cfg(target_os = "windows")'.dependencies] winapi = { version = "0.3.9", features = ["handleapi", "processthreadsapi", "winnt", "securitybaseapi", "impl-default"] } +[target.'cfg(windows)'.build-dependencies] +thunk-rs = { version = "0.3.3", features = ["win7"] } + [features] default = ["default-feature"] default-feature = ["server_encrypt", "aes_gcm", "aes_cbc", "aes_ecb", "sm4_cbc", "chacha20_poly1305", "ip_proxy", "port_mapping", "log", "command", "file_config", "lz4", "ws"] @@ -44,4 +47,4 @@ command = ["common/command"] file_config = ["common/file_config"] [build-dependencies] rand = "0.8.5" -chrono = "0.4.23" \ No newline at end of file +chrono = "0.4.23" diff --git a/vnt/build.rs b/vnt/build.rs index 5dd2e36..b0c6827 100644 --- a/vnt/build.rs +++ b/vnt/build.rs @@ -1,6 +1,9 @@ use cfg_aliases::cfg_aliases; fn main() { + #[cfg(target_os = "windows")] + thunk::thunk(); + cfg_aliases! { cipher: { any(feature = "aes_gcm", From 97a2f7c306a36fffdc36997b5ef90d2d5e884db8 Mon Sep 17 00:00:00 2001 From: "VNT-[bot]" Date: Sat, 26 Apr 2025 10:20:09 +0800 Subject: [PATCH 08/12] =?UTF-8?q?=E6=97=A0=E7=BD=91=E7=BB=9C=E4=B8=8D?= =?UTF-8?q?=E7=BB=88=E6=AD=A2=E7=A8=8B=E5=BA=8F=E7=BB=A7=E7=BB=AD=E8=BF=90?= =?UTF-8?q?=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vnt/src/core/mod.rs | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/vnt/src/core/mod.rs b/vnt/src/core/mod.rs index a949008..0f56737 100644 --- a/vnt/src/core/mod.rs +++ b/vnt/src/core/mod.rs @@ -141,12 +141,30 @@ impl Config { server_address_str = s.to_string(); protocol = ConnectProtocol::TCP; } - server_address = address_choose(dns_query_all( + let address_result = dns_query_all( &server_address_str, name_servers.clone(), &LocalInterface::default(), - )?)?; + ); + match address_result { + Ok(address) => { + match address_choose(address) { + Ok(resolved_address) => { + server_address = resolved_address; + } + Err(e) => { + log::error!("Failed to choose address: {}", e); + println!("Failed to choose address: {}", e); + } + } + } + Err(e) => { + log::error!("DNS query failed: {}", e); + println!("DNS query failed: {}", e); + } + } } + #[cfg(feature = "port_mapping")] let port_mapping_list = crate::port_mapping::convert(port_mapping_list)?; From 39c170892e1bc2472a783bd7ee73c63def12b35e Mon Sep 17 00:00:00 2001 From: lbl <49143209+lbl8603@users.noreply.github.com> Date: Sat, 28 Jun 2025 17:29:59 +0800 Subject: [PATCH 09/12] fmt --- vnt/src/core/mod.rs | 20 +++++++++----------- vnt/src/handle/recv_data/server.rs | 11 ++++++----- vnt/src/util/dns_query.rs | 20 ++++++++------------ 3 files changed, 23 insertions(+), 28 deletions(-) diff --git a/vnt/src/core/mod.rs b/vnt/src/core/mod.rs index 0f56737..c55262e 100644 --- a/vnt/src/core/mod.rs +++ b/vnt/src/core/mod.rs @@ -147,24 +147,22 @@ impl Config { &LocalInterface::default(), ); match address_result { - Ok(address) => { - match address_choose(address) { - Ok(resolved_address) => { - server_address = resolved_address; - } - Err(e) => { - log::error!("Failed to choose address: {}", e); - println!("Failed to choose address: {}", e); - } + Ok(address) => match address_choose(address) { + Ok(resolved_address) => { + server_address = resolved_address; } - } + Err(e) => { + log::error!("Failed to choose address: {}", e); + println!("Failed to choose address: {}", e); + } + }, Err(e) => { log::error!("DNS query failed: {}", e); println!("DNS query failed: {}", e); } } } - + #[cfg(feature = "port_mapping")] let port_mapping_list = crate::port_mapping::convert(port_mapping_list)?; diff --git a/vnt/src/handle/recv_data/server.rs b/vnt/src/handle/recv_data/server.rs index bd6dd53..bd66f24 100644 --- a/vnt/src/handle/recv_data/server.rs +++ b/vnt/src/handle/recv_data/server.rs @@ -390,11 +390,12 @@ impl ServerPacketHandler { "device_fd == 0".into(), )); } else { - let device = unsafe { tun_rs::SyncDevice::from_fd(device_fd as _) }; - if let Err(e) = self.tun_device_helper.start( - Arc::new(device), - self.config_info.allow_wire_guard, - ) { + let device = + unsafe { tun_rs::SyncDevice::from_fd(device_fd as _) }; + if let Err(e) = self + .tun_device_helper + .start(Arc::new(device), self.config_info.allow_wire_guard) + { self.callback.error(ErrorInfo::new_msg( ErrorType::FailedToCrateDevice, format!("{:?}", e), diff --git a/vnt/src/util/dns_query.rs b/vnt/src/util/dns_query.rs index 25643a5..e3067b2 100644 --- a/vnt/src/util/dns_query.rs +++ b/vnt/src/util/dns_query.rs @@ -1,14 +1,14 @@ +use crate::channel::socket::LocalInterface; +use anyhow::Context; +use dns_parser::{Builder, Packet, QueryClass, QueryType, RData, ResponseCode}; +use http_req::request::{RedirectPolicy, Request}; +use http_req::uri::Uri; use std::cell::RefCell; use std::collections::HashMap; use std::net::{Ipv4Addr, Ipv6Addr, SocketAddr, ToSocketAddrs, UdpSocket}; use std::str::FromStr; use std::time::Duration; use std::{io, thread}; -use http_req::request::{Request, RedirectPolicy}; -use http_req::uri::Uri; -use crate::channel::socket::LocalInterface; -use anyhow::Context; -use dns_parser::{Builder, Packet, QueryClass, QueryType, RData, ResponseCode}; thread_local! { static HISTORY: RefCell> = RefCell::new(HashMap::new()); @@ -97,7 +97,6 @@ pub fn dns_query_all( // 执行重定向检查 if let Some(stripped) = redirect_domain { if let Some(redirected_url) = check_for_redirect(&stripped)? { - // 去掉 URL 开头的协议部分 let final_domain = remove_http_prefix(&redirected_url); println!("Server Address: {}", final_domain); @@ -214,8 +213,8 @@ fn parse_host_port(addr: &str) -> bool { // 处理 IPv6 地址(格式为 [::1]:8080) if addr.starts_with('[') { if let Some(idx) = addr.rfind(']') { - if let Some(port_idx) = addr[idx+1..].find(':') { - let port = &addr[idx+1+port_idx+1..]; // 提取端口部分 + if let Some(port_idx) = addr[idx + 1..].find(':') { + let port = &addr[idx + 1 + port_idx + 1..]; // 提取端口部分 return !port.is_empty() && port.chars().all(|c| c.is_numeric()); } } @@ -248,9 +247,7 @@ fn check_for_redirect(domain: &String) -> anyhow::Result> { // 解析 URL let uri = match Uri::try_from(url.as_str()) { - Ok(u) => { - u - } + Ok(u) => u, Err(e) => { println!("解析地址失败: {}", e); return Ok(last_redirect_url); @@ -288,7 +285,6 @@ fn check_for_redirect(domain: &String) -> anyhow::Result> { return Ok(last_redirect_url); } } - // 处理 200 响应 else if response.status_code().is_success() { for line in body_str.lines() { From 14427ce4372c4a768dd32f2e04034de466895d71 Mon Sep 17 00:00:00 2001 From: lbl <49143209+lbl8603@users.noreply.github.com> Date: Sat, 28 Jun 2025 17:31:00 +0800 Subject: [PATCH 10/12] Update Dependencies --- Cargo.lock | 1602 ++++++++++++++++------- vn-link-cli/build.rs | 3 +- vnt-cli/Cargo.toml | 5 +- vnt-cli/build.rs | 5 + vnt/Cargo.toml | 4 +- vnt/build.rs | 3 - vnt/src/tun_tap_device/create_device.rs | 64 + 7 files changed, 1217 insertions(+), 469 deletions(-) create mode 100644 vnt-cli/build.rs diff --git a/Cargo.lock b/Cargo.lock index 9f34761..3a3c98e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,21 +1,21 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "addr2line" -version = "0.21.0" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" dependencies = [ "gimli", ] [[package]] -name = "adler" -version = "1.0.2" +name = "adler2" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" [[package]] name = "aead" @@ -78,9 +78,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.82" +version = "1.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" +checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" [[package]] name = "arc-swap" @@ -88,6 +88,30 @@ version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457" +[[package]] +name = "async-channel" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89b47800b0be77592da0afd425cc03468052844aff33b84e33cc696f64e77b6a" +dependencies = [ + "concurrent-queue", + "event-listener-strategy", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-task" +version = "4.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + [[package]] name = "attohttpc" version = "0.16.3" @@ -102,23 +126,23 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.2.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" [[package]] name = "backtrace" -version = "0.3.71" +version = "0.3.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" +checksum = "6806a6321ec58106fea15becdad98371e28d92ccbc7c8f1b3b6dd724fe8f1002" dependencies = [ "addr2line", - "cc", "cfg-if", "libc", "miniz_oxide", "object", "rustc-demangle", + "windows-targets 0.52.6", ] [[package]] @@ -129,20 +153,20 @@ checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "base64ct" -version = "1.6.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" +checksum = "55248b47b0caf0546f7988906588779981c43bb1bc9d0c44087278f80cdb44ba" [[package]] name = "bindgen" -version = "0.69.4" +version = "0.69.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0" +checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088" dependencies = [ - "bitflags 2.6.0", + "bitflags", "cexpr", "clang-sys", - "itertools", + "itertools 0.12.1", "lazy_static", "lazycell", "log", @@ -150,23 +174,37 @@ dependencies = [ "proc-macro2", "quote", "regex", - "rustc-hash", + "rustc-hash 1.1.0", "shlex", - "syn 2.0.93", + "syn 2.0.104", "which", ] [[package]] -name = "bitflags" -version = "1.3.2" +name = "bindgen" +version = "0.72.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +checksum = "4f72209734318d0b619a5e0f5129918b848c416e122a3c4ce054e03cb87b726f" +dependencies = [ + "bitflags", + "cexpr", + "clang-sys", + "itertools 0.13.0", + "log", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "rustc-hash 2.1.1", + "shlex", + "syn 2.0.104", +] [[package]] name = "bitflags" -version = "2.6.0" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" [[package]] name = "block-buffer" @@ -187,10 +225,23 @@ dependencies = [ ] [[package]] -name = "bumpalo" -version = "3.16.0" +name = "blocking" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" +checksum = "703f41c54fc768e63e091340b424302bb1c29ef4aa0c7f10fe849dfb114d29ea" +dependencies = [ + "async-channel", + "async-task", + "futures-io", + "futures-lite", + "piper", +] + +[[package]] +name = "bumpalo" +version = "3.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" [[package]] name = "byteorder" @@ -200,24 +251,24 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" [[package]] name = "c2rust-bitfields" -version = "0.19.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "367e5d1b30f28be590b6b3868da1578361d29d9bfac516d22f497d28ed7c9055" +checksum = "46dc7d2bffa0d0b3d47eb2dc69973466858281446c2ac9f6d8a10e92ab1017df" dependencies = [ "c2rust-bitfields-derive", ] [[package]] name = "c2rust-bitfields-derive" -version = "0.19.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a279db9c50c4024eeca1a763b6e0f033848ce74e83e47454bcf8a8a98f7b0b56" +checksum = "ebe1117afa5937ce280034e31fa1e84ed1824a252f75380327eed438535333f8" dependencies = [ "proc-macro2", "quote", @@ -235,13 +286,13 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.99" +version = "1.2.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96c51067fd44124faa7f870b4b1c969379ad32b2ba805aa959430ceaa384f695" +checksum = "d487aa071b5f64da6f19a3e848e3578944b726ee5a4854b82172f02aa876bfdc" dependencies = [ "jobserver", "libc", - "once_cell", + "shlex", ] [[package]] @@ -255,15 +306,9 @@ dependencies = [ [[package]] name = "cfg-if" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "cfg_aliases" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" +checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268" [[package]] name = "cfg_aliases" @@ -297,16 +342,16 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.38" +version = "0.4.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +checksum = "c469d952047f47f91b68d1cba3f10d63c11d73e4636f24f08daf0278abf01c4d" dependencies = [ "android-tzdata", "iana-time-zone", "js-sys", "num-traits", "wasm-bindgen", - "windows-targets 0.52.6", + "windows-link", ] [[package]] @@ -351,16 +396,25 @@ dependencies = [ ] [[package]] -name = "console" -version = "0.15.8" +name = "concurrent-queue" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "console" +version = "0.15.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "054ccb5b10f9f2cbf51eb355ca1d05c2d279ce1804688d0db74b4733a5aeafd8" dependencies = [ "encode_unicode", - "lazy_static", "libc", + "once_cell", "unicode-width", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -381,15 +435,15 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.12" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" dependencies = [ "libc", ] @@ -409,18 +463,18 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.13" +version = "0.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" +checksum = "82b8f8f868b36967f9606790d1903570de9ceaf870a7bf9fbbd3016d636a2cb2" dependencies = [ "crossbeam-utils", ] [[package]] name = "crossbeam-deque" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" dependencies = [ "crossbeam-epoch", "crossbeam-utils", @@ -437,18 +491,18 @@ dependencies = [ [[package]] name = "crossbeam-queue" -version = "0.3.11" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35" +checksum = "0f58bbc28f91df819d0aa2a2c00cd19754769c2fad90579b3592b1c9ba7a3115" dependencies = [ "crossbeam-utils", ] [[package]] name = "crossbeam-utils" -version = "0.8.19" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] name = "crypto-common" @@ -472,15 +526,15 @@ dependencies = [ [[package]] name = "data-encoding" -version = "2.6.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" +checksum = "2a2330da5de22e8a3cb63252ce2abb30116bf5265e89c0e01bc17015ce30a476" [[package]] name = "der" -version = "0.7.9" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" +checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" dependencies = [ "const-oid", "pem-rfc7468", @@ -515,6 +569,17 @@ dependencies = [ "crypto-common", ] +[[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.104", +] + [[package]] name = "dns-parser" version = "0.8.0" @@ -536,15 +601,15 @@ dependencies = [ [[package]] name = "either" -version = "1.11.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" +checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" [[package]] name = "encode_unicode" -version = "0.3.6" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" +checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" [[package]] name = "encoding_rs" @@ -557,25 +622,58 @@ dependencies = [ [[package]] name = "equivalent" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] name = "errno" -version = "0.3.8" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +checksum = "778e2ac28f6c47af28e4907f13ffd1e1ddbd400980a9abd7c8df189bf578a5ad" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.60.2", +] + +[[package]] +name = "event-listener" +version = "5.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3492acde4c3fc54c845eaab3eed8bd00c7a7d881f78bfc801e43a93dec1331ae" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] + +[[package]] +name = "event-listener-strategy" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8be9f3dfaaffdae2972880079a491a1a8bb7cbed0b8dd7a347f668b4150a3b93" +dependencies = [ + "event-listener", + "pin-project-lite", ] [[package]] name = "fastrand" -version = "2.0.2" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "658bd65b1cf4c852a3cc96f18a8ce7b5640f6b703f905c7d74532294c2a63984" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" + +[[package]] +name = "flume" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da0e4dd2a88388a1f4ccc7c9ce104604dab68d9f408dc34cd45823d5a9069095" +dependencies = [ + "futures-core", + "futures-sink", + "nanorand", + "spin", +] [[package]] name = "fnv" @@ -594,38 +692,54 @@ 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-io" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" + +[[package]] +name = "futures-lite" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5edaec856126859abb19ed65f39e90fea3a9574b9707f13539acf4abf7eb532" +dependencies = [ + "futures-core", + "pin-project-lite", +] [[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.93", + "syn 2.0.104", ] [[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-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-core", "futures-macro", @@ -658,37 +772,49 @@ dependencies = [ [[package]] name = "getifaddrs" -version = "0.1.5" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ba121d81ab5ea05b0cd5858516266800bf965531a794f7ac58e3eeb804f364f" +checksum = "b1c016cebf305060d144de015c98191ede05c210af588857bc2d4f8611c04663" dependencies = [ - "bitflags 2.6.0", + "bitflags", "libc", "windows-sys 0.59.0", ] [[package]] name = "getopts" -version = "0.2.21" +version = "0.2.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14dbbfd5c71d70241ecf9e6f13737f7b5ce823821063188d7e46c41d371eebd5" +checksum = "cba6ae63eb948698e300f645f87c70f76630d505f23b8907cf1e193ee85048c1" dependencies = [ "unicode-width", ] [[package]] name = "getrandom" -version = "0.2.14" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" +checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" dependencies = [ "cfg-if", "js-sys", "libc", - "wasi", + "wasi 0.11.1+wasi-snapshot-preview1", "wasm-bindgen", ] +[[package]] +name = "getrandom" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" +dependencies = [ + "cfg-if", + "libc", + "r-efi", + "wasi 0.14.2+wasi-0.2.4", +] + [[package]] name = "ghash" version = "0.5.1" @@ -701,15 +827,15 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.1" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "glob" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" +checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" [[package]] name = "hashbrown" @@ -719,23 +845,17 @@ checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "hashbrown" -version = "0.14.3" +version = "0.15.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" - -[[package]] -name = "hermit-abi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" +checksum = "5971ac85611da7067dbfcabef3c70ebb5606018acd9e2a3903a0da507521e0d5" [[package]] name = "home" -version = "0.5.9" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -751,37 +871,54 @@ dependencies = [ [[package]] name = "http" -version = "1.1.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" +checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" dependencies = [ "bytes", "fnv", "itoa", ] +[[package]] +name = "http_req" +version = "0.13.1" +source = "git+https://github.com/lmq8267/http_req.git#811fad9ba6df1a1f133f1388cb0450d75d71c000" +dependencies = [ + "base64", + "rand", + "rustls", + "rustls-pemfile", + "rustls-pki-types", + "unicase", + "webpki", + "webpki-roots 0.26.11", + "zeroize", +] + [[package]] name = "httparse" -version = "1.9.4" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" [[package]] name = "humantime" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" +checksum = "9b112acc8b3adf4b107a8ec20977da0273a8c386765a3ec0229bd500a1443f9f" [[package]] name = "iana-time-zone" -version = "0.1.60" +version = "0.1.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +checksum = "b0c919e5debc312ad217002b8048a17b7d83f80703865bbfcfebb0458b0b27d8" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", + "log", "wasm-bindgen", "windows-core", ] @@ -796,13 +933,110 @@ dependencies = [ ] [[package]] -name = "idna" -version = "0.5.0" +name = "icu_collections" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "200072f5d0e3614556f94a9930d5dc3e0662a652823904c3a75dc3b0af7fee47" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "displaydoc", + "potential_utf", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cde2700ccaed3872079a65fb1a78f6c0a36c91570f28755dda67bc8f7d9f00a" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "436880e8e18df4d7bbc06d58432329d6458cc84531f7ac5f024e93deadb37979" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00210d6893afc98edb752b664b8890f0ef174c8adbb8d0be9710fa66fbbf72d3" + +[[package]] +name = "icu_properties" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "016c619c1eeb94efb86809b015c58f479963de65bdb6253345c1a1276f22e32b" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "potential_utf", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "298459143998310acd25ffe6810ed544932242d3f07083eee1084d83a71bd632" + +[[package]] +name = "icu_provider" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03c80da27b5f4187909049ee2d72f276f0d9f99a42c306bd0131ecfe04d8e5af" +dependencies = [ + "displaydoc", + "icu_locale_core", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "idna" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" +dependencies = [ + "icu_normalizer", + "icu_properties", ] [[package]] @@ -830,19 +1064,19 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.6" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "fe4cd85333e22411419a0bcae1297d25e58c9443848b11dc6a86fefe8c78a661" dependencies = [ "equivalent", - "hashbrown 0.14.3", + "hashbrown 0.15.4", ] [[package]] name = "inout" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" +checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01" dependencies = [ "block-padding", "generic-array", @@ -850,9 +1084,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.10.1" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" +checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" [[package]] name = "itertools" @@ -864,36 +1098,47 @@ dependencies = [ ] [[package]] -name = "itoa" -version = "1.0.11" +name = "itertools" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" [[package]] name = "jobserver" -version = "0.1.31" +version = "0.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" +checksum = "38f262f097c174adebe41eb73d66ae9c06b2844fb0da69969647bbddd9b0538a" dependencies = [ + "getrandom 0.3.3", "libc", ] [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" dependencies = [ + "once_cell", "wasm-bindgen", ] [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" dependencies = [ - "spin 0.5.2", + "spin", ] [[package]] @@ -904,25 +1149,25 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.169" +version = "0.2.174" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" +checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776" [[package]] name = "libloading" -version = "0.8.3" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" +checksum = "07033963ba89ebaf1584d767badaa2e8fcec21aedea6b8c0346d487d49c28667" dependencies = [ "cfg-if", - "windows-targets 0.52.6", + "windows-targets 0.53.2", ] [[package]] name = "libm" -version = "0.2.8" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" +checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" [[package]] name = "libsm" @@ -930,7 +1175,7 @@ version = "0.5.1" source = "git+https://github.com/vnt-dev/libsm#f9e1b8cf20d0829efb4934a940d0ba4f3ee0ac14" dependencies = [ "byteorder", - "getrandom", + "getrandom 0.2.16", "lazy_static", "num-bigint", "num-integer", @@ -941,15 +1186,27 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.4.13" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" + +[[package]] +name = "linux-raw-sys" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" + +[[package]] +name = "litemap" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956" [[package]] name = "lock_api" -version = "0.4.11" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +checksum = "96936507f153605bddfcda068dd804796c84324ed2510809e5b2a624c81da765" dependencies = [ "autocfg", "scopeguard", @@ -957,9 +1214,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.21" +version = "0.4.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" dependencies = [ "serde", ] @@ -992,7 +1249,7 @@ dependencies = [ "serde-value", "serde_json", "serde_yaml", - "thiserror 1.0.58", + "thiserror", "thread-id", "typemap-ors", "winapi", @@ -1003,7 +1260,7 @@ name = "lwip-rs" version = "0.1.0" source = "git+https://github.com/vnt-dev/lwip-rs#3133f0c3bde55333a27641182ae3550e7acc2a39" dependencies = [ - "bindgen", + "bindgen 0.69.5", "cc", "crossbeam", "lazy_static", @@ -1014,25 +1271,25 @@ dependencies = [ [[package]] name = "lz4_flex" -version = "0.11.3" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75761162ae2b0e580d7e7c390558127e5f01b4194debd6221fd8c207fc80e3f5" +checksum = "08ab2867e3eeeca90e844d1940eab391c9dc5228783db2ed999acbc0a9ed375a" [[package]] name = "mac_address" -version = "1.1.7" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8836fae9d0d4be2c8b4efcdd79e828a2faa058a90d005abf42f91cac5493a08e" +checksum = "c0aeb26bf5e836cc1c341c8106051b573f1766dfa05aa87f0b98be5e51b02303" dependencies = [ - "nix 0.28.0", + "nix 0.29.0", "winapi", ] [[package]] name = "memchr" -version = "2.7.2" +version = "2.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" +checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" [[package]] name = "memoffset" @@ -1051,11 +1308,11 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.2" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" dependencies = [ - "adler", + "adler2", ] [[package]] @@ -1066,33 +1323,89 @@ checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" dependencies = [ "libc", "log", - "wasi", + "wasi 0.11.1+wasi-snapshot-preview1", "windows-sys 0.48.0", ] [[package]] -name = "network-interface" -version = "2.0.0" +name = "mio" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "433419f898328beca4f2c6c73a1b52540658d92b0a99f0269330457e0fd998d5" +checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" dependencies = [ - "cc", "libc", - "thiserror 1.0.58", - "winapi", + "wasi 0.11.1+wasi-snapshot-preview1", + "windows-sys 0.59.0", ] [[package]] -name = "nix" -version = "0.28.0" +name = "nanorand" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4" +checksum = "6a51313c5820b0b02bd422f4b44776fbf47961755c74ce64afc73bfad10226c3" dependencies = [ - "bitflags 2.6.0", - "cfg-if", - "cfg_aliases 0.1.1", + "getrandom 0.2.16", +] + +[[package]] +name = "netlink-packet-core" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72724faf704479d67b388da142b186f916188505e7e0b26719019c525882eda4" +dependencies = [ + "anyhow", + "byteorder", + "netlink-packet-utils", +] + +[[package]] +name = "netlink-packet-route" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56d83370a96813d7c977f8b63054f1162df6e5784f1c598d689236564fb5a6f2" +dependencies = [ + "anyhow", + "bitflags", + "byteorder", "libc", - "memoffset", + "log", + "netlink-packet-core", + "netlink-packet-utils", +] + +[[package]] +name = "netlink-packet-utils" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ede8a08c71ad5a95cdd0e4e52facd37190977039a4704eb82a283f713747d34" +dependencies = [ + "anyhow", + "byteorder", + "paste", + "thiserror", +] + +[[package]] +name = "netlink-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16c903aa70590cb93691bf97a767c8d1d6122d2cc9070433deb3bbf36ce8bd23" +dependencies = [ + "bytes", + "libc", + "log", +] + +[[package]] +name = "network-interface" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3329f515506e4a2de3aa6e07027a6758e22e0f0e8eaf64fa47261cec2282602" +dependencies = [ + "cc", + "libc", + "thiserror", + "winapi", ] [[package]] @@ -1101,9 +1414,22 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" dependencies = [ - "bitflags 2.6.0", + "bitflags", "cfg-if", - "cfg_aliases 0.2.1", + "cfg_aliases", + "libc", + "memoffset", +] + +[[package]] +name = "nix" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6" +dependencies = [ + "bitflags", + "cfg-if", + "cfg_aliases", "libc", ] @@ -1119,11 +1445,10 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.4" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" dependencies = [ - "autocfg", "num-integer", "num-traits", ] @@ -1156,9 +1481,9 @@ dependencies = [ [[package]] name = "num-iter" -version = "0.1.44" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d869c01cc0c455284163fd0092f1f93835385ccab5a98a0dcc497b2f8bf055a9" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" dependencies = [ "autocfg", "num-integer", @@ -1167,38 +1492,28 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", "libm", ] -[[package]] -name = "num_cpus" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" -dependencies = [ - "hermit-abi", - "libc", -] - [[package]] name = "object" -version = "0.32.2" +version = "0.36.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.19.0" +version = "1.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" [[package]] name = "opaque-debug" @@ -1208,9 +1523,9 @@ checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "openssl-probe" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" [[package]] name = "openssl-src" @@ -1249,10 +1564,16 @@ dependencies = [ ] [[package]] -name = "parking_lot" -version = "0.12.1" +name = "parking" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" + +[[package]] +name = "parking_lot" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70d58bf43669b5795d1576d0641cfb6fbb2057bf629506267a92807158584a13" dependencies = [ "lock_api", "parking_lot_core", @@ -1260,17 +1581,23 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.9" +version = "0.9.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" +checksum = "bc838d2a56b5b1a6c25f55575dfc605fabb63bb2365f6c2353ef9159aa69e4a5" dependencies = [ "cfg-if", "libc", "redox_syscall", "smallvec", - "windows-targets 0.48.5", + "windows-targets 0.52.6", ] +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + [[package]] name = "pem-rfc7468" version = "0.7.0" @@ -1288,9 +1615,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" [[package]] name = "pin-utils" @@ -1298,6 +1625,17 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "piper" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066" +dependencies = [ + "atomic-waker", + "fastrand", + "futures-io", +] + [[package]] name = "pkcs1" version = "0.7.5" @@ -1321,9 +1659,9 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.30" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" [[package]] name = "poly1305" @@ -1349,26 +1687,38 @@ dependencies = [ ] [[package]] -name = "ppv-lite86" -version = "0.2.17" +name = "potential_utf" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "e5a7c30837279ca13e7c867e9e40053bc68740f988cb07f7ca6df43cc734b585" +dependencies = [ + "zerovec", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] [[package]] name = "prettyplease" -version = "0.2.20" +version = "0.2.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" +checksum = "061c1221631e079b26479d25bbf2275bfe5917ae8419cd7e34f13bfc2aa7539a" dependencies = [ "proc-macro2", - "syn 2.0.93", + "syn 2.0.104", ] [[package]] name = "proc-macro2" -version = "1.0.92" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" +checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" dependencies = [ "unicode-ident", ] @@ -1381,7 +1731,7 @@ checksum = "b55bad9126f378a853655831eb7363b7b01b81d19f8cb1218861086ca4a1a61e" dependencies = [ "once_cell", "protobuf-support", - "thiserror 1.0.58", + "thiserror", ] [[package]] @@ -1396,7 +1746,7 @@ dependencies = [ "protobuf-parse", "regex", "tempfile", - "thiserror 1.0.58", + "thiserror", ] [[package]] @@ -1411,7 +1761,7 @@ dependencies = [ "protobuf", "protobuf-support", "tempfile", - "thiserror 1.0.58", + "thiserror", "which", ] @@ -1421,58 +1771,65 @@ version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a5d4d7b8601c814cfb36bcebb79f0e61e45e1e93640cf778837833bbed05c372" dependencies = [ - "thiserror 1.0.58", + "thiserror", ] [[package]] name = "protoc-bin-vendored" -version = "3.0.0" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "005ca8623e5633e298ad1f917d8be0a44bcf406bf3cde3b80e63003e49a3f27d" +checksum = "dd89a830d0eab2502c81a9b8226d446a52998bb78e5e33cb2637c0cdd6068d99" dependencies = [ "protoc-bin-vendored-linux-aarch_64", "protoc-bin-vendored-linux-ppcle_64", "protoc-bin-vendored-linux-x86_32", "protoc-bin-vendored-linux-x86_64", + "protoc-bin-vendored-macos-aarch_64", "protoc-bin-vendored-macos-x86_64", "protoc-bin-vendored-win32", ] [[package]] name = "protoc-bin-vendored-linux-aarch_64" -version = "3.0.0" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fb9fc9cce84c8694b6ea01cc6296617b288b703719b725b8c9c65f7c5874435" +checksum = "f563627339f1653ea1453dfbcb4398a7369b768925eb14499457aeaa45afe22c" [[package]] name = "protoc-bin-vendored-linux-ppcle_64" -version = "3.0.0" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02d2a07dcf7173a04d49974930ccbfb7fd4d74df30ecfc8762cf2f895a094516" +checksum = "5025c949a02cd3b60c02501dd0f348c16e8fff464f2a7f27db8a9732c608b746" [[package]] name = "protoc-bin-vendored-linux-x86_32" -version = "3.0.0" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54fef0b04fcacba64d1d80eed74a20356d96847da8497a59b0a0a436c9165b0" +checksum = "9c9500ce67d132c2f3b572504088712db715755eb9adf69d55641caa2cb68a07" [[package]] name = "protoc-bin-vendored-linux-x86_64" -version = "3.0.0" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8782f2ce7d43a9a5c74ea4936f001e9e8442205c244f7a3d4286bd4c37bc924" +checksum = "5462592380cefdc9f1f14635bcce70ba9c91c1c2464c7feb2ce564726614cc41" + +[[package]] +name = "protoc-bin-vendored-macos-aarch_64" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c637745681b68b4435484543667a37606c95ddacf15e917710801a0877506030" [[package]] name = "protoc-bin-vendored-macos-x86_64" -version = "3.0.0" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5de656c7ee83f08e0ae5b81792ccfdc1d04e7876b1d9a38e6876a9e09e02537" +checksum = "38943f3c90319d522f94a6dfd4a134ba5e36148b9506d2d9723a82ebc57c8b55" [[package]] name = "protoc-bin-vendored-win32" -version = "3.0.0" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9653c3ed92974e34c5a6e0a510864dab979760481714c172e0a34e437cb98804" +checksum = "7dc55d7dec32ecaf61e0bd90b3d2392d721a28b95cfd23c3e176eccefbeab2f2" [[package]] name = "quick-error" @@ -1482,13 +1839,19 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" [[package]] name = "quote" -version = "1.0.36" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" dependencies = [ "proc-macro2", ] +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + [[package]] name = "r-ex" version = "1.0.1" @@ -1522,23 +1885,23 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom", + "getrandom 0.2.16", ] [[package]] name = "redox_syscall" -version = "0.4.1" +version = "0.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +checksum = "0d04b7d0ee6b4a0207a0a7adb104d23ecb0b47d6beae7152d0fa34b692b29fd6" dependencies = [ - "bitflags 1.3.2", + "bitflags", ] [[package]] name = "regex" -version = "1.10.4" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", @@ -1548,9 +1911,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.6" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", @@ -1559,30 +1922,44 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.3" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "ring" -version = "0.17.8" +version = "0.17.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" dependencies = [ "cc", "cfg-if", - "getrandom", + "getrandom 0.2.16", "libc", - "spin 0.9.8", "untrusted", "windows-sys 0.52.0", ] [[package]] -name = "rsa" -version = "0.9.6" +name = "route_manager" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d0e5124fcb30e76a7e79bfee683a2746db83784b86289f6251b54b7950a0dfc" +checksum = "0f3a4eae9e0cc97729d29d7d0936dd30170c80625cca122a56856fd23d619159" +dependencies = [ + "bindgen 0.72.0", + "flume", + "libc", + "netlink-packet-core", + "netlink-packet-route", + "netlink-sys", + "windows-sys 0.60.2", +] + +[[package]] +name = "rsa" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78928ac1ed176a5ca1d17e578a1825f3d81ca54cf41053a592584b020cfd691b" dependencies = [ "const-oid", "digest", @@ -1600,9 +1977,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.23" +version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +checksum = "989e6739f80c4ad5b13e0fd7fe89531180375b18520cc8c82080e4dc4035b84f" [[package]] name = "rustc-hash" @@ -1611,23 +1988,42 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] -name = "rustix" -version = "0.38.32" +name = "rustc-hash" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65e04861e65f21776e67888bfbea442b3642beaa0138fdb1dd7a84a52dffdb89" +checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" + +[[package]] +name = "rustix" +version = "0.38.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" dependencies = [ - "bitflags 2.6.0", + "bitflags", "errno", "libc", - "linux-raw-sys", - "windows-sys 0.52.0", + "linux-raw-sys 0.4.15", + "windows-sys 0.59.0", +] + +[[package]] +name = "rustix" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c71e83d6afe7ff64890ec6b71d6a69bb8a610ab78ce364b3352876bb4c801266" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys 0.9.4", + "windows-sys 0.59.0", ] [[package]] name = "rustls" -version = "0.23.10" +version = "0.23.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05cff451f60db80f490f3c182b77c35260baace73209e9cdbbe526bfe3a4d402" +checksum = "7160e3e10bf4535308537f3c4e1641468cd0e485175d6163087c0393c7d46643" dependencies = [ "once_cell", "ring", @@ -1639,9 +2035,9 @@ dependencies = [ [[package]] name = "rustls-native-certs" -version = "0.7.1" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a88d6d420651b496bdd98684116959239430022a115c1240e6c3993be0b15fba" +checksum = "e5bfb394eeed242e909609f56089eecfe5fda225042e8b171791b9c95f5931e5" dependencies = [ "openssl-probe", "rustls-pemfile", @@ -1652,25 +2048,27 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "2.1.2" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" dependencies = [ - "base64", "rustls-pki-types", ] [[package]] name = "rustls-pki-types" -version = "1.7.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" +checksum = "229a4a4c221013e7e1f1a043678c5cc39fe5171437c88fb47151a21e6f5b5c79" +dependencies = [ + "zeroize", +] [[package]] name = "rustls-webpki" -version = "0.102.4" +version = "0.103.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff448f7e92e913c4b7d4c6d8e4540a1724b319b4152b8aef6d4cf8339712b33e" +checksum = "e4a72fe2bcf7a6ac6fd7d0b9e5cb68aeb7d4c0a0271730218b3e92d43b4eb435" dependencies = [ "ring", "rustls-pki-types", @@ -1678,18 +2076,24 @@ dependencies = [ ] [[package]] -name = "ryu" -version = "1.0.17" +name = "rustversion" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" +checksum = "8a0d197bd2c9dc6e53b84da9556a69ba4cdfab8619eb41a8bd1cc2027a0f6b1d" + +[[package]] +name = "ryu" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" [[package]] name = "schannel" -version = "0.1.23" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -1700,11 +2104,11 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "security-framework" -version = "2.11.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 2.6.0", + "bitflags", "core-foundation", "core-foundation-sys", "libc", @@ -1713,9 +2117,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.11.0" +version = "2.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7" +checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" dependencies = [ "core-foundation-sys", "libc", @@ -1723,9 +2127,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.198" +version = "1.0.219" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9846a40c979031340571da2545a4e5b7c4163bdae79b301d5f86d03979451fcc" +checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" dependencies = [ "serde_derive", ] @@ -1742,22 +2146,23 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.198" +version = "1.0.219" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e88edab869b01783ba905e7d0153f9fc1a6505a96e4ad3018011eedb838566d9" +checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.104", ] [[package]] name = "serde_json" -version = "1.0.116" +version = "1.0.140" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e17db7126d17feb94eb3fad46bf1a96b034e8aacbc2e775fe81505f8b0b2813" +checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] @@ -1768,7 +2173,7 @@ version = "0.9.34+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.10.0", "itoa", "ryu", "serde", @@ -1788,9 +2193,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.8" +version = "0.10.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" dependencies = [ "cfg-if", "cpufeatures", @@ -1805,9 +2210,9 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "signal-hook" -version = "0.3.17" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" +checksum = "d881a16cf4426aa584979d30bd82cb33429027e42122b169753d6ef1085ed6e2" dependencies = [ "libc", "signal-hook-registry", @@ -1815,9 +2220,9 @@ dependencies = [ [[package]] name = "signal-hook-registry" -version = "1.4.2" +version = "1.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" +checksum = "9203b8055f63a2a00e2f593bb0510367fe707d7ff1e5c872de2f537b339e5410" dependencies = [ "libc", ] @@ -1834,40 +2239,34 @@ dependencies = [ [[package]] name = "slab" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] +checksum = "04dc19736151f35336d325007ac991178d504a119863a2fcb3758cdb5e52c50d" [[package]] name = "smallvec" -version = "1.13.2" +version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" [[package]] name = "socket2" -version = "0.5.7" +version = "0.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" +checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" dependencies = [ "libc", "windows-sys 0.52.0", ] -[[package]] -name = "spin" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" - [[package]] name = "spin" version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +dependencies = [ + "lock_api", +] [[package]] name = "spki" @@ -1880,6 +2279,12 @@ dependencies = [ "sha2", ] +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + [[package]] name = "stun-bytes" version = "1.0.1" @@ -1901,9 +2306,9 @@ dependencies = [ [[package]] name = "subtle" -version = "2.5.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "sudo" @@ -1928,9 +2333,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.93" +version = "2.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c786062daee0d6db1132800e623df74274a0a87322d8e183338e01b3d98d058" +checksum = "17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40" dependencies = [ "proc-macro2", "quote", @@ -1938,129 +2343,120 @@ dependencies = [ ] [[package]] -name = "sys-locale" -version = "0.3.1" +name = "synstructure" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e801cf239ecd6ccd71f03d270d67dd53d13e90aab208bf4b8fe4ad957ea949b0" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "sys-locale" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eab9a99a024a169fe8a903cf9d4a3b3601109bcc13bd9e3c6fff259138626c4" dependencies = [ "libc", ] [[package]] name = "tempfile" -version = "3.10.1" +version = "3.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +checksum = "e8a64e3985349f2441a1a9ef0b853f869006c3855f2cda6862a94d26ebb9d6a1" dependencies = [ - "cfg-if", "fastrand", - "rustix", - "windows-sys 0.52.0", + "getrandom 0.3.3", + "once_cell", + "rustix 1.0.7", + "windows-sys 0.59.0", ] [[package]] name = "thiserror" -version = "1.0.58" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ - "thiserror-impl 1.0.58", -] - -[[package]] -name = "thiserror" -version = "2.0.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f072643fd0190df67a8bab670c20ef5d8737177d6ac6b2e9a236cb096206b2cc" -dependencies = [ - "thiserror-impl 2.0.9", + "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.58" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", -] - -[[package]] -name = "thiserror-impl" -version = "2.0.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b50fa271071aae2e6ee85f842e2e28ba8cd2c5fb67f11fcb1fd70b276f9e7d4" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.93", + "syn 2.0.104", ] [[package]] name = "thread-id" -version = "4.2.1" +version = "4.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0ec81c46e9eb50deaa257be2f148adf052d1fb7701cfd55ccfab2525280b70b" +checksum = "cfe8f25bbdd100db7e1d34acf7fd2dc59c4bf8f7483f505eaa7d4f12f76cc0ea" dependencies = [ "libc", "winapi", ] [[package]] -name = "tinyvec" -version = "1.6.1" +name = "thunk-rs" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c55115c6fbe2d2bef26eb09ad74bde02d8255476fc0c7b515ef09fbb35742d82" +checksum = "7cbc000e786a7ea2cfa3a85ef77cf86bfdadeaa2b215ec4751df66442fa4632a" + +[[package]] +name = "tinystr" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d4f6d1145dcb577acf783d4e601bc1d76a13337bb54e6233add580b07344c8b" 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.37.0" +version = "1.45.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" +checksum = "75ef51a33ef1da925cea3e4eb122833cb377c61439ca401b770f54902b806779" dependencies = [ "backtrace", "bytes", "libc", - "mio", - "num_cpus", + "mio 1.0.4", "parking_lot", "pin-project-lite", "signal-hook-registry", "socket2", "tokio-macros", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "tokio-macros" -version = "2.2.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.104", ] [[package]] name = "tokio-rustls" -version = "0.26.0" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" +checksum = "8e727b36a1a0e8b74c376ac2211e40c2c8af09fb4013c60d910495810f008e9b" dependencies = [ "rustls", - "rustls-pki-types", "tokio", ] @@ -2078,20 +2474,20 @@ dependencies = [ "tokio", "tokio-rustls", "tungstenite", - "webpki-roots", + "webpki-roots 0.26.11", ] [[package]] name = "tun-rs" -version = "2.0.5" +version = "2.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57cff936a4d3a03480e462b2b384dabd5baf64794f10f172965b18e0223d5fc7" +checksum = "e2ea0d5c871693b7b3129f2d8bb72442ebc0a76fd690faf68c962bc6184c5d81" dependencies = [ - "bitflags 2.6.0", + "bindgen 0.72.0", + "blocking", "byteorder", "bytes", "c2rust-bitfields", - "cfg-if", "encoding_rs", "getifaddrs", "ipnet", @@ -2099,11 +2495,12 @@ dependencies = [ "libloading", "log", "mac_address", - "nix 0.29.0", + "nix 0.30.1", + "route_manager", "scopeguard", - "thiserror 2.0.9", + "tokio", "widestring", - "windows-sys 0.59.0", + "windows-sys 0.60.2", "winreg", ] @@ -2116,14 +2513,14 @@ dependencies = [ "byteorder", "bytes", "data-encoding", - "http 1.1.0", + "http 1.3.1", "httparse", "log", "rand", "rustls", "rustls-pki-types", "sha1", - "thiserror 1.0.58", + "thiserror", "utf-8", ] @@ -2138,36 +2535,27 @@ dependencies = [ [[package]] name = "typenum" -version = "1.17.0" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" +checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f" [[package]] -name = "unicode-bidi" -version = "0.3.15" +name = "unicase" +version = "2.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" +checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" - -[[package]] -name = "unicode-normalization" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" -dependencies = [ - "tinyvec", -] +checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" [[package]] name = "unicode-width" -version = "0.1.13" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" +checksum = "4a1a07cc7db3810833284e8d372ccdc6da29741639ecc70c9ec107df0fa6154c" [[package]] name = "universal-hash" @@ -2202,9 +2590,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", @@ -2218,12 +2606,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" [[package]] -name = "uuid" -version = "1.8.0" +name = "utf8_iter" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] +name = "uuid" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3cf4199d1e5d15ddd86a694e4d0dffa9c323ce759fea589f00fef9d81cc1931d" dependencies = [ - "getrandom", + "getrandom 0.3.3", + "js-sys", + "wasm-bindgen", ] [[package]] @@ -2234,9 +2630,9 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "vn-link" @@ -2257,6 +2653,7 @@ version = "1.2.16" dependencies = [ "common", "log", + "thunk-rs", "tokio", "vn-link", ] @@ -2270,7 +2667,7 @@ dependencies = [ "anyhow", "bytes", "cbc", - "cfg_aliases 0.2.1", + "cfg_aliases", "chacha20", "chacha20poly1305", "crossbeam-epoch", @@ -2280,13 +2677,14 @@ dependencies = [ "ecb", "fnv", "futures-util", + "http_req", "igd", "libc", "libloading", "libsm", "log", "lz4_flex", - "mio", + "mio 0.8.11", "network-interface", "openssl-sys", "packet", @@ -2302,11 +2700,12 @@ dependencies = [ "socket2", "spki", "stun-format", - "thiserror 1.0.58", + "thiserror", "tokio", "tokio-tungstenite", "tun-rs", "windows-sys 0.59.0", + "winreg", "zstd", ] @@ -2322,46 +2721,57 @@ dependencies = [ "rand", "signal-hook", "sudo", + "thunk-rs", "vnt", "winapi", ] [[package]] name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" +version = "0.11.1+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasi" +version = "0.14.2+wasi-0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" +dependencies = [ + "wit-bindgen-rt", +] [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" dependencies = [ "cfg-if", + "once_cell", + "rustversion", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" dependencies = [ "bumpalo", "log", - "once_cell", "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.104", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2369,28 +2779,50 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.104", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "webpki" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53" +dependencies = [ + "ring", + "untrusted", +] [[package]] name = "webpki-roots" -version = "0.26.3" +version = "0.26.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd7c23921eeb1713a4e851530e9b9756e4fb0e89978582942612524cf09f01cd" +checksum = "521bc38abb08001b01866da9f51eb7c5d647a19260e00054a8c7fd5f9e57f7a9" +dependencies = [ + "webpki-roots 1.0.1", +] + +[[package]] +name = "webpki-roots" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8782dd5a41a24eed3a4f40b606249b3e236ca61adf1f25ea4d45c73de122b502" dependencies = [ "rustls-pki-types", ] @@ -2404,14 +2836,14 @@ dependencies = [ "either", "home", "once_cell", - "rustix", + "rustix 0.38.44", ] [[package]] name = "widestring" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7219d36b6eac893fa81e84ebe06485e7dcbb616177469b142df14f1f4deb1311" +checksum = "dd7cf3379ca1aac9eea11fba24fd7e315d621f8dfe35c8d7d2be8b793726e07d" [[package]] name = "wildmatch" @@ -2443,11 +2875,61 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows-core" -version = "0.52.0" +version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" dependencies = [ - "windows-targets 0.52.6", + "windows-implement", + "windows-interface", + "windows-link", + "windows-result", + "windows-strings", +] + +[[package]] +name = "windows-implement" +version = "0.60.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "windows-interface" +version = "0.59.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "windows-link" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" + +[[package]] +name = "windows-result" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-strings" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" +dependencies = [ + "windows-link", ] [[package]] @@ -2477,6 +2959,15 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets 0.53.2", +] + [[package]] name = "windows-targets" version = "0.48.5" @@ -2501,13 +2992,29 @@ dependencies = [ "windows_aarch64_gnullvm 0.52.6", "windows_aarch64_msvc 0.52.6", "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm", + "windows_i686_gnullvm 0.52.6", "windows_i686_msvc 0.52.6", "windows_x86_64_gnu 0.52.6", "windows_x86_64_gnullvm 0.52.6", "windows_x86_64_msvc 0.52.6", ] +[[package]] +name = "windows-targets" +version = "0.53.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c66f69fcc9ce11da9966ddb31a40968cad001c5bedeb5c2b82ede4253ab48aef" +dependencies = [ + "windows_aarch64_gnullvm 0.53.0", + "windows_aarch64_msvc 0.53.0", + "windows_i686_gnu 0.53.0", + "windows_i686_gnullvm 0.53.0", + "windows_i686_msvc 0.53.0", + "windows_x86_64_gnu 0.53.0", + "windows_x86_64_gnullvm 0.53.0", + "windows_x86_64_msvc 0.53.0", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.48.5" @@ -2520,6 +3027,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" + [[package]] name = "windows_aarch64_msvc" version = "0.48.5" @@ -2532,6 +3045,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" + [[package]] name = "windows_i686_gnu" version = "0.48.5" @@ -2544,12 +3063,24 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" +[[package]] +name = "windows_i686_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" + [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" + [[package]] name = "windows_i686_msvc" version = "0.48.5" @@ -2562,6 +3093,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" +[[package]] +name = "windows_i686_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" + [[package]] name = "windows_x86_64_gnu" version = "0.48.5" @@ -2574,6 +3111,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" + [[package]] name = "windows_x86_64_gnullvm" version = "0.48.5" @@ -2586,6 +3129,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" + [[package]] name = "windows_x86_64_msvc" version = "0.48.5" @@ -2598,6 +3147,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" + [[package]] name = "winreg" version = "0.55.0" @@ -2609,10 +3164,25 @@ dependencies = [ ] [[package]] -name = "xml-rs" -version = "0.8.20" +name = "wit-bindgen-rt" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "791978798f0597cfc70478424c2b4fdc2b7a8024aaff78497ef00f24ef674193" +checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" +dependencies = [ + "bitflags", +] + +[[package]] +name = "writeable" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea2f10b9bb0928dfb1b42b65e1f9e36f7f54dbdf08457afefb38afcdec4fa2bb" + +[[package]] +name = "xml-rs" +version = "0.8.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a62ce76d9b56901b19a74f19431b0d8b3bc7ca4ad685a746dfd78ca8f4fc6bda" [[package]] name = "xmltree" @@ -2633,34 +3203,146 @@ dependencies = [ ] [[package]] -name = "zeroize" -version = "1.7.0" +name = "yoke" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" +checksum = "5f41bb01b8226ef4bfd589436a297c53d118f65921786300e427be8d487695cc" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", + "synstructure", +] + +[[package]] +name = "zerocopy" +version = "0.8.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1039dd0d3c310cf05de012d8a39ff557cb0d23087fd44cad61df08fc31907a2f" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ecf5b4cc5364572d7f4c329661bcc82724222973f2cab6f050a4e5c22f75181" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "zerofrom" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", + "synstructure", +] + +[[package]] +name = "zeroize" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "zerotrie" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36f0bbd478583f79edad978b407914f61b2972f5af6fa089686016be8f9af595" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a05eb080e015ba39cc9e23bbe5e7fb04d5fb040350f99f34e338d5fdd294428" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] [[package]] name = "zstd" -version = "0.13.1" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d789b1514203a1120ad2429eae43a7bd32b90976a7bb8a05f7ec02fa88cc23a" +checksum = "e91ee311a569c327171651566e07972200e76fcfe2242a4fa446149a3881c08a" dependencies = [ "zstd-safe", ] [[package]] name = "zstd-safe" -version = "7.1.0" +version = "7.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd99b45c6bc03a018c8b8a86025678c87e55526064e38f9df301989dce7ec0a" +checksum = "8f49c4d5f0abb602a93fb8736af2a4f4dd9512e36f7f570d66e65ff867ed3b9d" dependencies = [ "zstd-sys", ] [[package]] name = "zstd-sys" -version = "2.0.10+zstd.1.5.6" +version = "2.0.15+zstd.1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c253a4914af5bafc8fa8c86ee400827e83cf6ec01195ec1f1ed8441bf00d65aa" +checksum = "eb81183ddd97d0c74cedf1d50d85c8d08c1b8b68ee863bdee9e706eedba1a237" dependencies = [ "cc", "pkg-config", diff --git a/vn-link-cli/build.rs b/vn-link-cli/build.rs index 60bfdd2..4d63de1 100644 --- a/vn-link-cli/build.rs +++ b/vn-link-cli/build.rs @@ -1,6 +1,5 @@ - fn main() { // 配置 thunk-rs 来链接 Windows 7 兼容库,并自动设置链接参数 - #[cfg(target_os = "windows")] + #[cfg(target_os = "windows")] thunk::thunk(); } diff --git a/vnt-cli/Cargo.toml b/vnt-cli/Cargo.toml index 0569ed7..4de7503 100644 --- a/vnt-cli/Cargo.toml +++ b/vnt-cli/Cargo.toml @@ -19,8 +19,6 @@ signal-hook = "0.3.17" [target.'cfg(target_os = "windows")'.dependencies] winapi = { version = "0.3.9", features = ["handleapi", "processthreadsapi", "winnt", "securitybaseapi", "impl-default"] } -[target.'cfg(windows)'.build-dependencies] -thunk-rs = { version = "0.3.3", features = ["win7"] } [features] default = ["default-feature"] @@ -48,3 +46,6 @@ file_config = ["common/file_config"] [build-dependencies] rand = "0.8.5" chrono = "0.4.23" + +[target.'cfg(windows)'.build-dependencies] +thunk-rs = { version = "0.3.3", features = ["win7"] } diff --git a/vnt-cli/build.rs b/vnt-cli/build.rs new file mode 100644 index 0000000..4d63de1 --- /dev/null +++ b/vnt-cli/build.rs @@ -0,0 +1,5 @@ +fn main() { + // 配置 thunk-rs 来链接 Windows 7 兼容库,并自动设置链接参数 + #[cfg(target_os = "windows")] + thunk::thunk(); +} diff --git a/vnt/Cargo.toml b/vnt/Cargo.toml index e6f6e4e..e5589dc 100644 --- a/vnt/Cargo.toml +++ b/vnt/Cargo.toml @@ -6,8 +6,7 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -http_req = { git = "https://github.com/lmq8267/http_req.git", default-features = false, features = ["rust-tls"] } -tun-rs = { version = "2", optional = true, features = ["experimental"] } +tun-rs = { version = "2", optional = true, features = ["async"] } packet = { path = "./packet" } bytes = "1.5.0" log = "0.4.17" @@ -53,6 +52,7 @@ network-interface = "2.0.0" futures-util = "0.3.30" [target.'cfg(target_os = "windows")'.dependencies] +winreg = "0.55.0" libloading = "0.8.0" windows-sys = { version = "0.59.0", features = ["Win32_Foundation", "Win32_NetworkManagement", diff --git a/vnt/build.rs b/vnt/build.rs index b0c6827..5dd2e36 100644 --- a/vnt/build.rs +++ b/vnt/build.rs @@ -1,9 +1,6 @@ use cfg_aliases::cfg_aliases; fn main() { - #[cfg(target_os = "windows")] - thunk::thunk(); - cfg_aliases! { cipher: { any(feature = "aes_gcm", diff --git a/vnt/src/tun_tap_device/create_device.rs b/vnt/src/tun_tap_device/create_device.rs index 819b14a..9a58d7c 100644 --- a/vnt/src/tun_tap_device/create_device.rs +++ b/vnt/src/tun_tap_device/create_device.rs @@ -70,6 +70,11 @@ fn create_device0(config: &DeviceConfig) -> io::Result> { #[cfg(target_os = "windows")] { + let name = config + .device_name + .clone() + .unwrap_or_else(|| DEFAULT_TUN_NAME.to_string()); + _ = delete_adapter_info_from_reg(&name); tun_builder = tun_builder.metric(0).ring_capacity(4 * 1024 * 1024); } @@ -102,6 +107,65 @@ fn delete_device(name: &str) { log::warn!("删除网卡失败:{:?}", delete_tun); } } +#[cfg(windows)] +fn delete_adapter_info_from_reg(dev_name: &str) -> std::io::Result<()> { + use std::collections::HashSet; + use winreg::{enums::HKEY_LOCAL_MACHINE, enums::KEY_ALL_ACCESS, RegKey}; + let hklm = RegKey::predef(HKEY_LOCAL_MACHINE); + let profiles_key = hklm.open_subkey_with_flags( + "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\NetworkList\\Profiles", + KEY_ALL_ACCESS, + )?; + let mut profile_guid_set = HashSet::new(); + for sub_key_name in profiles_key.enum_keys().filter_map(Result::ok) { + let sub_key = profiles_key.open_subkey(&sub_key_name)?; + match sub_key.get_value::("Description") { + Ok(profile_name) => { + if dev_name == profile_name { + match profiles_key.delete_subkey_all(&sub_key_name) { + Ok(_) => { + log::info!("deleted Profiles sub_key: {}", sub_key_name); + profile_guid_set.insert(sub_key_name); + } + Err(e) => { + log::warn!("Failed to delete Profiles sub_key {}: {}", sub_key_name, e) + } + } + } + } + Err(e) => log::warn!( + "Failed to read Description for sub_key {}: {}", + sub_key_name, + e + ), + } + } + let unmanaged_key = hklm.open_subkey_with_flags( + "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\NetworkList\\Signatures\\Unmanaged", + KEY_ALL_ACCESS, + )?; + for sub_key_name in unmanaged_key.enum_keys().filter_map(Result::ok) { + let sub_key = unmanaged_key.open_subkey(&sub_key_name)?; + match sub_key.get_value::("ProfileGuid") { + Ok(profile_guid) => { + if profile_guid_set.contains(&profile_guid) { + match unmanaged_key.delete_subkey_all(&sub_key_name) { + Ok(_) => log::info!("deleted Unmanaged sub_key: {}", sub_key_name), + Err(e) => { + log::warn!("Failed to delete Unmanaged sub_key {}: {}", sub_key_name, e) + } + } + } + } + Err(e) => log::warn!( + "Failed to read Description for sub_key {}: {}", + sub_key_name, + e + ), + } + } + Ok(()) +} #[cfg(target_os = "windows")] pub fn add_route(index: u32, dest: Ipv4Addr, netmask: Ipv4Addr) -> io::Result<()> { From 2b2a550a98290a49032ea009fb06809785897e11 Mon Sep 17 00:00:00 2001 From: lbl <49143209+lbl8603@users.noreply.github.com> Date: Sat, 28 Jun 2025 17:38:46 +0800 Subject: [PATCH 11/12] not specify the rust version --- .github/workflows/rust.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 7774898..0ebb8b9 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -146,9 +146,6 @@ jobs: tar zxf /opt/musl_gcc/$MUSL_URI.tgz -C /opt/musl_gcc/ sudo ln -s /opt/musl_gcc/$MUSL_URI/bin/*gcc /usr/bin/ fi - else - rustup install 1.77 - rustup default 1.77 fi if [[ $TARGET =~ ^mips.*$ ]]; then # mips平台使用nightly版本 @@ -160,9 +157,6 @@ jobs: if [[ -f $RUST_LIB_SRC/library/Cargo.lock && ! -f $RUST_LIB_SRC/Cargo.lock ]]; then cp -f $RUST_LIB_SRC/library/Cargo.lock $RUST_LIB_SRC/Cargo.lock fi - else - rustup install 1.77 - rustup default 1.77 fi rustup -V From 22eee048d078254c7a7fe30fb454b6e589fb9fb2 Mon Sep 17 00:00:00 2001 From: lbl <1791778603@qq.com> Date: Sat, 19 Jul 2025 22:10:53 +0800 Subject: [PATCH 12/12] Use the latest version of tun-rs --- Cargo.lock | 125 +++++------------------------ vnt/Cargo.toml | 6 +- vnt/src/handle/tun_tap/platform.rs | 11 ++- 3 files changed, 28 insertions(+), 114 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3a3c98e..3112354 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -88,30 +88,6 @@ version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457" -[[package]] -name = "async-channel" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b47800b0be77592da0afd425cc03468052844aff33b84e33cc696f64e77b6a" -dependencies = [ - "concurrent-queue", - "event-listener-strategy", - "futures-core", - "pin-project-lite", -] - -[[package]] -name = "async-task" -version = "4.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" - -[[package]] -name = "atomic-waker" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" - [[package]] name = "attohttpc" version = "0.16.3" @@ -224,19 +200,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "blocking" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "703f41c54fc768e63e091340b424302bb1c29ef4aa0c7f10fe849dfb114d29ea" -dependencies = [ - "async-channel", - "async-task", - "futures-io", - "futures-lite", - "piper", -] - [[package]] name = "bumpalo" version = "3.19.0" @@ -395,15 +358,6 @@ dependencies = [ "vnt", ] -[[package]] -name = "concurrent-queue" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" -dependencies = [ - "crossbeam-utils", -] - [[package]] name = "console" version = "0.15.11" @@ -636,27 +590,6 @@ dependencies = [ "windows-sys 0.60.2", ] -[[package]] -name = "event-listener" -version = "5.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3492acde4c3fc54c845eaab3eed8bd00c7a7d881f78bfc801e43a93dec1331ae" -dependencies = [ - "concurrent-queue", - "parking", - "pin-project-lite", -] - -[[package]] -name = "event-listener-strategy" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8be9f3dfaaffdae2972880079a491a1a8bb7cbed0b8dd7a347f668b4150a3b93" -dependencies = [ - "event-listener", - "pin-project-lite", -] - [[package]] name = "fastrand" version = "2.3.0" @@ -696,22 +629,6 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" -[[package]] -name = "futures-io" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" - -[[package]] -name = "futures-lite" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5edaec856126859abb19ed65f39e90fea3a9574b9707f13539acf4abf7eb532" -dependencies = [ - "futures-core", - "pin-project-lite", -] - [[package]] name = "futures-macro" version = "0.3.31" @@ -1082,6 +999,17 @@ dependencies = [ "generic-array", ] +[[package]] +name = "io-uring" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b86e202f00093dcba4275d4636b93ef9dd75d025ae560d2521b45ea28ab49013" +dependencies = [ + "bitflags", + "cfg-if", + "libc", +] + [[package]] name = "ipnet" version = "2.11.0" @@ -1563,12 +1491,6 @@ dependencies = [ "byteorder", ] -[[package]] -name = "parking" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" - [[package]] name = "parking_lot" version = "0.12.4" @@ -1625,17 +1547,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" -[[package]] -name = "piper" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066" -dependencies = [ - "atomic-waker", - "fastrand", - "futures-io", -] - [[package]] name = "pkcs1" version = "0.7.5" @@ -2423,17 +2334,19 @@ dependencies = [ [[package]] name = "tokio" -version = "1.45.1" +version = "1.46.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75ef51a33ef1da925cea3e4eb122833cb377c61439ca401b770f54902b806779" +checksum = "0cc3a2344dafbe23a245241fe8b09735b521110d30fcefbbd5feb1797ca35d17" dependencies = [ "backtrace", "bytes", + "io-uring", "libc", "mio 1.0.4", "parking_lot", "pin-project-lite", "signal-hook-registry", + "slab", "socket2", "tokio-macros", "windows-sys 0.52.0", @@ -2479,12 +2392,11 @@ dependencies = [ [[package]] name = "tun-rs" -version = "2.4.2" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2ea0d5c871693b7b3129f2d8bb72442ebc0a76fd690faf68c962bc6184c5d81" +checksum = "041ac55a23c02ef3ca62bf41a6a43830119818e07f65805bad27afb93292fc9c" dependencies = [ "bindgen 0.72.0", - "blocking", "byteorder", "bytes", "c2rust-bitfields", @@ -2498,7 +2410,6 @@ dependencies = [ "nix 0.30.1", "route_manager", "scopeguard", - "tokio", "widestring", "windows-sys 0.60.2", "winreg", @@ -2704,7 +2615,7 @@ dependencies = [ "tokio", "tokio-tungstenite", "tun-rs", - "windows-sys 0.59.0", + "windows-sys 0.60.2", "winreg", "zstd", ] diff --git a/vnt/Cargo.toml b/vnt/Cargo.toml index e5589dc..96b8efc 100644 --- a/vnt/Cargo.toml +++ b/vnt/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -tun-rs = { version = "2", optional = true, features = ["async"] } +tun-rs = { version = "2.5.0", optional = true, features = ["interruptible"] } packet = { path = "./packet" } bytes = "1.5.0" log = "0.4.17" @@ -38,7 +38,7 @@ crossbeam-queue = "0.3.11" anyhow = "1.0.82" dns-parser = "0.8.0" -tokio = { version = "1.37.0", features = ["full"] } +tokio = { version = "1.46.1", features = ["full"] } lz4_flex = { version = "0.11", default-features = false, optional = true } zstd = { version = "0.13.1", optional = true } @@ -54,7 +54,7 @@ futures-util = "0.3.30" [target.'cfg(target_os = "windows")'.dependencies] winreg = "0.55.0" libloading = "0.8.0" -windows-sys = { version = "0.59.0", features = ["Win32_Foundation", +windows-sys = { version = "0.60.2", features = ["Win32_Foundation", "Win32_NetworkManagement", "Win32_NetworkManagement_IpHelper", "Win32_Networking_WinSock", diff --git a/vnt/src/handle/tun_tap/platform.rs b/vnt/src/handle/tun_tap/platform.rs index 5411f44..4cdc5d3 100644 --- a/vnt/src/handle/tun_tap/platform.rs +++ b/vnt/src/handle/tun_tap/platform.rs @@ -13,7 +13,7 @@ use parking_lot::Mutex; use std::collections::HashMap; use std::net::Ipv4Addr; use std::sync::Arc; -use tun_rs::SyncDevice; +use tun_rs::{InterruptEvent, SyncDevice}; pub(crate) fn start_simple( stop_manager: StopManager, @@ -29,10 +29,11 @@ pub(crate) fn start_simple( device_stop: DeviceStop, allow_wire_guard: bool, ) -> anyhow::Result<()> { + let event = Arc::new(InterruptEvent::new()?); let worker = { - let device = device.clone(); + let event = event.clone(); stop_manager.add_listener("tun_device".into(), move || { - if let Err(e) = device.shutdown() { + if let Err(e) = event.trigger() { log::warn!("{:?}", e); } })? @@ -50,6 +51,7 @@ pub(crate) fn start_simple( if let Err(e) = start_simple0( context, device, + event, current_device, ip_route, #[cfg(feature = "ip_proxy")] @@ -72,6 +74,7 @@ pub(crate) fn start_simple( fn start_simple0( context: &ChannelContext, device: Arc, + event: Arc, current_device: Arc>, ip_route: ExternalRoute, #[cfg(feature = "ip_proxy")] ip_proxy_map: Option, @@ -84,7 +87,7 @@ fn start_simple0( let mut buf = [0; BUFFER_SIZE]; let mut extend = [0; BUFFER_SIZE]; loop { - let len = device.recv(&mut buf[12..])? + 12; + let len = device.recv_intr(&mut buf[12..],&event)? + 12; // buf是重复利用的,需要重置头部 buf[..12].fill(0); match crate::handle::tun_tap::tun_handler::handle(