[][src]Struct socks::Socks5Stream

pub struct Socks5Stream { /* fields omitted */ }

A SOCKS5 client.

Implementations

impl Socks5Stream[src]

pub fn connect<T, U>(proxy: T, target: U) -> Result<Socks5Stream> where
    T: ToSocketAddrs,
    U: ToTargetAddr
[src]

Connects to a target server through a SOCKS5 proxy.

pub fn connect_with_password<T, U>(
    proxy: T,
    target: U,
    username: &str,
    password: &str
) -> Result<Socks5Stream> where
    T: ToSocketAddrs,
    U: ToTargetAddr
[src]

Connects to a target server through a SOCKS5 proxy using given username and password.

pub fn proxy_addr(&self) -> &TargetAddr[src]

Returns the proxy-side address of the connection between the proxy and target server.

pub fn get_ref(&self) -> &TcpStream[src]

Returns a shared reference to the inner TcpStream.

pub fn get_mut(&mut self) -> &mut TcpStream[src]

Returns a mutable reference to the inner TcpStream.

pub fn into_inner(self) -> TcpStream[src]

Consumes the Socks5Stream, returning the inner TcpStream.

Trait Implementations

impl Debug for Socks5Stream[src]

impl Read for Socks5Stream[src]

impl<'a> Read for &'a Socks5Stream[src]

impl Write for Socks5Stream[src]

impl<'a> Write for &'a Socks5Stream[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<R> ReadBytesExt for R where
    R: Read + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<W> WriteBytesExt for W where
    W: Write + ?Sized
[src]