1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//! RPC server module: HTTP/HTTPS server, authentication, CORS, TLS, and
//! WebSocket support.
//!
//! The original single-file `server.rs` mixed several unrelated concerns
//! (auth, CORS, TLS, server config, the axum HTTP server, and WebSocket
//! session handling). It has been split into focused submodules:
//!
//! - [`auth`] — `AuthConfig` (token + basic auth) and `RpcAuthMiddleware`.
//! - [`cors`] — `CorsConfig`.
//! - [`tls`] — `TlsConfig` and `TlsError`.
//! - [`config`] — `ServerConfig` aggregation.
//! - [`http_routes`] — `RpcServer` and the axum HTTP route handlers.
//! - [`ws_session`] — WebSocket upgrade, inbound JSON-RPC dispatch, and
//! outbound event forwarding.
//! - [`test_cert`] — `generate_test_cert()` test utility.
// Re-export data model types from types module
pub use ;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;