Quick start
[]
= "0.5"
Behind Apache or nginx on the same host, with the real client taken from X-Forwarded-For only when the connection comes from the proxy:
let server = http_behind_proxy?;
Several listeners, profiles, limits, a connection gate, a control line, and custom protocols go through Server::builder().
Scope
- Listeners over net-io: TCP and Unix sockets, inherited from systemd, passed by mod_fcgid on descriptor 0, or handed over by a supervisor for restarts without a closed port.
- Ingress: direct (plain or TLS through net-io's seam), behind a reverse proxy (PROXY protocol v1 and v2, or trusted
Forwarded/X-Forwarded-Forwith a right-to-left walk and a hop limit), over a Unix socket, or as a FastCGI responder. Every HTTP ingress gives the service the same request and the same client facts. - Per connection: head and request deadlines, minimum transfer rates, keep-alive with request and age limits, pipelining in order, generic refusals that never name the reason, the switch to WebSocket after an upgrade (
h2cis never honoured). - Admission: soft connection caps answered with
503and a jitteredRetry-After, an in-flight cap per worker and per profile after the head is complete, priority lanes with reserved capacity, and a process-wide control line (shed, lockdown, drain, stop). - Hooks: admission, dispatch (offload slow work), revocation checkpoints, observation, readiness (systemd
sd_notifyin safe code), plus net-io's gate and event sink. - Start-up safety: every configuration error reported at once; a proxy or FastCGI listener on a public address, or a trust list that is too broad, is refused unless the override names its reason.
It is not a web framework (no routing, middleware, or templates), not a transport (net-io is), not a protocol parser (the engines are), and not a TLS implementation (tls-net is). There is no CGI mode: services run as persistent processes, and FastCGI covers shared hosting.
See dev/PLAN.md for the full scope, what is left to other crates, and the decision log.
Contributing
See dev/DIRECTIVES.md for engineering standards and the definition of done. Before a PR: cargo fmt --all, cargo clippy --all-targets --all-features -- -D warnings, and cargo test --all-features must be clean.