pub trait SocksBind: Send + Sync {
// Required methods
fn bind<'life0, 'life1, 'async_trait>(
&'life0 mut self,
target_addr: &'life1 str,
target_port: u16,
) -> Pin<Box<dyn Future<Output = Result<(), SocksError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn accept<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<SocksTcpStream, SocksError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_proxy_bind_addr(&mut self) -> Option<SocketAddr>;
}Expand description
A trait for binding to a target address through a SOCKS proxy.
Required Methods§
Sourcefn bind<'life0, 'life1, 'async_trait>(
&'life0 mut self,
target_addr: &'life1 str,
target_port: u16,
) -> Pin<Box<dyn Future<Output = Result<(), SocksError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn bind<'life0, 'life1, 'async_trait>(
&'life0 mut self,
target_addr: &'life1 str,
target_port: u16,
) -> Pin<Box<dyn Future<Output = Result<(), SocksError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Binds to the specified target address and port through a SOCKS proxy. If the client is not in possession of DST.ADDR and DST.PORT at the time the UDP ASSOCIATE request is create, it MUST use a port number and address of all zeros.
Sourcefn accept<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<SocksTcpStream, SocksError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn accept<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<SocksTcpStream, SocksError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Accepts a connection from the SOCKS proxy.
Sourcefn get_proxy_bind_addr(&mut self) -> Option<SocketAddr>
fn get_proxy_bind_addr(&mut self) -> Option<SocketAddr>
Gets the bound address from the SOCKS proxy to notify remote sender.