[core] Proxy socket: compile option proxy_socket gives both engines a 0660 Unix socket for the front proxy (edge in its config, Caddy a third server with trusted_proxies_unix); listeners change only with a restart

This commit is contained in:
2026-11-10 20:59:57 +01:00
parent 4150848842
commit ffffa62999
15 changed files with 117 additions and 20 deletions
+5
View File
@@ -116,6 +116,10 @@ pub struct Compile {
/// Proxies in front whose X-Forwarded-For is believed (e.g. ["127.0.0.1"] beside Caddy).
#[serde(default)]
pub trusted_proxies: Vec<std::net::IpAddr>,
/// The front proxy's Unix socket (beside Caddy): both engines serve the HTTPS hosts on it
/// and believe its X-Forwarded-For.
#[serde(default)]
pub proxy_socket: Option<String>,
}
impl Compile {
@@ -130,6 +134,7 @@ impl Compile {
caddy_admin: self.caddy_admin,
caddy_admin_socket: self.caddy_admin_socket.clone(),
trusted_proxies: self.trusted_proxies.clone(),
proxy_socket: self.proxy_socket.clone(),
}
}
}
+1
View File
@@ -150,6 +150,7 @@ pub async fn run(args: &[String]) -> Result<(), String> {
caddy_admin: None,
caddy_admin_socket: None,
trusted_proxies: Vec::new(),
proxy_socket: None,
},
compile_caddy: None,
pki: Some(ianitor_control::config::PkiConfig {