Socks supports multiple accounts

This commit is contained in:
V2Ray committed 2015-10-10 15:51:35 +02:00
1 parent 7cce04cc3a
commit 213aa2ecf0
5 files changed
+44 -14

No files matched your search

+1 -1
View File
@@ -103,7 +103,7 @@ func (server *SocksServer) handleSocks5(reader *v2net.TimeOutReader, writer io.W
return err
}
status := byte(0)
if !upRequest.IsValid(server.config.Username, server.config.Password) {
if server.config.HasAccount(upRequest.Username(), upRequest.Password()) {
status = byte(0xFF)
}
upResponse := protocol.NewSocks5UserPassResponse(status)