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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux