[core] Unix upstreams: unix:/path parses strictly into a socket upstream; edge proxies and health-checks it in plain HTTP over the socket, Caddy dials unix/<path>

This commit is contained in:
2026-11-10 21:04:24 +01:00
parent 84c1c81906
commit d74079c66d
8 changed files with 183 additions and 10 deletions
+5
View File
@@ -306,6 +306,11 @@ impl ProxyHttp for EdgeProxy {
Error::explain(ErrorType::HTTPStatus(503), "no healthy upstream")
})?;
let up = &host.upstreams[i];
if let Some(path) = &up.unix {
// A socket: one peer, nothing to resolve and no other address to try.
log::debug!(target: "ianitor::proxy", "{}: upstream {}", host.cfg.hostname, up.authority);
return Ok(Box::new(fetch::unix_peer(path)?));
}
ctx.addrs = match up.resolve().await {
Ok(a) => a,
Err(e) => {