mirror of
https://github.com/cmz0228/hysteria-dev.git
synced 2025-06-17 01:40:00 +00:00
feat: make sure SOCKS5 listen address has a specified IP (for UDP to work)
This commit is contained in:
parent
fb189c5411
commit
c811b8e558
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user