pub struct Socks5Stream { /* private fields */ }Implementations§
Source§impl Socks5Stream
impl Socks5Stream
Sourcepub async fn connect<T, U>(
proxy: T,
target: U,
auth: &Authentication,
) -> Result<Socks5Stream>where
T: ToSocketAddrs,
U: ToTargetAddr,
pub async fn connect<T, U>(
proxy: T,
target: U,
auth: &Authentication,
) -> Result<Socks5Stream>where
T: ToSocketAddrs,
U: ToTargetAddr,
Connects to a target server through a SOCKS5 proxy.
Sourcepub async fn connect_with_password<T, U>(
proxy: T,
target: U,
username: &str,
password: &str,
) -> Result<Socks5Stream>where
T: ToSocketAddrs,
U: ToTargetAddr,
pub async fn connect_with_password<T, U>(
proxy: T,
target: U,
username: &str,
password: &str,
) -> Result<Socks5Stream>where
T: ToSocketAddrs,
U: ToTargetAddr,
Connects to a target server through a SOCKS5 proxy using given username and password.
pub async fn connect_raw<T, U>(
command: u8,
proxy: T,
target: U,
auth: &Authentication,
) -> Result<Socks5Stream>where
T: ToSocketAddrs,
U: ToTargetAddr,
Sourcepub fn proxy_addr(&self) -> &TargetAddr
pub fn proxy_addr(&self) -> &TargetAddr
Returns the proxy-side address of the connection between the proxy and target server.
Sourcepub fn get_mut(&mut self) -> &mut TcpStream
pub fn get_mut(&mut self) -> &mut TcpStream
Returns a mutable reference to the inner TcpStream.
Sourcepub fn into_inner(self) -> TcpStream
pub fn into_inner(self) -> TcpStream
Consumes the Socks5Stream, returning the inner TcpStream.
Auto Trait Implementations§
impl !Freeze for Socks5Stream
impl !RefUnwindSafe for Socks5Stream
impl Send for Socks5Stream
impl Sync for Socks5Stream
impl Unpin for Socks5Stream
impl !UnwindSafe for Socks5Stream
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more