From 488bd6201650917ba6e09555609cd65df3843284 Mon Sep 17 00:00:00 2001 From: dasha_uwu Date: Sun, 15 Feb 2026 07:31:45 +0500 Subject: [PATCH] Provide correct zero ClientInfo with unix sockets, fixes #310 --- src/router/serve/unix.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/router/serve/unix.rs b/src/router/serve/unix.rs index 45db1bd3..7c66d10f 100644 --- a/src/router/serve/unix.rs +++ b/src/router/serve/unix.rs @@ -2,7 +2,7 @@ use std::{ fs, - net::SocketAddr, + net::{IpAddr, Ipv4Addr, SocketAddr}, os::unix::{fs::PermissionsExt, net::UnixListener}, path::Path, sync::Arc, @@ -36,7 +36,7 @@ pub(super) async fn serve( let router = router .clone() - .layer(Extension(ConnectInfo("0.0.0.0".parse::()))) + .layer(Extension(ConnectInfo(SocketAddr::new(IpAddr::V4(Ipv4Addr::UNSPECIFIED), 0)))) .into_make_service(); let acceptor = axum_server::from_unix(unix_listener)? .handle(handle.clone())