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

UDP client for communicating with ShadowSocks’ server

Implementations

Create a client to communicate with Shadowsocks’ UDP server (outbound)

Create a client to communicate with Shadowsocks’ UDP server (outbound)

Create a ProxySocket from a UdpSocket

Create a ProxySocket binding to a specific address (inbound)

Create a ProxySocket binding to a specific address (inbound)

Send a UDP packet to addr through proxy

Send a UDP packet to target from proxy

Receive packet from Shadowsocks’ UDP server

This function will use recv_buf to store intermediate data, so it has to be big enough to store the whole shadowsocks’ packet

It is recommended to allocate a buffer to have at least 65536 bytes.

Receive packet from Shadowsocks’ UDP server

This function will use recv_buf to store intermediate data, so it has to be big enough to store the whole shadowsocks’ packet

It is recommended to allocate a buffer to have at least 65536 bytes.

Get local addr of socket

Set send timeout, None will clear timeout

Set recv timeout, None will clear timeout

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.

Should always be Self

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.