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>

Wei Shuyu committed Dec 20, 2017 at 01:24 UTC 82b6803aeec62489977b98804b0a18396d3c6ebf
1 file changed +5
http.c
+5
@@ -864,6 +864,11 @@ static CURL *get_curl_handle(void)
864 else if (starts_with(curl_http_proxy, "socks"))
865 curl_easy_setopt(result,
866 CURLOPT_PROXYTYPE, CURLPROXY_SOCKS4);
867 +#endif
868 +#if LIBCURL_VERSION_NUM >= 0x073400
869 + else if (starts_with(curl_http_proxy, "https"))
870 + curl_easy_setopt(result,
871 + CURLOPT_PROXYTYPE, CURLPROXY_HTTPS);
872 #endif
873 if (strstr(curl_http_proxy, "://"))
874 credential_from_url(&proxy_auth, curl_http_proxy);