summaryrefslogtreecommitdiff
path: root/http.c
diff options
context:
space:
mode:
authorWei Shuyu <wsy@dogben.com>2017-12-19 17:24:01 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-12-19 18:20:14 (GMT)
commit82b6803aeec62489977b98804b0a18396d3c6ebf (patch)
tree7651795b904fa2e1ea2f38fc50f6d4cdf378f5cf /http.c
parent3013dff8662eae06457fe6e5348dfe2270810ab2 (diff)
downloadgit-82b6803aeec62489977b98804b0a18396d3c6ebf.zip
git-82b6803aeec62489977b98804b0a18396d3c6ebf.tar.gz
git-82b6803aeec62489977b98804b0a18396d3c6ebf.tar.bz2
http: support CURLPROXY_HTTPS
HTTP proxy over SSL is supported by curl since 7.52.0. This is very useful for networks with protocol whitelist. Signed-off-by: Wei Shuyu <wsy@dogben.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'http.c')
-rw-r--r--http.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/http.c b/http.c
index 713525f..9f98b56 100644
--- a/http.c
+++ b/http.c
@@ -865,6 +865,11 @@ static CURL *get_curl_handle(void)
curl_easy_setopt(result,
CURLOPT_PROXYTYPE, CURLPROXY_SOCKS4);
#endif
+#if LIBCURL_VERSION_NUM >= 0x073400
+ else if (starts_with(curl_http_proxy, "https"))
+ curl_easy_setopt(result,
+ CURLOPT_PROXYTYPE, CURLPROXY_HTTPS);
+#endif
if (strstr(curl_http_proxy, "://"))
credential_from_url(&proxy_auth, curl_http_proxy);
else {