[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
+4
View File
@@ -110,6 +110,8 @@ pub struct EdgeSpec<'a> {
pub http_port: Option<u16>,
/// Extra files written into the edge directory before it starts (path relative to it).
pub files: Vec<(String, Vec<u8>)>,
/// Peers whose X-Forwarded-For edge believes.
pub trusted_proxies: Vec<std::net::IpAddr>,
}
impl Default for EdgeSpec<'_> {
@@ -122,6 +124,7 @@ impl Default for EdgeSpec<'_> {
extra_args: Vec::new(),
http_port: None,
files: Vec::new(),
trusted_proxies: Vec::new(),
}
}
}
@@ -191,6 +194,7 @@ pub fn spawn(spec: EdgeSpec<'_>) -> Edge {
caddy_credentials_dir: "/run/credentials/caddy-fallback.service".into(),
caddy_admin: None,
caddy_admin_socket: None,
trusted_proxies: spec.trusted_proxies.clone(),
};
let config_text = compile_with(&dir, &ca, &opts, spec.site, &spec.hosts);
std::fs::write(dir.join("edge.json"), &config_text).unwrap();