summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWei Shuyu <wsy@dogben.com>2017-12-20 01:24:01 +0800
committerJunio C Hamano <gitster@pobox.com>2017-12-19 10:20:14 -0800
commit82b6803aeec62489977b98804b0a18396d3c6ebf (patch)
tree7651795b904fa2e1ea2f38fc50f6d4cdf378f5cf
parent3013dff8662eae06457fe6e5348dfe2270810ab2 (diff)
downloadgit-ws/curl-http-proxy-over-https.tar.gz
http: support CURLPROXY_HTTPSws/curl-http-proxy-over-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>
-rw-r--r--http.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/http.c b/http.c
index 713525f38e..9f98b56f22 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 {