pub async fn connect(
stream: BoxStream,
target: &Target,
username: Option<&str>,
password: Option<&str>,
) -> Result<BoxStream>Expand description
Perform a SOCKS5 CONNECT handshake on an already-connected stream.
Supports:
- No-auth (method 0x00)
- Username/password auth (method 0x02, RFC 1929)
- IPv4, IPv6, and hostname targets
§Errors
Returns an error if the handshake fails, auth is rejected, or the proxy returns a non-success reply.