pub trait SocksConnect: Send + Sync {
// Required methods
fn connect<'life0, 'life1, 'async_trait>(
&'life0 mut self,
target_addr: &'life1 str,
target_port: u16,
) -> Pin<Box<dyn Future<Output = Result<SocksTcpStream, SocksError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn connect_hostname<'life0, 'life1, 'async_trait>(
&'life0 mut self,
target_addr: &'life1 str,
target_port: u16,
) -> Pin<Box<dyn Future<Output = Result<SocksTcpStream, SocksError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
A trait for connecting to a target address through a SOCKS proxy.
Required Methods§
Sourcefn connect<'life0, 'life1, 'async_trait>(
&'life0 mut self,
target_addr: &'life1 str,
target_port: u16,
) -> Pin<Box<dyn Future<Output = Result<SocksTcpStream, SocksError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn connect<'life0, 'life1, 'async_trait>(
&'life0 mut self,
target_addr: &'life1 str,
target_port: u16,
) -> Pin<Box<dyn Future<Output = Result<SocksTcpStream, SocksError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Connects to the specified target address and port through a SOCKS proxy.
Sourcefn connect_hostname<'life0, 'life1, 'async_trait>(
&'life0 mut self,
target_addr: &'life1 str,
target_port: u16,
) -> Pin<Box<dyn Future<Output = Result<SocksTcpStream, SocksError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn connect_hostname<'life0, 'life1, 'async_trait>(
&'life0 mut self,
target_addr: &'life1 str,
target_port: u16,
) -> Pin<Box<dyn Future<Output = Result<SocksTcpStream, SocksError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Connects to the specified target hostname and port through a SOCKS proxy.