[control] QC minors: device install links open a page and download on POST (never listed), approve and install failures show on the request and the CLI waits, PBKDF2 floor, private pki dirs or an error, trusted_proxies for a proxy in front, a placeholder keeps the device allow list from being empty (Caddy refuses that)

This commit is contained in:
2026-11-08 11:02:50 +01:00
parent bc336d1188
commit 3bf5fa0e1a
27 changed files with 548 additions and 46 deletions
+13
View File
@@ -123,6 +123,8 @@ pub struct Runtime {
pub share_key: Option<Arc<ShareKey>>,
/// Loaded when any host has `device_certs`.
pub device_trust: Option<Arc<crate::tls::DeviceTrust>>,
/// Peers whose X-Forwarded-For names the client.
pub trusted_proxies: Vec<std::net::IpAddr>,
/// SHA-256 (hex) of the config file bytes this runtime was built from; empty when it was
/// built from a parsed config.
pub sha256: String,
@@ -470,9 +472,20 @@ pub fn build(cfg: EdgeConfig, credentials_dir: Option<&Path>) -> Result<Runtime,
} else {
None
};
let trusted_proxies = cfg
.trusted_proxies
.iter()
.map(|s| {
s.parse().map_err(|_| EdgeError::Config {
path: PathBuf::from("<config>"),
message: format!("trusted_proxies: {s:?} is not an IP address"),
})
})
.collect::<Result<Vec<std::net::IpAddr>, _>>()?;
Ok(Runtime {
cfg,
trusted_proxies,
hosts,
forward_auth,
access_log,