totally refine sni inspection mechanism using rustls

This commit is contained in:
Jun Kurihara 2022-07-19 17:39:06 +09:00
commit d7d782499a
No known key found for this signature in database
GPG key ID: 48ADFD173ED22B03
4 changed files with 65 additions and 234 deletions

View file

@ -45,7 +45,7 @@ impl<T> Proxy<T>
where
T: Connect + Clone + Sync + Send + 'static,
{
pub async fn client_serve<I>(
pub(super) fn client_serve<I>(
self,
stream: I,
server: Http<LocalExecutor>,
@ -94,8 +94,7 @@ where
while let Ok((stream, _client_addr)) = tcp_listener.accept().await {
self
.clone()
.client_serve(stream, server.clone(), _client_addr, None)
.await;
.client_serve(stream, server.clone(), _client_addr, None);
}
Ok(()) as Result<()>
};