git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC PATCH v2] http: support CURLPROXY_HTTPS

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Dec 27, 2017, 18:29 UTC
Message-ID
<20171227182931.GD149622@aiede.mtv.corp.google.com>
In-Reply-To
<20171223150215.8615-1-wsy@dogben.com>
Wei Shuyu wrote:
> Git has been taught to support an https:// used for http.proxy when
> using recent versions of libcurl.

nit: commit messages use the imperative mood, as though commanding the code base to do something:

	Support https:// for http.proxy when using recent versions of
	curl.
[...]
> To use https proxy with self-signed certs, we need a way to
> unset CURLOPT_PROXY_SSL_VERIFYPEER and CURLOPT_PROXY_SSL_VERIFYHOST
> just like direct SSL connection. This is required if we want
> use t/lib-httpd to test proxy.
Interesting.  Sounds promising.
> In this patch I reuse http.sslverify to do this, do we need an
> independent option like http.sslproxyverify?
I think a separate option is a good idea.  This way, I can use
	[http "https://example.com"]
		sslVerify = false
to fetch from a misconfigured server or
	[http "https://example.com"]
		proxy = https://127.0.0.1
		sslVerifyProxy = false

to proxy through a misconfigured proxy. Alternatively, is there a straightforward way to make

	[http "https://example.com"]
		proxy = https://127.0.0.1
	[http "https://127.0.0.1"]
		sslVerify = false
do that?  Something like
	struct urlmatch_config proxy_config = { STRING_LIST_INIT_DUP };
	config.section = "http";
	config.key = NULL;
	config.collect_fn = proxy_options;
	config.cascade_fn = git_default_config;
	config.cb = NULL;
	config.url = normalized_proxy_url;
	git_config(urlmatch_config_entry, &config);

How does this interact with the GIT_SSL_NO_VERIFY environment variable?

> To fully support https proxy, we also need ways to set more options
> such as CURLOPT_PROXY_SSLCERT. However, I'm not sure if we need to
> support them.

That's for client certs, right? Would it work to make that configurable as

	[http "https://127.0.0.1"]
		sslCert = ...
?

That said, I agree with you that it's not a prerequisite for this initial patch.

Thanks, Jonathan

Previous: Junio C Hamano
Message 4 of 4 in “http: support CURLPROXY_HTTPS”
  1. http: support CURLPROXY_HTTPSWei Shuyu, Dec 23, 2017
  2. Ævar Arnfjörð BjarmasonDec 23, 2017
  3. Junio C HamanoDec 27, 2017
  4. Jonathan NiederDec 27, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.