pub async fn write_auth<S>(
stream: &mut S,
username: &str,
password: &str,
) -> Result<(), ProtocolError>where
S: AsyncWrite + Unpin,Expand description
Write auth credentials as raw bytes to a stream.
pproxy format: raw user:pass string bytes.
ยงSecurity
Credentials cross the wire in plaintext with no challenge, so captured
handshakes are replayable. Wrap the control channel in TLS when it leaves
a trusted network; see also ReverseServerConfig::validate, which refuses
unauthenticated non-loopback external binds.
Generic over any async stream so the same framing works over plaintext TCP and TLS-wrapped control channels.