summaryrefslogtreecommitdiff
path: root/common.c
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2015-07-21 00:57:16 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2015-07-21 00:57:16 +0200
commit13872a3a3eacd05d929fcc6fe9cac0b07aa884ba (patch)
tree727aace2ce47fcf6d047615d54a079d136460784 /common.c
parent22d9e20b4a84f7d4ac4df09d8ab8ef90b30bb247 (diff)
downloadxK-13872a3a3eacd05d929fcc6fe9cac0b07aa884ba.tar.gz
xK-13872a3a3eacd05d929fcc6fe9cac0b07aa884ba.tar.xz
xK-13872a3a3eacd05d929fcc6fe9cac0b07aa884ba.zip
Fix SOCKS5 nopass authentication
Diffstat (limited to 'common.c')
-rw-r--r--common.c3
1 files changed, 2 insertions, 1 deletions
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;