diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-04-22 15:45:09 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-04-22 15:45:09 -0700 |
commit | 1c4f47690074de3c27c1a2124779bfe2898f295d (patch) | |
tree | 50a1b826d93dc43a8f6e4b244ebb88675dd39b4d /http.c | |
parent | 33e4ec89d9aeb5f1f828fcefba8c930f4cfa0da0 (diff) | |
parent | 87f8a0b279def4da439b5e0e41f517a05ef110f0 (diff) | |
download | git-1c4f47690074de3c27c1a2124779bfe2898f295d.tar.gz |
Merge branch 'jc/http-socks5h'
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://
Diffstat (limited to 'http.c')
-rw-r--r-- | http.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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")) |