mirror of
https://github.com/cedar2025/hysteria.git
synced 2025-09-10 02:21:46 +00:00
feat: make sure SOCKS5 listen address has a specified IP (for UDP to work)
This commit is contained in:
@@ -52,6 +52,9 @@ func NewServer(hyClient *core.Client, transport transport.Transport, addr string
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
if tAddr.IP == nil || tAddr.IP.IsUnspecified() {
|
||||||
|
return nil, errors.New("listen address must have a specified IP")
|
||||||
|
}
|
||||||
m := socks5.MethodNone
|
m := socks5.MethodNone
|
||||||
if authFunc != nil {
|
if authFunc != nil {
|
||||||
m = socks5.MethodUsernamePassword
|
m = socks5.MethodUsernamePassword
|
||||||
|
Reference in New Issue
Block a user