pub async fn connect_with_opts(
        context: SharedContext,
        svr_cfg: &ServerConfig,
        opts: &ConnectOpts,
    ) -> ProxySocketResult<Self> {
        // Note: Plugins doesn't support UDP relay

        let socket = ShadowUdpSocket::connect_server_with_opts(&context, svr_cfg.udp_external_addr(), opts).await?;

        trace!(
            "connected udp remote {} (outbound: {}) with {:?}",
            svr_cfg.addr(),
            svr_cfg.udp_external_addr(),
            opts
        );

        Ok(Self::from_socket(
            UdpSocketType::Client,
            context,
            svr_cfg,
            socket,
        ))
    }
Create a client to communicate with Shadowsocks' UDP server (outbound)
crates/shadowsocks/src/relay/udprelay/proxy_socket.rs