From 187e251142e73c5afe0da956cbfe18a43150aaa5 Mon Sep 17 00:00:00 2001 From: ssrlive <30760636+ssrlive@users.noreply.github.com> Date: Mon, 2 Sep 2024 23:10:15 +0800 Subject: [PATCH] Bump version 0.4.1 --- .github/workflows/rust.yml | 5 ++++- Cargo.toml | 4 ++-- src/desktop_api.rs | 4 ++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 17304a1..8be8418 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -33,7 +33,10 @@ jobs: - name: Build if: ${{ !cancelled() }} - run: cargo build --verbose --tests --all-features + run: | + cargo build --verbose --tests --all-features + cargo clean + cargo build --verbose - name: Abort on error if: ${{ failure() }} diff --git a/Cargo.toml b/Cargo.toml index c597d68..05103b9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tun2proxy" -version = "0.4.0" +version = "0.4.1" edition = "2021" license = "MIT" repository = "https://github.com/blechschmidt/tun2proxy" @@ -34,7 +34,7 @@ thiserror = "1" tokio = { version = "1", features = ["full"] } tokio-util = "0.7" tproxy-config = { version = "6", default-features = false } -tun2 = { version = "2", features = ["async"] } +tun2 = { version = "3", features = ["async"] } udp-stream = { version = "0.0.12", default-features = false } unicase = "2" url = "2" diff --git a/src/desktop_api.rs b/src/desktop_api.rs index edf3d8e..02245ff 100644 --- a/src/desktop_api.rs +++ b/src/desktop_api.rs @@ -6,7 +6,7 @@ use crate::{ }; use std::os::raw::{c_char, c_int}; use tproxy_config::{TproxyArgs, TUN_GATEWAY, TUN_IPV4, TUN_NETMASK}; -use tun2::DEFAULT_MTU as MTU; +use tun2::{AbstractDevice, DEFAULT_MTU as MTU}; static TUN_QUIT: std::sync::Mutex> = std::sync::Mutex::new(None); @@ -124,7 +124,7 @@ pub async fn desktop_run_async(args: Args, shutdown_token: tokio_util::sync::Can let device = tun2::create_as_async(&tun_config)?; - if let Ok(tun_name) = device.as_ref().tun_name() { + if let Ok(tun_name) = device.tun_name() { tproxy_args = tproxy_args.tun_name(&tun_name); }