Skip to content

Commit

Permalink
more verbose logs
Browse files Browse the repository at this point in the history
Signed-off-by: Uncle Jack <[email protected]>
  • Loading branch information
unclejacki committed Jul 6, 2024
1 parent c7226d9 commit 6b3461b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ impl Proxy {
{
return Err(Error::new(
ErrorKind::Other,
"[blocked] source ip is not in the whitelist",
format!("[blocked] source {client_addr} is not in the whitelist"),
));
}

Expand Down Expand Up @@ -108,7 +108,11 @@ async fn handler(config: Arc<Config>, header: Header, stream: TcpStream) {
.iter()
.any(|cidr| cidr.contains(&header.addr))
{
log::info!("[blocked] destination ip is not in the whitelist");
log::error!(
"[blocked] destination {}:{} is not in the whitelist",
header.addr,
header.port,
);
return;
}
tcp_handler(stream, header.addr, header.port).await
Expand Down

0 comments on commit 6b3461b

Please sign in to comment.