Add Proxy Support

Mailspring’s sync engine doesn’t currently pick up system proxy settings, especially on Windows and Linux, but it should. This makes it unusable when used behind a proxy, including with Tor (Socks5) and behind Corporate proxies.

Duplicate Issues

SMTP error when OpenVPN [Proxy] is connected · Issue #352 · Foundry376/Mailspring · GitHub

Problems running the snap package on openSUSE TW · Issue #459 · Foundry376/Mailspring · GitHub

How to set the Imap, Pop3 or Smtp via HTTP or SOCKS proxy? · Issue #543 · Foundry376/Mailspring · GitHub

Feature Request: Need proxy function · Issue #1820 · Foundry376/Mailspring · GitHub

The overall problem is that “proxy” means a lot of different things (SOCKS, proxies only for HTTP traffic, etc.) Chromium has a /ton/ of code for proxy autodiscovery across platforms (like tens of thousands of lines of code, which is wild…) and I’ve been hoping that Electron will expose an API for reading the auto-discovered proxy settings, which would allow us to apply them to the C++ sync engine easily. Unfortunately I asked about this again recently and the response wasn’t too promising:

image

Even the curl page about proxies talks about a whole bunch of different topics (https://ec.haxx.se/usingcurl-proxies.html). I think we could probably support SOCKS and HTTPS CONNECT proxies (where the certificates and SSL are not broken by the proxy), but it’s a gonna be a lot of work :grimacing:


(Originally posted by bengotow on GitHub.)

1 Like

First of all, thank you for the feedback Ben. Better late than ever, right?

Like you said, proxies might mean a lot of different things to different people.
In that case, how about taking the MVP route and aim to provide http proxy support at first, then implement the other types of proxies later on?

Taking the MVP way, I would start out by implementing http proxy support at first, with all data required [proxy address, port, username and password] being manually inputed by the user.
Later on I would add support for discovery, environment methods, scripts and other authentication methods.

Thanks.


(Originally posted by luizlinux on GitHub.)

1 Like

As suggested by Jason on GitHub, I’m replying to the issue so the moderators can make an effort to reassign the post to me.

Thanks for not letting this die.

2 Likes

Why do we need internet access when the app starts up? It says it is trying to get to getmailspring.com, but should that actually be necessary? SMTP and IMAP traffic don’t actually go through HTTP anyway, so could it be possible to not require that HTTP communication anyway?

Do I need to have a mailspring account to use it or something along those lines?

1 Like

Hi @zicklag,

Yes, Mailspring ID is required at this time. We’re considering making it optional in a later release.

(Also, OMW, hi!! Long time no chat!)

2 Likes

For people who use Gmail in China like me, this proxy support is very much needed, hope it will come true soon :grinning:

2 Likes

Any update for this? the proxy should apply to mailspring itself and IMAP/SMPT/POP connect. I’m from China, and I can not add my Gmail account to mailspring, because it’s blocked, I try to use proxychains, but it doesn’t work.

Me too!Or we’d choose transparent proxy(although it sometimes feels like a kick on the ass)

+1
Or anyone has some alternative methods?

+1 Is there any workaround method for now?
I used clashx enhanced mod, but doesn’t work when sending a email