add error logging to the connecting stage of the proxies

This commit is contained in:
DJMrTV 2025-06-30 10:53:10 +02:00
commit f12904909a
2 changed files with 18 additions and 9 deletions

View file

@ -107,10 +107,13 @@ async fn main() {
return;
}
let Ok(mut stream)
= tls_connect_to(&dest).await else {
error!("failed to connect");
return;
let mut stream
= match tls_connect_to(&dest).await {
Ok(v) => v,
Err(e) => {
error!("unable to connect: {}", e);
return;
}
};
if let Err(e) = stream.send_buffer(&ConnectionInitData{