From 06c20ed394a65cc9e959a30ea74b8b256f76c1fa Mon Sep 17 00:00:00 2001 From: rofl0r Date: Sun, 11 Feb 2018 14:58:47 +0000 Subject: [PATCH] fix socks5 username/password auth the version field in the auth check needs to be 5, not 1. closes #221 --- src/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core.c b/src/core.c index ed3a6bd..53a9d44 100644 --- a/src/core.c +++ b/src/core.c @@ -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;