Commit graph

2 commits

Author SHA1 Message Date
Haruue Icymoon
9476976950
chore: reformat code 2023-11-27 11:35:15 +08:00
Haruue Icymoon
e70838cd98
fix: ipv{4,6}-only listen on wildcard address
fix: #797

when listening on a wildcard address like "0.0.0.0" or "[::]", hysteria
actually listened on both IPv4 and IPv6. this is a well-known bug of the
golang net package.

this commit introduces a fix for that, the intended behavior will be:

0.0.0.0:443 => listen on IPv4 only
[::]:443    => listen on IPv6 only
:443        => listen on both IPv4 and IPv6
2023-11-26 16:09:01 +08:00