walkor/php-socks5

Proxy does not work With telegram and proxifier when AUTH_ENABLED

irghost opened this issue · 3 comments

Proxy does not work With telegram and proxifier when AUTH_ENABLED

I have faced the same problem: if i set AUTH_ENABLED=1 then python requests failed with error: Failed to establish a new connection: SOCKS5 proxy server sent invalid data

Try fix it !
in case STAGE_AUTH: we must change

$connection->send("\x05\x00");

to

$connection->send("\x01\x00");

and

$connection->send("\x05\x01");

to

$connection->send("\x01\x01");

I don't why but client lib check version number (1 bytes) = 1

I have the same issue, any update?
it does not work with $AUTH_ENABLED = true;