Function brane_prx::redirect::path_server

source ·
pub async fn path_server(
    node_config_path: PathBuf,
    listener: TcpListener,
    client: RemoteClient,
    socket_addr: SocketAddr,
    address: Url,
    tls: Option<(ServerName, NewPathRequestTlsOptions)>,
) -> Never
Expand description

Serves the proxying service on the given path, to the given address.

§Arguments

  • node_config_path: Path to the node.yml file where we pull the certificates location from.
  • listener: The TcpListener with which we serve.
  • client: The proxied SOCKS6-client / unproxied TcpClient to connect to remote hosts with.
  • socket_addr: The SocketAddress on which to serve.
  • address: The address to redirect the traffic to.
  • tls: If given, adds TLS encryption to the remote host with the given address.

§Returns

Never, ideally.

§Errors

This function does not error directly, but instead write errors to stderr (using the log crate) and then returns.