Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
VendettaReborn committed Apr 3, 2024
1 parent f3b15b0 commit 1b46a41
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
7 changes: 6 additions & 1 deletion clash_lib/src/proxy/shadowsocks/shadow_tls/connector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,12 @@ impl Connector {
tls.get_mut().0.fake_request = true;
fake_request(tls).await?;

return Err(io::Error::new(io::ErrorKind::Other, format!("V3 strict enabled: traffic hijacked or TLS1.3 is not supported, fake request")));
return Err(io::Error::new(
io::ErrorKind::Other,
format!(
"V3 strict enabled: traffic hijacked or TLS1.3 is not supported, fake request"
),
));
}

let (server_random, hmac_nop) = match maybe_server_random_and_hamc {
Expand Down
2 changes: 1 addition & 1 deletion clash_lib/src/proxy/shadowsocks/shadow_tls/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ mod connector;
mod stream;
mod utils;

pub use connector::Connector;
use utils::prelude;
pub use connector::Connector;
3 changes: 1 addition & 2 deletions clash_lib/src/proxy/shadowsocks/shadow_tls/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -441,8 +441,7 @@ impl<S: AsyncWrite + Unpin> AsyncWrite for VerifiedStream<S> {
};

this.write_buf.put_slice(&header_body);
this.write_state =
WriteState::FlushingData(buf.len(), header_body.len(), 0);
this.write_state = WriteState::FlushingData(buf.len(), header_body.len(), 0);
}
WriteState::FlushingData(consume, total, written) => {
let nw = ready!(tokio_util::io::poll_write_buf(
Expand Down

0 comments on commit 1b46a41

Please sign in to comment.