From: Wei Shuyu <wsy@dogben.com>
To: git@vger.kernel.org
Cc: Wei Shuyu <wsy@dogben.com>, gitster@pobox.com
Subject: [PATCH] http: support CURLPROXY_HTTPS
Date: Wed, 20 Dec 2017 01:24:01 +0800 [thread overview]
Message-ID: <20171219172401.5263-1-wsy@dogben.com> (raw)
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>
---
http.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/http.c b/http.c
index 215bebef1..32d33261c 100644
--- a/http.c
+++ b/http.c
@@ -865,6 +865,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);
--
2.15.1
next reply other threads:[~2017-12-19 17:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-19 17:24 Wei Shuyu [this message]
2017-12-19 20:59 ` [PATCH] http: support CURLPROXY_HTTPS Jonathan Nieder
2017-12-19 21:38 ` Junio C Hamano
2017-12-19 21:50 ` Jonathan Nieder
[not found] ` <a572179929e666e4e598930ec774c4db@dogben.com>
2017-12-20 2:30 ` Wei Shuyu
2017-12-20 11:41 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171219172401.5263-1-wsy@dogben.com \
--to=wsy@dogben.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).