Skip to main content

connect_tcp

Function connect_tcp 

Source
pub fn connect_tcp(
    host: &str,
    port: u16,
    timeout: Duration,
) -> Result<TcpStream>
Expand description

Connect a plain TCP stream with connect + read/write timeouts. Intentionally unguarded, and resolves the name itself — for operator-configured endpoints only. A model/agent/peer-supplied URL belongs on crate::ssrf::connect_vetted: composing ssrf::guard_host around this function resolves twice and is the DNS-rebinding hole, not a fix for it.