Skip to main content

write_auth

Function write_auth 

Source
pub async fn write_auth(
    stream: &mut TcpStream,
    username: &str,
    password: &str,
) -> Result<(), ProtocolError>
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.