pub async fn recv_with_ctrl(
        &self,
        recv_buf: &mut [u8],
    ) -> ProxySocketResult<(usize, Address, usize, Option<UdpSocketControlData>)> {
        let recv_n = match self.recv_timeout {
            None => self.io.recv(recv_buf).await?,
            Some(d) => match time::timeout(d, self.io.recv(recv_buf)).await {
                Ok(Ok(l)) => l,
                Ok(Err(err)) => return Err(err.into()),
                Err(..) => return Err(io::Error::from(ErrorKind::TimedOut).into()),
            },
        };

        let (n, addr, control) = match self.decrypt_recv_buffer(&mut recv_buf[..recv_n], self.user_manager.as_deref()) {
            Ok(x) => x,
            Err(err) => return Err(ProxySocketError::ProtocolError(err)),
        };

        trace!(
            "UDP server client receive from {}, control: {:?}, packet length {} bytes, payload length {} bytes",
            addr, control, recv_n, n
        );

        Ok((n, addr, recv_n, control))
    }
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.
crates/shadowsocks/src/relay/udprelay/proxy_socket.rs