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 <wsy@dogben.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 3013dff commit 82b6803

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

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)