From 13872a3a3eacd05d929fcc6fe9cac0b07aa884ba Mon Sep 17 00:00:00 2001 From: Přemysl Janouch Date: Tue, 21 Jul 2015 00:57:16 +0200 Subject: Fix SOCKS5 nopass authentication --- common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common.c b/common.c index 7e0b0f1..e885945 100644 --- a/common.c +++ b/common.c @@ -804,7 +804,8 @@ socks_5_auth_start (struct socks_connector *self) str_append_c (wb, 0x05); // version str_append_c (wb, 1 + can_auth); // number of authentication methods str_append_c (wb, 0x00); // no authentication required - str_append_c (wb, 0x02); // username/password + if (can_auth) + str_append_c (wb, 0x02); // username/password self->on_data = socks_5_auth_finish; return true; -- cgit v1.2.3-70-g09d2