refactor: do not wrap shadowsocks::ProxyClientStream

Updated `shadowsocks` implements `Debug` for the type,
so there is no need to wrap it.
This commit is contained in:
link2xt
2024-09-18 11:09:24 +00:00
parent bfef129dbf
commit 040ac0ffe3
4 changed files with 7 additions and 70 deletions

View File

@@ -1,4 +1,3 @@
use crate::net::proxy::ShadowsocksStream;
use async_native_tls::TlsStream;
use fast_socks5::client::Socks5Stream;
use std::pin::Pin;
@@ -45,9 +44,9 @@ impl<T: SessionStream> SessionStream for Socks5Stream<T> {
self.get_socket_mut().set_read_timeout(timeout)
}
}
impl<T: SessionStream> SessionStream for ShadowsocksStream<T> {
impl<T: SessionStream> SessionStream for shadowsocks::ProxyClientStream<T> {
fn set_read_timeout(&mut self, timeout: Option<Duration>) {
self.stream.get_mut().set_read_timeout(timeout)
self.get_mut().set_read_timeout(timeout)
}
}