git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Shaoxuan Yuan <shaoxuan.yuan02@gmail.com>
To: "brian m. carlson" <sandals@crustytoothpaste.net>,
	Shaoxuan Yuan <shaoxuan.yuan02@gmail.com>,
	Git List <git@vger.kernel.org>
Subject: Re: How to get git-send-email use a proxy?
Date: Fri, 8 Apr 2022 17:01:01 +0800	[thread overview]
Message-ID: <CAJyCBOTwsGtkEFuPHosQ-v6xot051OCRWh1QdmqMk3gucuEnPQ@mail.gmail.com> (raw)
In-Reply-To: <Yk9dOoit/Ua69s7A@camp.crustytoothpaste.net>

On Fri, Apr 8, 2022 at 5:53 AM brian m. carlson
<sandals@crustytoothpaste.net> wrote:
>
> On 2022-04-06 at 14:19:43, Shaoxuan Yuan wrote:
> > Greetings, Git community,
> >
> > I'm using git-send-email with Git 2.35.1 under system
> > 5.4.72-microsoft-standard-WSL2, x86_64 GNU/Linux.
> >
> > I am on a system-wide socks5 proxy. Although I set the global
> > .gitconfig to use the socks5 proxy trying to send emails, the
> > connection to the SMTP server seems does not go through the proxy at
> > all.
> >
> > Other git commands do go through the globally set .gitconfig proxy,
> > git-send-email seems to be an exception.
>
> I think you're referring to http.proxy.  That affects only HTTP, HTTPS,
> and FTP (if we even still support that).  All of those protocols are
> handled by libcurl, which includes native proxy support.  It doesn't
> affect other protocols like SSH or SMTP.
>
> > So I'm wondering if there needs to be a code change in
> > 'git-send-email.perl' to run the connection through a proxy, or I just
> > need to tune the setting to accomplish this?
>
> git send-email is written in Perl and doesn't use libcurl, so it doesn't
> have proxy support.  If there's a particular optional module we could
> dynamically load to provide proxy support, that's an option we could
> support if someone wanted to provide a patch.
>
> In the mean time, you could also try using some sort of tool, like
> socat, to bind a local port tunnelling over the proxy to the destination
> server and then use SMTP over that local port to connect.
> --
> brian m. carlson (he/him or they/them)
> Toronto, Ontario, CA

Thanks, it's pretty informative ;-)

-- 
Thanks & Regards,
Shaoxuan

  reply	other threads:[~2022-04-08  9:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-06 14:19 How to get git-send-email use a proxy? Shaoxuan Yuan
2022-04-07 21:52 ` brian m. carlson
2022-04-08  9:01   ` Shaoxuan Yuan [this message]
2022-04-08 11:51     ` Ævar Arnfjörð Bjarmason
2022-04-08 12:03       ` Shaoxuan Yuan

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJyCBOTwsGtkEFuPHosQ-v6xot051OCRWh1QdmqMk3gucuEnPQ@mail.gmail.com \
    --to=shaoxuan.yuan02@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=sandals@crustytoothpaste.net \
    /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.
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 NNTP newsgroup(s).