pub struct Socks5Listener {
pub tunnel_id: u32,
/* private fields */
}Expand description
A minimal SOCKS5 listener that only supports the CONNECT command.
Fields§
§tunnel_id: u32Implementations§
Source§impl Socks5Listener
impl Socks5Listener
pub async fn bind(addr: &str, tunnel_id: u32) -> Result<Self>
Sourcepub async fn accept_raw(&self) -> Result<TcpStream>
pub async fn accept_raw(&self) -> Result<TcpStream>
Accept a raw TCP connection (no handshake — caller handles it per-connection).
Sourcepub async fn accept(&self) -> Result<(TcpStream, Socks5Request)>
pub async fn accept(&self) -> Result<(TcpStream, Socks5Request)>
Accept one SOCKS5 connection, perform handshake, return the stream and target.
Auto Trait Implementations§
impl !Freeze for Socks5Listener
impl RefUnwindSafe for Socks5Listener
impl Send for Socks5Listener
impl Sync for Socks5Listener
impl Unpin for Socks5Listener
impl UnsafeUnpin for Socks5Listener
impl UnwindSafe for Socks5Listener
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more