mirror of
https://github.com/netchx/netch.git
synced 2026-01-25 13:02:30 +08:00
fix a bug that when using socks5 with authentication, username and password can't sent to server correctly (#856)
This commit is contained in:
@@ -89,10 +89,10 @@ bool SocksHelper::Handshake(SOCKET client)
|
||||
}
|
||||
|
||||
/* Password */
|
||||
buffer[1 + plength] = 0x00;
|
||||
buffer[1 + 1 + ulength] = 0x00;
|
||||
if (plength != 0)
|
||||
{
|
||||
buffer[1 + ulength] = plength;
|
||||
buffer[1 + 1 + ulength] = plength;
|
||||
memcpy(buffer + 1 + 1 + ulength + 1, tgtPassword.c_str(), plength);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user