pub struct Socks5Datagram { /* private fields */ }
Expand description

A SOCKS5 UDP client.

Implementations

Creates a UDP socket bound to the specified address which will have its traffic routed through the specified proxy.

Creates a UDP socket bound to the specified address which will have its traffic routed through the specified proxy. The given username and password is used to authenticate to the SOCKS proxy.

Like UdpSocket::send_to.

Note

The SOCKS protocol inserts a header at the beginning of the message. The header will be 10 bytes for an IPv4 address, 22 bytes for an IPv6 address, and 7 bytes plus the length of the domain for a domain address.

Like UdpSocket::recv_from.

Returns the address of the proxy-side UDP socket through which all messages will be routed.

Returns a shared reference to the inner socket.

Returns a mutable reference to the inner socket.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.