pub async fn forward(
ctx: CommandContext,
forward_args: TunnelForwardArgs,
) -> Result<i32, AnyError>
Expand description
Internal command used by port forwarding. It reads requests for forwarded ports on lines from stdin, as JSON. It uses singleton logic as well (though on a different tunnel than the main one used for the control server) so that all forward requests on a single machine go through a single hosted tunnel process. Without singleton logic, requests could get routed to processes that aren’t forwarding a given port and then fail.