Skip to content

Commit 82b6803

Browse files
wsy2220gitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3013dff commit 82b6803

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

http.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -864,6 +864,11 @@ static CURL *get_curl_handle(void)
864864
else if (starts_with(curl_http_proxy, "socks"))
865865
curl_easy_setopt(result,
866866
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);
867872
#endif
868873
if (strstr(curl_http_proxy, "://"))
869874
credential_from_url(&proxy_auth, curl_http_proxy);

0 commit comments

Comments
 (0)