Skip to main content

rws_proxy/
lib.rs

1//! The proxy and operations layer of rust-web-server: reverse proxy, config-driven routes, load balancing, L4 and WebSocket proxies, the admin API, cluster sync, fleet pull, WAF, LLM and A2A gateways, FastCGI, traffic insights.
2//!
3//! Internal to rust-web-server, released with it at the same version: use
4//! these through the `rust_web_server` paths, which stay stable; this
5//! crate's own layout may change in any release. See
6//! `spec/WORKSPACE_SPLIT.md`.
7
8// Derive output (rws-macros) names `::rust_web_server::…`; in this crate's
9// tests that is this crate.
10#[cfg(test)]
11extern crate self as rust_web_server;
12
13// The layers below, under the paths the moved code uses (`crate::request`, …);
14// public (hidden) so doctests can name them as `rust_web_server::…`.
15#[allow(unused_imports)]
16#[doc(hidden)]
17pub use rws_server::{app, application, authz, blocklist, cache, config_reload, core, disk_guard, early_hints, entry_point, error, ext, feature, header, http, http_client, ip_filter, maintenance, mcp, metrics, middleware, range, rate_limit, request, request_log, response, rewrite, router, server, server_config, service_discovery, session, sse, state, url};
18#[cfg(feature = "auth")]
19#[doc(hidden)]
20pub use rws_server::auth;
21#[cfg(not(target_arch = "wasm32"))]
22#[doc(hidden)]
23pub use rws_server::circuit_breaker;
24#[cfg(all(any(feature = "http-client", feature = "http2"), not(target_arch = "wasm32")))]
25#[doc(hidden)]
26pub use rws_server::crypto_provider;
27#[cfg(not(target_arch = "wasm32"))]
28#[doc(hidden)]
29pub use rws_server::log;
30#[cfg(not(target_arch = "wasm32"))]
31#[doc(hidden)]
32pub use rws_server::otel;
33#[cfg(not(target_arch = "wasm32"))]
34#[doc(hidden)]
35pub use rws_server::redis_protocol;
36#[cfg(feature = "sso")]
37#[doc(hidden)]
38pub use rws_server::sso;
39#[cfg(all(unix, any(feature = "http1", feature = "http2")))]
40#[doc(hidden)]
41pub use rws_server::systemd;
42#[cfg(not(target_arch = "wasm32"))]
43#[doc(hidden)]
44pub use rws_server::timeout;
45#[cfg(feature = "http2")]
46#[doc(hidden)]
47pub use rws_server::tls;
48#[cfg(all(any(feature = "http-client", feature = "http2"), not(target_arch = "wasm32")))]
49#[doc(hidden)]
50pub use rws_server::tls_client_builder;
51#[cfg(not(target_arch = "wasm32"))]
52#[doc(hidden)]
53pub use rws_server::websocket;
54#[cfg(feature = "acme")]
55#[doc(hidden)]
56pub use rws_acme::acme;
57#[cfg(feature = "storage-s3")]
58#[doc(hidden)]
59pub use rws_storage::storage;
60#[cfg(feature = "wasm-plugins")]
61#[doc(hidden)]
62pub use rws_wasm_plugin::wasm_plugin;
63
64#[cfg(not(target_arch = "wasm32"))]
65pub mod proxy;
66#[cfg(not(target_arch = "wasm32"))]
67pub mod proxy_config;
68#[cfg(not(target_arch = "wasm32"))]
69pub mod admin;
70/// Runtime state shared across replicas through Redis (18.22.0).
71#[cfg(not(target_arch = "wasm32"))]
72pub mod cluster;
73/// Fleet config pull: signed configs from HTTPS, S3 or git (18.23.0).
74#[cfg(all(feature = "http2", not(target_arch = "wasm32")))]
75pub mod fleet;
76pub mod config_check;
77#[cfg(not(target_arch = "wasm32"))]
78pub mod llm;
79#[cfg(not(target_arch = "wasm32"))]
80pub mod tcp_proxy;
81#[cfg(not(target_arch = "wasm32"))]
82pub mod udp_proxy;
83#[cfg(not(target_arch = "wasm32"))]
84pub mod ws_proxy;
85#[cfg(not(target_arch = "wasm32"))]
86pub mod canary;
87#[cfg(not(target_arch = "wasm32"))]
88pub mod ingress;
89/// Web application firewall: rws's own rules (18.22.0).
90pub mod waf;
91pub mod a2a;
92/// FastCGI client: PHP through php-fpm (18.21.0).
93#[cfg(not(target_arch = "wasm32"))]
94pub mod fastcgi;
95pub mod traffic;
96
97#[cfg(test)]
98pub(crate) mod test_env;
99// Lower modules only the tests use.
100#[cfg(test)]
101pub(crate) use rws_server::test_client;
102#[cfg(all(test, feature = "http2"))]
103pub(crate) use rws_server::h2_server;
104#[cfg(all(test, feature = "http3"))]
105pub(crate) use rws_server::h3_handler;