mirror of
https://github.com/cmz0228/hysteria-dev.git
synced 2025-07-26 04:48:33 +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 {
|
||||
return nil, err
|
||||
}
|
||||
if tAddr.IP == nil || tAddr.IP.IsUnspecified() {
|
||||
return nil, errors.New("listen address must have a specified IP")
|
||||
}
|
||||
m := socks5.MethodNone
|
||||
if authFunc != nil {
|
||||
m = socks5.MethodUsernamePassword
|
||||
|
Reference in New Issue
Block a user