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.)

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.)

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.

1 Like

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?

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!)

1 Like