pub struct Socks4Listener(/* private fields */);
Expand description
A SOCKS4 BIND client.
Implementations§
Source§impl Socks4Listener
impl Socks4Listener
Sourcepub fn bind<T, U>(proxy: T, target: U, userid: &str) -> Result<Socks4Listener>where
T: ToSocketAddrs,
U: ToTargetAddr,
pub fn bind<T, U>(proxy: T, target: U, userid: &str) -> Result<Socks4Listener>where
T: ToSocketAddrs,
U: ToTargetAddr,
Initiates a BIND request to the specified proxy.
The proxy will filter incoming connections based on the value of
target
.
Sourcepub fn proxy_addr(&self) -> Result<SocketAddr>
pub fn proxy_addr(&self) -> Result<SocketAddr>
The address of the proxy-side TCP listener.
This should be forwarded to the remote process, which should open a connection to it.
Sourcepub fn accept(self) -> Result<Socks4Stream>
pub fn accept(self) -> Result<Socks4Stream>
Waits for the remote process to connect to the proxy server.
The value of proxy_addr
should be forwarded to the remote process
before this method is called.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Socks4Listener
impl RefUnwindSafe for Socks4Listener
impl Send for Socks4Listener
impl Sync for Socks4Listener
impl Unpin for Socks4Listener
impl UnwindSafe for Socks4Listener
Blanket Implementations§
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