From df2b95ce51162b6c03b588850c5e3ffb16d661d2 Mon Sep 17 00:00:00 2001 From: Anmol Bhatia <34206963+anmolbhatia05@users.noreply.github.com> Date: Sat, 30 Sep 2023 21:43:39 +0200 Subject: [PATCH] Update socksx/examples/client.rs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Tim Müller --- socksx/examples/client.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/socksx/examples/client.rs b/socksx/examples/client.rs index b4c7b3e..848e33b 100644 --- a/socksx/examples/client.rs +++ b/socksx/examples/client.rs @@ -59,7 +59,14 @@ async fn main() -> Result<()> { } } -/// Connects to a destination using SOCKS5 protocol. +/// Connects to a destination through a proxy using SOCKS5 protocol, then sends an example message through the network tunnel. +/// +/// # Arguments +/// - `proxy_addr`: The address of the SOCKS5 proxy through which the traffic will be tunnelled. +/// - `dest_addr`: The address to which the traffic should be sent after the proxy. +/// +/// # Errors +/// This function can error if we failed to connect to the given proxy or failed to send it an example message. async fn connect_v5( proxy_addr: String, dest_addr: String,