Socks5 Proxy: Authentication seems broken
Hi,
I tried to use Gio.Proxy to auth via socks5 to a proxy, didnt work.
It always told me, Username or Password wrong.
Then i opened Wireshark, and Wireshark reported auth success.
So i looked at the code
gsocks5proxy.c
static gboolean
check_auth_status (const guint8 *data, GError **error)
{
if (data[0] != SOCKS5_VERSION
|| data[1] != SOCKS5_REP_SUCCEEDED)
{
g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_PROXY_AUTH_FAILED,
_("SOCKSv5 authentication failed due to wrong "
"username or password."));
return FALSE;
}
return TRUE;
}
So what should be evaluated is SOCKS5_AUTH_VERSION
not SOCKS5_VERSION
Relevant RFC https://tools.ietf.org/html/rfc1929
Edited by lovetox