trusty_console/proxy/mod.rs
1//! Reverse-proxy module for trusty-console P1.
2//!
3//! Why: Operators want to reach each daemon's UI and API through the console's
4//! single URL (`http://127.0.0.1:7788`) rather than remembering per-daemon
5//! ports. This module implements the `/proxy/{daemon}/{*path}` route that
6//! forwards requests to the live daemon base URL resolved from the background
7//! health-poll cache.
8//! What: Two sub-modules — `routes` contains the axum extractor types and the
9//! forwarding handler; this `mod.rs` re-exports the public surface and houses
10//! the `KNOWN_DAEMONS` constant.
11//! Test: Unit tests for URL construction live in `routes.rs`.
12
13pub mod routes;
14
15pub use routes::proxy_handler;