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

Re: How to get git-send-email use a proxy?

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Apr 7, 2022, 21:52 UTC
Message-ID
<Yk9dOoit/Ua69s7A@camp.crustytoothpaste.net>
In-Reply-To
<CAJyCBOSAekywgzVSf1uGb8s+hY7a7A=0fC5kFhMVpiqS1KEw4w@mail.gmail.com>
On 2022-04-06 at 14:19:43, Shaoxuan Yuan wrote:
Show 12 quoted lines
> 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
Previous: Shaoxuan YuanNext: Shaoxuan Yuan
Message 2 of 5 in “How to get git-send-email use a proxy?”
  1. Shaoxuan YuanApr 6, 2022
  2. brian m. carlsonApr 7, 2022
  3. Shaoxuan YuanApr 8, 2022
  4. Ævar Arnfjörð BjarmasonApr 8, 2022
  5. Shaoxuan YuanApr 8, 2022

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.