[][src]Struct socks::Socks5Listener

pub struct Socks5Listener(_);

A SOCKS5 BIND client.

Implementations

impl Socks5Listener[src]

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

Initiates a BIND request to the specified proxy.

The proxy will filter incoming connections based on the value of target.

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

Initiates a BIND request to the specified proxy using given username and password.

The proxy will filter incoming connections based on the value of target.

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

The address of the proxy-side TCP listener.

This should be forwarded to the remote process, which should open a connection to it.

pub fn accept(self) -> Result<Socks5Stream>[src]

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

impl Debug for Socks5Listener[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<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.