Struct socks::Socks5Stream
[−]
[src]
pub struct Socks5Stream {
// some fields omitted
}A SOCKS5 client.
Methods
impl Socks5Stream
fn connect<T, U>(proxy: T, target: U) -> Result<Socks5Stream> where T: ToSocketAddrs, U: ToTargetAddr
Connects to a target server through a SOCKS5 proxy.
fn proxy_addr(&self) -> SocketAddr
Returns the proxy-side address of the connection between the proxy and target server.
fn get_ref(&self) -> &TcpStream
Returns a shared reference to the inner TcpStream.
fn get_mut(&mut self) -> &mut TcpStream
Returns a mutable reference to the inner TcpStream.
fn into_inner(self) -> TcpStream
Consumes the Socks4Stream, returning the inner TcpStream.