summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-05-02 14:24:10 -0700
committerJunio C Hamano <gitster@pobox.com>2016-05-02 14:24:10 -0700
commit6b9eee2bb2934d94a5bbcbcdd28b851d71ffc5ae (patch)
treea4e4f6ec31daea1e2e21cc3654f317643493e390
parente18ace0951febce5a5fa9eeecfec4e523b1d6146 (diff)
parent87f8a0b279def4da439b5e0e41f517a05ef110f0 (diff)
downloadgit-6b9eee2bb2934d94a5bbcbcdd28b851d71ffc5ae.tar.gz
Merge branch 'jc/http-socks5h' into maint
The socks5:// proxy support added back in 2.6.4 days was not aware that socks5h:// proxies behave differently. * jc/http-socks5h: http: differentiate socks5:// and socks5h://
-rw-r--r--http.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/http.c b/http.c
index 69da4454d8..4304b80ad3 100644
--- a/http.c
+++ b/http.c
@@ -605,7 +605,10 @@ static CURL *get_curl_handle(void)
if (curl_http_proxy) {
curl_easy_setopt(result, CURLOPT_PROXY, curl_http_proxy);
#if LIBCURL_VERSION_NUM >= 0x071800
- if (starts_with(curl_http_proxy, "socks5"))
+ if (starts_with(curl_http_proxy, "socks5h"))
+ curl_easy_setopt(result,
+ CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5_HOSTNAME);
+ else if (starts_with(curl_http_proxy, "socks5"))
curl_easy_setopt(result,
CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
else if (starts_with(curl_http_proxy, "socks4a"))