pub struct PacketCipher { /* private fields */ }
Expand description
An AEAD encrypted UDP packet has the following structure
[salt][encrypted payload][tag]
Implementations§
Source§impl PacketCipher
impl PacketCipher
Source§impl PacketCipher
for udp proxy
impl PacketCipher
for udp proxy
Sourcepub async fn send_to<A: ToSocketAddrs>(
&self,
socket: &UdpSocket,
buf: &[u8],
target: A,
socks5_address: SocketAddr,
) -> Result<usize, Error>
pub async fn send_to<A: ToSocketAddrs>( &self, socket: &UdpSocket, buf: &[u8], target: A, socks5_address: SocketAddr, ) -> Result<usize, Error>
follow shadowsocks protocol send data(socks5_address,buf) to target addr
pub async fn recv_from( &self, socket: &UdpSocket, buf: &mut [u8], ) -> Result<(usize, SocketAddr, Address), Error>
Auto Trait Implementations§
impl !Freeze for PacketCipher
impl RefUnwindSafe for PacketCipher
impl Send for PacketCipher
impl Sync for PacketCipher
impl Unpin for PacketCipher
impl UnwindSafe for PacketCipher
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