From 1d914b8895160066a65f90951738e4005edc7d23 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 04:20:29 +0000 Subject: [PATCH 1/5] Update tor-basic-utils requirement from 0.22.0 to 0.23.0 Updates the requirements on tor-basic-utils to permit the latest version. --- updated-dependencies: - dependency-name: tor-basic-utils dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- crates/obfs4/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/obfs4/Cargo.toml b/crates/obfs4/Cargo.toml index 324b6ba..7725532 100644 --- a/crates/obfs4/Cargo.toml +++ b/crates/obfs4/Cargo.toml @@ -80,7 +80,7 @@ filetime = {version="0.2.25", optional=true} [dev-dependencies] tracing-subscriber = "0.3.18" hex-literal = "0.4.1" -tor-basic-utils = "0.22.0" +tor-basic-utils = "0.23.0" # benches # criterion = "0.5" From c0e4df4749e6d0cca585a1b32ebcb38708be6828 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 04:22:07 +0000 Subject: [PATCH 2/5] Update safelog requirement from 0.3.5 to 0.4.0 Updates the requirements on safelog to permit the latest version. --- updated-dependencies: - dependency-name: safelog dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- crates/lyrebird/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/lyrebird/Cargo.toml b/crates/lyrebird/Cargo.toml index 5e956fe..c9a7ef8 100644 --- a/crates/lyrebird/Cargo.toml +++ b/crates/lyrebird/Cargo.toml @@ -38,7 +38,7 @@ anyhow = "1.0" clap = { version = "4.4", features = ["derive"]} fast-socks5 = "0.9.1" futures = "0.3.29" -safelog = "0.3.5" +safelog = "0.4.0" thiserror = "1.0.56" tokio = { version = "1.34", features = ["io-util", "net", "macros", "sync", "signal"] } tokio-util = "0.7.10" From b1eab948a9c0650141211bca823a457f32935297 Mon Sep 17 00:00:00 2001 From: jmwample <8297368+jmwample@users.noreply.github.com> Date: Sat, 12 Oct 2024 16:25:35 -0600 Subject: [PATCH 3/5] combined depandabot updates oct. 2024 --- crates/obfs4/Cargo.toml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/obfs4/Cargo.toml b/crates/obfs4/Cargo.toml index 7725532..85cf8d0 100644 --- a/crates/obfs4/Cargo.toml +++ b/crates/obfs4/Cargo.toml @@ -53,10 +53,10 @@ tokio-util = { version = "0.7.10", features = ["codec", "io"]} bytes = "1.5.0" ## ntor_arti -tor-cell = "0.22.0" -tor-llcrypto = "0.22.0" -tor-error = "0.22.0" -tor-bytes = "0.22.0" +tor-cell = "0.23.0" +tor-llcrypto = "0.23.0" +tor-error = "0.23.0" +tor-bytes = "0.23.0" cipher = "0.4.4" zeroize = "1.7.0" thiserror = "1.0.56" From d69fbe921c383e0597327049830bcc4a2144a202 Mon Sep 17 00:00:00 2001 From: jmwample <8297368+jmwample@users.noreply.github.com> Date: Sat, 12 Oct 2024 17:14:44 -0600 Subject: [PATCH 4/5] maybe fix ci --- .github/workflows/rust.yml | 2 +- crates/obfs4/src/handshake/handshake_server.rs | 11 ++++------- crates/obfs4/src/test_utils/fake_prng.rs | 2 +- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 431f6d8..83574b3 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -104,7 +104,7 @@ jobs: - run: cargo update -Z minimal-versions # Now check that `cargo build` works with respect to the oldest possible # deps and the stated MSRV. 1.70 should work for all - - uses: dtolnay/rust-toolchain@1.75.0 + - uses: dtolnay/rust-toolchain@1.77.0 - run: cargo test --workspace --all-targets --all-features # Also make sure the AVX2 build works - run: cargo build --target x86_64-unknown-linux-gnu diff --git a/crates/obfs4/src/handshake/handshake_server.rs b/crates/obfs4/src/handshake/handshake_server.rs index d75222b..6de594a 100644 --- a/crates/obfs4/src/handshake/handshake_server.rs +++ b/crates/obfs4/src/handshake/handshake_server.rs @@ -20,21 +20,18 @@ pub(crate) struct HandshakeMaterials { pub(crate) len_seed: [u8; SEED_LENGTH], } -impl<'a> HandshakeMaterials { +impl HandshakeMaterials { pub fn get_hmac(&self) -> HmacSha256 { let mut key = self.identity_keys.pk.pk.as_bytes().to_vec(); key.append(&mut self.identity_keys.pk.id.as_bytes().to_vec()); HmacSha256::new_from_slice(&key[..]).unwrap() } - pub fn new<'b>( - identity_keys: &'b Obfs4NtorSecretKey, + pub fn new( + identity_keys: &Obfs4NtorSecretKey, session_id: String, len_seed: [u8; SEED_LENGTH], - ) -> Self - where - 'b: 'a, - { + ) -> Self { HandshakeMaterials { identity_keys: identity_keys.clone(), session_id, diff --git a/crates/obfs4/src/test_utils/fake_prng.rs b/crates/obfs4/src/test_utils/fake_prng.rs index 916e889..fecdb70 100644 --- a/crates/obfs4/src/test_utils/fake_prng.rs +++ b/crates/obfs4/src/test_utils/fake_prng.rs @@ -6,7 +6,7 @@ impl<'a> FakePRNG<'a> { Self { bytes } } } -impl<'a> rand_core::RngCore for FakePRNG<'a> { +impl rand_core::RngCore for FakePRNG<'_> { fn next_u32(&mut self) -> u32 { rand_core::impls::next_u32_via_fill(self) } From 1e7f344ebd1421ed52825277b08cc9142e79c01a Mon Sep 17 00:00:00 2001 From: jmwample <8297368+jmwample@users.noreply.github.com> Date: Sat, 12 Oct 2024 21:07:29 -0600 Subject: [PATCH 5/5] had to change msrv --- .github/workflows/rust.yml | 2 +- README.md | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 83574b3..e419fc0 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -106,7 +106,7 @@ jobs: # deps and the stated MSRV. 1.70 should work for all - uses: dtolnay/rust-toolchain@1.77.0 - run: cargo test --workspace --all-targets --all-features - # Also make sure the AVX2 build works + # Also make sure the build works - run: cargo build --target x86_64-unknown-linux-gnu # The PTRS crate has fewer dependencies and a lower msrv - uses: dtolnay/rust-toolchain@1.70 diff --git a/README.md b/README.md index 6ac04cb..3416904 100644 --- a/README.md +++ b/README.md @@ -21,9 +21,9 @@ lyrebird binary, and Pluggable Transports in Rust (PTRS) library. | Crate | Description | Crates.io | Docs | MSRV | -------------------------------------------|----------------|-----------|------|------| | [`ptrs`](./crates/ptrs) | A library supporting implementation and integration of Pluggable Transport protocols. | [![](https://img.shields.io/crates/v/ptrs.svg)](https://crates.io/crates/ptrs) | [![](https://img.shields.io/docsrs/ptrs)](https://docs.rs/ptrs) | 1.70 | -| [`lyrebird`](./crates/lyrebird) | Implementation of the `Lyrebird` Tor bridge and a forward proxy compatible with `ptrs`. | [![](https://img.shields.io/crates/v/___lyrebird.svg)](https://crates.io/crates/___lyrebird) | [![](https://docs.rs/___lyrebird/badge.svg)](https://docs.rs/___lyrebird) | 1.75 | -| [`obfs4`](./crates/obfs4) | An implementation of obfs4 pluggable transport library in pure rust. | [![](https://img.shields.io/crates/v/obfs4.svg)](https://crates.io/crates/obfs4) | [![](https://docs.rs/obfs4/badge.svg)](https://docs.rs/obfs4) | 1.75 | -| [`o5`](./crates/o5) | An implementation of o5 pluggable transport library in pure rust. | [![](https://img.shields.io/crates/v/o5.svg)](https://crates.io/crates/o5) | [![](https://docs.rs/o5/badge.svg)](https://docs.rs/o5) | 1.75 | +| [`lyrebird`](./crates/lyrebird) | Implementation of the `Lyrebird` Tor bridge and a forward proxy compatible with `ptrs`. | [![](https://img.shields.io/crates/v/___lyrebird.svg)](https://crates.io/crates/___lyrebird) | [![](https://docs.rs/___lyrebird/badge.svg)](https://docs.rs/___lyrebird) | 1.77 | +| [`obfs4`](./crates/obfs4) | An implementation of obfs4 pluggable transport library in pure rust. | [![](https://img.shields.io/crates/v/obfs4.svg)](https://crates.io/crates/obfs4) | [![](https://docs.rs/obfs4/badge.svg)](https://docs.rs/obfs4) | 1.77 | +| [`o5`](./crates/o5) | An implementation of o5 pluggable transport library in pure rust. | [![](https://img.shields.io/crates/v/o5.svg)](https://crates.io/crates/o5) | [![](https://docs.rs/o5/badge.svg)](https://docs.rs/o5) | 1.77 | ## MSRV