walkor / php-socks5

socks5 proxy written in PHP based on workerman.
205 stars 103 forks source link

Proxy does not work With telegram and proxifier when AUTH_ENABLED #6

Open irghost opened 5 years ago

irghost commented 5 years ago

Proxy does not work With telegram and proxifier when AUTH_ENABLED

katin-dev commented 5 years ago

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

nvthaovn commented 5 years ago

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

yuseferi commented 4 years ago

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