Skip to main content

run

Function run 

Source
pub async fn run(state: Arc<AppState>) -> Result<(), ProxyError>
Expand description

Start the HTTP (and optionally HTTPS) listener(s) and serve requests.

When state.tls_manager is Some, an HTTPS listener is started on the configured https_addr alongside the HTTP listener. The HTTP listener doubles as the ACME HTTP-01 challenge responder.

When proxy_protocol is enabled in the global config, the PROXY protocol header is parsed from each connection before serving. The real client address from the header is used instead of the TCP peer address.