Skip to content

Hysteria 2 服务端配置 对外监听能否只监听IPv4地址? #636

Answered by haruue
chika0801 asked this question in Q&A
Discussion options

You must be logged in to vote

看了下是 Golang 的问题。

只要一个 UDPAddr 是 wildcard , 那不管写什么, 都进入这个判断, 然后返回 IPv6 。

https://github.com/golang/go/blob/go1.20.6/src/net/ipsock_posix.go#L120-L128

看来我们需要单独判断一下 0.0.0.0 然后加个 net="udp4" 参数。

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
2 replies
@chika0801
Comment options

@chika0801
Comment options

Comment options

You must be logged in to vote
1 reply
@chika0801
Comment options

Comment options

You must be logged in to vote
1 reply
@chika0801
Comment options

Answer selected by chika0801
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants