Files
RustProxy/docs/V0.24.1_AUDIT.md
T
2026-10-03 00:27:09 +01:00

6.4 KiB

RustProxy 0.24.1 specification audit

Scope

0.24.1 is a maintenance release over 0.24.0. It keeps the existing HTTP/2 graceful shutdown and HTTP/3 behavior, replaces duplicated BSD system-statistics collection with shared library APIs, restores network interface/RX/TX diagnostics through a dedicated cross-platform network API plus library fallback, exposes resolved runtime installation metadata to authenticated administrators, moves Logging into Settings, fixes compiler issues reported from a Rust-enabled release host, and removes artificial hostname-count ceilings from certificate/routing hostname lists.

Shared system statistics API

Requirement Source implementation Status
Avoid separate metric implementations per BSD family src/system_stats/mod.rs collects portable host values through systemstat, network inventory/counters through sysinfo::Networks merged with a systemstat library supplement/fallback, and process values through metrics-process; the old src/system_stats/bsd.rs command/parser backend is removed implemented in source
Linux compatibility src/system_stats/linux.rs::augment keeps /proc/stat, /proc/meminfo, /proc/self/status, /proc/self/io and cgroup-v2 details after common sampling implemented in source; compiler/runtime gate open
FreeBSD systemstat host API + sysinfo::Networks + metrics-process; network inventory/counters are supplemented by systemstat when useful source-integrated; native build/runtime gate open
OpenBSD systemstat host API plus available metrics-process values; sysinfo network inventory may be unavailable so the shared adapter uses the merged systemstat source source-integrated; native gate open
NetBSD systemstat host API + sysinfo::Networks + shared metrics-process dummy fallback; unavailable process values remain null source-integrated; native gate open
DragonFly BSD systemstat host API plus shared metrics-process dummy fallback; network inventory merges sysinfo when available with the systemstat source source-integrated; native gate open
macOS / Windows same common host API and the process API on their supported targets source-integrated; native gate open
Do not invent unsupported values all portable fields are Option; failed/unsupported library calls leave values None implemented in source

The portable view now includes CPU, logical CPU count, RAM, swap, system uptime, load average, network totals/rates/per-interface values, process CPU, RSS, virtual memory, descriptor count/limit, process start time and thread count where the selected libraries provide them. Linux-only detailed RSS categories, process data/swap, process I/O and cgroup limits remain explicit additive fields rather than guessed equivalents on BSD.

The release-host systemstat compile failure in uptime conversion is fixed by using the duration's as_secs() API. The stale std::future::Future import in src/server.rs is also removed.

Network inventory regression fix

The first 0.24.1 library adapter built the interface list only from systemstat::network_stats() successes. A backend error for a discovered interface therefore removed that interface entirely, which could yield 0 interfaces and null aggregate RX/TX on both Linux and BSD installations. The corrected adapter uses sysinfo::Networks::new_with_refreshed_list() as the primary interface/counter API, supplements it with systemstat, merges counters by interface name, filters only loopback (lo, loN), and never shells out. This also preserves interfaces when either library returns only a partial inventory. The old 64-interface truncation is removed so discovered non-loopback interfaces are not silently hidden. Rate calculation remains based on deltas between the existing low-frequency snapshots.

Hostname/certificate cardinality

RustProxy no longer imposes fixed item-count ceilings on certificate SNI hostname bindings, generated/imported certificate hostname checks, ACME domain requests, vhost/redirect/404 hostname lists, administration allowed hosts, host ACL hostname lists or Docker aliases. These lists remain constrained by DNS syntax and length rules plus the existing bounded control-plane inputs/global configuration size. Certificate PEM/key size limits, certificate-chain bounds and abandoned-upload storage bounds are deliberately retained as resource-safety controls. External ACME CAs/providers may enforce their own certificate/SAN quotas.

Runtime installation information

/api/status now includes a runtime object with platform, statistics_source, data_directory and database_path. It is not added to the anonymous route allowlist; the existing administrator guard protects the status endpoint. These values describe installation/runtime state and contain no credentials or certificate/private-key contents.

The browser displays the returned values and performs no path/platform detection. For local CLI operations, an explicit --data-dir always wins. When using the default local path without a database, installed-data discovery checks platform conventions: /var/lib/rustproxy first on Linux/non-BSD and /var/db/rustproxy first on BSD, then the alternate convention.

Settings navigation

The standalone Logging primary-navigation panel is removed. Its existing form is mounted as Settings -> Logging. /logging remains accepted as a legacy URL and is canonicalized to /settings?tab=logging; logging persistence and sink behavior are unchanged.

Retained 0.24.0 transport behavior

The 0.24.0 H2 connection state/stream lease tracking, idle recheck, GOAWAY, bounded drain, maximum connection lifetime and accepted-stream completion path are unchanged by this patch. HTTP/3/QUIC remains under Settings -> HTTP connections -> HTTP/3 and retains listener-scoped restart semantics.

Open release gates

This workspace has no cargo, rustc or rustfmt. A Rust-enabled release-host attempt exposed the uptime API mismatch and unused import; both are fixed in source, but this workspace cannot rerun compilation to prove that no later compiler error remains. A release host must generate/preserve the resolver-produced lockfile and rerun cargo fmt --all, cargo check --locked --all-targets, cargo test --locked --all-targets, a release build, native BSD sampling tests and the final H2/H3/WebSocket/proxy-statistics regression before production deployment.