[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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user