diff --git a/crates/obfs4/src/common/skip.rs b/crates/obfs4/src/common/skip.rs index 09565f7..a2538ea 100644 --- a/crates/obfs4/src/common/skip.rs +++ b/crates/obfs4/src/common/skip.rs @@ -47,7 +47,7 @@ mod test { let discard_fut = discard(s, d); tokio::spawn(async move { - const MSG: &'static str = "abcdefghijklmnopqrstuvwxyz"; + const MSG: &str = "abcdefghijklmnopqrstuvwxyz"; loop { if let Err(e) = c.write(MSG.as_bytes()).await { assert!(Instant::now() > expected_end); diff --git a/crates/obfs4/src/obfs4/proto.rs b/crates/obfs4/src/obfs4/proto.rs index be8b0fb..a6e3501 100644 --- a/crates/obfs4/src/obfs4/proto.rs +++ b/crates/obfs4/src/obfs4/proto.rs @@ -3,11 +3,7 @@ use crate::{ drbg, probdist::{self, WeightedDist}, }, - obfs4::{ - constants::*, - framing::{self, MessageTypes}, - sessions::Session, - }, + obfs4::{constants::*, framing, sessions::Session}, Result, }; @@ -151,6 +147,7 @@ where } } + /*// TODO Apply pad_burst logic and IAT policy to packet assembly (probably as part of AsyncRead / AsyncWrite impl) /// Attempts to pad a burst of data so that the last packet is of the length /// `to_pad_to`. This can involve creating multiple packets, making this /// slightly complex. @@ -190,7 +187,7 @@ where } else { Ok(()) } - } + } */ } impl AsyncWrite for O4Stream diff --git a/crates/ptrs/src/lib.rs b/crates/ptrs/src/lib.rs index c1e33f0..7abd39f 100644 --- a/crates/ptrs/src/lib.rs +++ b/crates/ptrs/src/lib.rs @@ -49,12 +49,12 @@ pub mod client { /// the client / server traits for creating connections / pluggable transports. /// this is still in a TODO state. pub trait ConnectExt: C1 { - fn connect_with_deadline<'a>( - &'a mut self, + fn connect_with_deadline( + &mut self, deadline: Instant, ) -> Result; - fn connect_with_timeout<'a>( - &'a mut self, + fn connect_with_timeout( + &mut self, timeout: Duration, ) -> Result; } @@ -126,7 +126,7 @@ pub mod server { // | +++++++++ // // - impl<'a, RW: Send + 'static> T1 for Passthrough { + impl T1 for Passthrough { type OutRW = RW; type OutErr = std::io::Error;