pub fn forward(
listener: TcpListener,
targets: Vec<SocketAddr>,
limits: Limits,
) -> JoinHandle<()>Expand description
Forwards connections on listener (a loopback port inside the cant’s network namespace) to
the first of targets (this machine’s loopback, the same port) that accepts, one thread per
connection, at most limits.max_tunnels at once. For loopback hosts the user added with
--allow-loopback: Go’s net/http never sends loopback to a proxy, so those connections
must work without one. A connection no target accepts is closed.