mirror of
https://github.com/netchx/netch.git
synced 2026-03-14 17:43:18 +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 */
|
/* Password */
|
||||||
buffer[1 + plength] = 0x00;
|
buffer[1 + 1 + ulength] = 0x00;
|
||||||
if (plength != 0)
|
if (plength != 0)
|
||||||
{
|
{
|
||||||
buffer[1 + ulength] = plength;
|
buffer[1 + 1 + ulength] = plength;
|
||||||
memcpy(buffer + 1 + 1 + ulength + 1, tgtPassword.c_str(), plength);
|
memcpy(buffer + 1 + 1 + ulength + 1, tgtPassword.c_str(), plength);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user