aboutsummaryrefslogtreecommitdiffstats
path: root/Cargo.toml
diff options
context:
space:
mode:
authorAli MJ Al-Nasrawy <alimjalnasrawy@gmail.com>2021-05-07 00:05:09 +0000
committerAli MJ Al-Nasrawy <alimjalnasrawy@gmail.com>2021-08-30 04:00:59 +0000
commit28da05437de8f15df379041a653ee72cf136204b (patch)
tree37ee3da365dd4207e71805a647204fba45630f7c /Cargo.toml
parentFix -i 0.0.0.0 (diff)
downloadminiserve-28da05437de8f15df379041a653ee72cf136204b.tar.gz
miniserve-28da05437de8f15df379041a653ee72cf136204b.zip
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!
Diffstat (limited to 'Cargo.toml')
-rw-r--r--Cargo.toml1
1 files changed, 1 insertions, 0 deletions
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"]