Skip to content

Commit

Permalink
fwd goodness, needs server pt wrap same as lyrebird
Browse files Browse the repository at this point in the history
  • Loading branch information
jmwample committed Mar 23, 2024
1 parent 286bed6 commit 634369f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions crates/obfs4/src/bin/fwd/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,10 @@ where
);
loop {
tokio::select! {
_ = cancel_token.cancelled() => info!("{pt_name} received shutdown signal"),
_ = cancel_token.cancelled() => {
info!("{pt_name} received shutdown signal");
break
}
res = listener.accept() => {
let (conn, client_addr) = match res {
Err(e) => {
Expand Down Expand Up @@ -294,7 +297,7 @@ where
Err(e) => {
warn!(
address = sensitive(client_addr).to_string(),
"handshake failed: {e:#?}"
"handshake failed: {e}"
);
return Err(obfs4::Error::from(e.to_string())).context("handshake failed");
}
Expand All @@ -304,7 +307,7 @@ where
if let Err(e) = copy_bidirectional(&mut conn, &mut pt_conn).await {
warn!(
addres = sensitive(client_addr).to_string(),
"tunnel closed with error: {e:#?}"
"tunnel closed with error: {e}"
);
}
Ok(())
Expand Down

0 comments on commit 634369f

Please sign in to comment.