mirror of
https://github.com/rustmailer/bichon.git
synced 2026-08-03 07:48:34 +02:00
feat: change default bind address to :: for dual‑stack support
The socket bound to :: accepts both IPv6 and IPv4 (mapped) connections, so this change enables IPv6 connectivity in addition to the existing IPv4 behaviour.
This commit is contained in:
@@ -51,7 +51,7 @@ pub type ApiResult<T, E = ApiErrorResponse> = std::result::Result<T, E>;
|
||||
|
||||
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,
|
||||
));
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user