From: Wei Shuyu Date: Tue, 19 Dec 2017 17:24:01 +0000 (+0800) Subject: http: support CURLPROXY_HTTPS X-Git-Tag: v2.16.0-rc0~3^2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/82b6803aeec62489977b98804b0a18396d3c6ebf 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 Signed-off-by: Junio C Hamano --- diff --git a/http.c b/http.c index 713525f38e..9f98b56f22 100644 --- a/http.c +++ b/http.c @@ -864,6 +864,11 @@ static CURL *get_curl_handle(void) else if (starts_with(curl_http_proxy, "socks")) 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);