Skip to content

Commit

Permalink
chore(proxy): validated tls connection logs
Browse files Browse the repository at this point in the history
  • Loading branch information
paulobressan committed Feb 27, 2024
1 parent e41cced commit 1c79691
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion proxy/src/proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,12 @@ pub async fn start(rw_state: Arc<RwLock<State>>) {
let state = rw_state.read().await.clone();

tokio::spawn(async move {
let mut tls_stream = tls_acceptor.accept(inbound).await.unwrap();
let tls_stream_result = tls_acceptor.accept(inbound).await;
if tls_stream_result.is_err() {
return;
}
let mut tls_stream = tls_stream_result.unwrap();

let (_, server_connection) = tls_stream.get_ref();

let hostname = server_connection.server_name();
Expand Down

0 comments on commit 1c79691

Please sign in to comment.