summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;