diff --git a/proxy/socks4.c b/proxy/socks4.c index ac85ec05..8cd08d84 100644 --- a/proxy/socks4.c +++ b/proxy/socks4.c @@ -95,8 +95,8 @@ static void proxy_socks4_process_queue(ProxyNegotiator *pn) if (data[0] != SOCKS4_REPLY_VERSION) { pn->error = dupprintf("SOCKS proxy response contained reply " - "version number %d (expected 0)", - (int)data[0]); + "version number %d (expected %d)", + (int)data[0], SOCKS4_REPLY_VERSION); crStopV; } diff --git a/proxy/socks5.c b/proxy/socks5.c index 87a0bbc8..49331476 100644 --- a/proxy/socks5.c +++ b/proxy/socks5.c @@ -353,7 +353,7 @@ static void proxy_socks5_process_queue(ProxyNegotiator *pn) "SOCKS 5 CHAP authentication failed"); crStopV; } - } else if (s->chap_attr==SOCKS5_AUTH_CHAP_ATTR_CHALLENGE) { + } else if (s->chap_attr == SOCKS5_AUTH_CHAP_ATTR_CHALLENGE) { /* The CHAP challenge string. Send the response */ strbuf *response = chap_response( make_ptrlen(s->chap_buf, s->chap_attr_len), @@ -387,7 +387,7 @@ static void proxy_socks5_process_queue(ProxyNegotiator *pn) * byte[] address, with variable size (see below) * uint16 port */ - put_byte(pn->output, SOCKS5_REPLY_VERSION); + put_byte(pn->output, SOCKS5_REQUEST_VERSION); put_byte(pn->output, SOCKS_CMD_CONNECT); put_byte(pn->output, 0); /* reserved byte */