From bc3eba5bf7f4c8f55393fefd2adffd6a3d093d1d Mon Sep 17 00:00:00 2001 From: Oliver Papst Date: Sat, 10 Jan 2026 22:36:31 +0100 Subject: [PATCH] =?UTF-8?q?feat:=20change=20default=20bind=20address=20to?= =?UTF-8?q?=20::=20for=20dual=E2=80=91stack=20support?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The socket bound to :: accepts both IPv6 and IPv4 (mapped) connections, so this change enables IPv6 connectivity in addition to the existing IPv4 behaviour. --- env/rustmailer.env | 2 +- src/modules/rest/mod.rs | 2 +- src/modules/settings/cli.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/env/rustmailer.env b/env/rustmailer.env index c5caccd..5f79424 100644 --- a/env/rustmailer.env +++ b/env/rustmailer.env @@ -28,7 +28,7 @@ BICHON_ROOT_DIR=/data/bichon-data # Enable API access token validation BICHON_ENABLE_ACCESS_TOKEN=false -# IP address to bind the HTTP and gRPC servers to (default: 0.0.0.0) +# IP address to bind the HTTP and gRPC servers to (default: ::) BICHON_BIND_IP= # Comma-separated list of allowed CORS origins (e.g. https://app.example.com) diff --git a/src/modules/rest/mod.rs b/src/modules/rest/mod.rs index 541ff3d..d7d0014 100644 --- a/src/modules/rest/mod.rs +++ b/src/modules/rest/mod.rs @@ -51,7 +51,7 @@ pub type ApiResult = std::result::Result; pub async fn start_http_server() -> BichonResult<()> { let listener = TcpListener::bind(( - SETTINGS.bichon_bind_ip.clone().unwrap_or("0.0.0.0".into()), + SETTINGS.bichon_bind_ip.clone().unwrap_or("::".into()), SETTINGS.bichon_http_port as u16, )); diff --git a/src/modules/settings/cli.rs b/src/modules/settings/cli.rs index e09f188..822c814 100644 --- a/src/modules/settings/cli.rs +++ b/src/modules/settings/cli.rs @@ -50,7 +50,7 @@ pub struct Settings { #[clap( long, env, - default_value = "0.0.0.0", + default_value = "::", help = "The IP address that the node binds to, in IPv4 or IPv6 format (e.g., 192.168.1.1 or ::1). Required in cluster mode.", value_parser = ValueParser::new(|s: &str| { // Ensure the input is a valid IPv4 or IPv6 address