Skip to main content

encode_addr

Function encode_addr 

Source
pub fn encode_addr(out: &mut Vec<u8>, host: &str, port: u16)
Expand description

Appends a SOCKS5 address (ATYP | ADDR | PORT) to out. IP-literal hosts use ATYP v4/v6; everything else is sent as a domain name (ATYP 0x03) so the proxy resolves it — avoiding fake-IP leaks.