git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: git@vger.kernel.org, Jiang Xin <worldhello.net@gmail.com>,
	Junio C Hamano <gitster@pobox.com>,
	Bernhard Reiter <ockham@raz.or.at>,
	Remi Pommarel <repk@triplefau.lt>
Subject: Re: [PATCH v2 6/6] imap-send: correctly report "host" when using "tunnel"
Date: Tue, 7 Feb 2023 17:15:38 -0500	[thread overview]
Message-ID: <Y+LNitGAude1vogv@coredump.intra.peff.net> (raw)
In-Reply-To: <230207.86fsbh2nqo.gmgdl@evledraar.gmail.com>

On Tue, Feb 07, 2023 at 09:39:48PM +0100, Ævar Arnfjörð Bjarmason wrote:

> *nod* I'll just note that you elided the part where I noted that I don't
> really care, and will submit some re-roll that's compatible with the
> current imap.{host,tunnel} interaction.

Yeah, sorry, I should have said "yes, thank you" there. :) I wasn't
meaning to continue arguing, but just trying to answer your "how would
they even find this?" confusion.

> I.e. if we just say that we're not going to support this use-case
> anymore we can get rid of all of the OpenSSL reliance in-tree, except
> for the optional (and hardly ever used) OPENSSL_SHA1, and
> uses-only-one-API-function "HAVE_OPENSSL_CSPRNG" use.

Yeah, getting rid of that openssl code is a reasonable goal. And this
may seem counter-intuitive, but I'm actually _more_ in favor of that
than the change you proposed here, even though it potentially breaks
more users. That's because I feel like we're buying something useful
with it, whereas with the patch we've been discussing, the tradeoff was
less clear to me.

That said, it seems like there should be a path forward for supporting
tunnels via curl, and then we could be getting rid of the openssl
dependency _and_ all of the custom and rarely-run imap code. But that's
an even bigger task, and I not only wouldn't want to work on it, I'm not
even sure I'd want to review it. I'm slightly regretting getting
involved here at all, because it seems like none of us actually care at
all about imap-send, and this has turned into a big discussion. I mostly
chimed in because it seemed like I had a perspective you didn't on how
people might use tunnels, and it felt like I should speak up for folks
whose use cases might be getting broken.

  Side note: If somebody were proposing to add imap-send at all today,
  I'd probably say "no, that should be a separate project, and you
  should probably write it in some language that has a decent imap
  library". It really has nothing at all to do with Git in terms of
  implementation, and I suspect it's not super well maintained in
  general. But perhaps it is too late for that.

> So your example of:
> 
> 	[imap]
> 	host = internal.example.com
> 	tunnel = "ssh bastion-server nc internal.example.com 143"
> 
> Would instead be:
> 
> 	1. Arrange for the equivalent of that to run outside of
> 	   git-imap-send, e.g.:
> 
> 	    ssh -N -R 1430:internal.example.com:143 bastion-server
> 
> 	2. Use "imap.host" to connect to that "remote" box with libcurl,
> 	   but just use "localhost:1430"

Having done something like that before, the "arrange" step is more
finicky than you might think (because sometimes it goes away, and you
really want to trigger it on demand).

-Peff

  parent reply	other threads:[~2023-02-07 22:15 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-01 11:31 [PATCH 1/2] Makefile: not use mismatched curl_config to check version Jiang Xin
2023-02-01 11:31 ` [PATCH 2/2] imap-send: not define USE_CURL_FOR_IMAP_SEND in Makefile Jiang Xin
2023-02-01 23:04   ` [PATCH] imap-send: replace auto-probe libcurl with hard dependency Ævar Arnfjörð Bjarmason
2023-02-01 23:22     ` Junio C Hamano
2023-02-01 23:56       ` Ævar Arnfjörð Bjarmason
2023-02-02  1:32         ` Junio C Hamano
2023-02-01 23:59       ` Jeff King
2023-02-02  0:20         ` Ævar Arnfjörð Bjarmason
2023-02-02  9:44     ` [PATCH v2 0/6] " Ævar Arnfjörð Bjarmason
2023-02-02  9:44       ` [PATCH v2 1/6] imap-send: note "auth_method", not "host" on auth method failure Ævar Arnfjörð Bjarmason
2023-02-02 19:11         ` Junio C Hamano
2023-02-02  9:44       ` [PATCH v2 2/6] imap-send doc: the imap.sslVerify is used with imap.tunnel Ævar Arnfjörð Bjarmason
2023-02-02  9:44       ` [PATCH v2 3/6] imap-send: replace auto-probe libcurl with hard dependency Ævar Arnfjörð Bjarmason
2023-02-02 19:33         ` Junio C Hamano
2023-02-02  9:44       ` [PATCH v2 4/6] imap-send: make --curl no-optional Ævar Arnfjörð Bjarmason
2023-02-02 20:42         ` Junio C Hamano
2023-02-03 21:46           ` Ævar Arnfjörð Bjarmason
2023-02-04  5:22             ` Junio C Hamano
2023-02-02  9:44       ` [PATCH v2 5/6] imap-send: remove old --no-curl codepath Ævar Arnfjörð Bjarmason
2023-02-02 20:43         ` Junio C Hamano
2023-02-02  9:44       ` [PATCH v2 6/6] imap-send: correctly report "host" when using "tunnel" Ævar Arnfjörð Bjarmason
2023-02-02 20:56         ` Junio C Hamano
2023-02-03 17:53         ` Jeff King
2023-02-03 21:12           ` Ævar Arnfjörð Bjarmason
2023-02-04 11:09             ` Jeff King
2023-02-05 21:51               ` Ævar Arnfjörð Bjarmason
2023-02-07 18:30                 ` Jeff King
2023-02-07 20:39                   ` Ævar Arnfjörð Bjarmason
2023-02-07 21:26                     ` Junio C Hamano
2023-02-07 22:04                       ` Ævar Arnfjörð Bjarmason
2023-02-07 22:16                       ` Jeff King
2023-02-07 22:15                     ` Jeff King [this message]
2023-02-07 22:24                       ` Junio C Hamano
2023-02-08  1:06                       ` Ævar Arnfjörð Bjarmason
2023-02-17 20:50                         ` Jeff King
2023-02-06 21:41               ` Junio C Hamano
2023-02-01 18:06 ` [PATCH 1/2] Makefile: not use mismatched curl_config to check version Junio C Hamano

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=Y+LNitGAude1vogv@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=ockham@raz.or.at \
    --cc=repk@triplefau.lt \
    --cc=worldhello.net@gmail.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).