mirror of
https://gitclone.com/github.com/MetaCubeX/Clash.Meta
synced 2025-02-23 20:52:15 +08:00
Fix: panic of socks5 client missing authentication
This commit is contained in:
parent
fb0289bb4c
commit
147a7ce779
@ -229,6 +229,10 @@ func ClientHandshake(rw io.ReadWriter, addr Addr, command Command, user *User) (
|
||||
}
|
||||
|
||||
if buf[1] == 2 {
|
||||
if user == nil {
|
||||
return nil, ErrAuth
|
||||
}
|
||||
|
||||
// password protocol version
|
||||
authMsg := &bytes.Buffer{}
|
||||
authMsg.WriteByte(1)
|
||||
|
Loading…
Reference in New Issue
Block a user