Skip to content

Commit

Permalink
fix socks5 username/password auth
Browse files Browse the repository at this point in the history
the version field in the auth check needs to be 5, not 1.

closes rofl0r#221
  • Loading branch information
rofl0r committed Feb 11, 2018
1 parent 831df03 commit 06c20ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,8 @@ static int tunnel_to(int sock, ip_type ip, unsigned short port, proxy_type pt, c

if(2 != read_n_bytes(sock, in, 2))
goto err;
if(in[0] != 1 || in[1] != 0) {
if(in[0] != 1)
if(in[0] != 5 || in[1] != 0) {
if(in[0] != 5)
goto err;
else
return BLOCKED;
Expand Down

0 comments on commit 06c20ed

Please sign in to comment.