From a7bf99bbdd27aa7f8f148da154ade9f0e66831ef Mon Sep 17 00:00:00 2001 From: Jialun Cai Date: Thu, 27 Nov 2025 10:45:59 +1100 Subject: [PATCH 1/2] Bump release --- Cargo.toml | 9 ++++++--- README.md | 6 +++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 96173af..4de0266 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "wiretun" description = "WireGuard Library" -version = "0.5.0" -authors = ["zarvd "] +version = "0.5.1" +authors = ["Jialun Cai "] keywords = ["wireguard", "networking"] repository = "https://github.com/clnv/wiretun" homepage = "https://github.com/clnv/wiretun" @@ -30,7 +30,10 @@ async-trait = "0.1" tokio = { version = "1.37", features = ["full"] } tokio-util = "0.7" chacha20poly1305 = "0.10" -x25519-dalek = { version = "2.0", features = ["reusable_secrets", "static_secrets"] } +x25519-dalek = { version = "2.0", features = [ + "reusable_secrets", + "static_secrets", +] } blake2 = "0.10" hmac = "0.12" ip_network = "0.4" diff --git a/README.md b/README.md index 19ddd38..cc94217 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # WireTun -[github](https://github.com/zarvd/wiretun) +[github](https://github.com/clnv/wiretun) [crates.io](https://crates.io/crates/wiretun) [docs.rs](https://docs.rs/wiretun) -[build status](https://github.com/zarvd/wiretun/actions?query%3Amaster) -[dependency status](https://deps.rs/repo/github/zarvd/wiretun) +[build status](https://github.com/clnv/wiretun/actions?query%3Amaster) +[dependency status](https://deps.rs/repo/github/clnv/wiretun) This library provides a cross-platform, asynchronous (with [Tokio](https://tokio.rs/)) [WireGuard](https://www.wireguard.com/) implementation. From 73433681e801f10b301b88742a221121273610ae Mon Sep 17 00:00:00 2001 From: Jialun Cai Date: Thu, 27 Nov 2025 10:50:00 +1100 Subject: [PATCH 2/2] Fix lint issue --- src/noise/handshake/cookie.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/noise/handshake/cookie.rs b/src/noise/handshake/cookie.rs index f5e65e3..7600ccc 100644 --- a/src/noise/handshake/cookie.rs +++ b/src/noise/handshake/cookie.rs @@ -104,10 +104,10 @@ impl Cookie { // Refresh the secret if it's expired. fn refresh_secret(&self) -> [u8; 32] { let mut secret = self.secret.lock().unwrap(); - if let Some(v) = secret.as_ref() { - if v.1.elapsed() < COOKIE_LIFETIME { - return v.0; - } + if let Some(v) = secret.as_ref() + && v.1.elapsed() < COOKIE_LIFETIME + { + return v.0; } let mut rv = [0u8; 32];