From 28da05437de8f15df379041a653ee72cf136204b Mon Sep 17 00:00:00 2001 From: Ali MJ Al-Nasrawy Date: Fri, 7 May 2021 03:05:09 +0300 Subject: Fix default binding behaviour On some platforms, binding to to both "::" and "0.0.0.0" at the same time is not allowed because "::" may already accepts ipv4 connections. For other platforms, binding to both is necessary to support ipv4 and ipv6. This platform-specific behaviour is due to the variation in the default value for the socket option "IPV6_ONLY". Fix this by always setting the "IPv6_ONLY" sockopt to true! --- Cargo.toml | 1 + 1 file changed, 1 insertion(+) (limited to 'Cargo.toml') diff --git a/Cargo.toml b/Cargo.toml index 4efc015..f72597a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -53,6 +53,7 @@ http = "0.2" bytes = "1" atty = "0.2" rustls = { version = "0.19", optional = true } +socket2 = "0.4" [features] default = ["tls"] -- cgit v1.2.3 From 5692a9740c447674aeba2743315bab52e44ccf36 Mon Sep 17 00:00:00 2001 From: Ali MJ Al-Nasrawy Date: Fri, 7 May 2021 18:29:10 +0300 Subject: Show IP addresses of all local interfaces .. when binding to wildcard addresses (:: or 0.0.0.0) * Remove local variable `interfaces` because it is no longer used multiple times. --- Cargo.toml | 1 + 1 file changed, 1 insertion(+) (limited to 'Cargo.toml') diff --git a/Cargo.toml b/Cargo.toml index f72597a..a40aad5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -54,6 +54,7 @@ bytes = "1" atty = "0.2" rustls = { version = "0.19", optional = true } socket2 = "0.4" +get_if_addrs = "0.5" [features] default = ["tls"] -- cgit v1.2.3