thsmi / sieve

Sieve Script Editor
GNU Affero General Public License v3.0
729 stars 56 forks source link

Proxy support (electron) #901

Open ekes opened 9 months ago

ekes commented 9 months ago

Maybe a support request, maybe a feature request?

With electron apps you can usually pass --proxy-server argument and get it to use a socks proxy (ala chrome); but it seems I can't do this with the AppImage?

What would be the best way here of using a proxy in the post-Thunderbird world.

thsmi commented 9 months ago

The short version: It is definitely a feature request. Currently there is no proxy support in the app.

The long version:

Electron is basically a Chromium side by side with a Node.js means it is shipped with two completely independent networking stacks.

The chromium side would offer proxy support but only for http based communication. There is no API for not HTTP communication. Means this can't be used for sieve as it is needs a TCP Socket.

The node side offer access to TCP Sockets but they do not support proxies at all. And most likely never will, because the devs regard proxies a defunct relict of the past.

So the only way to get socks support into the application is by adding/implementing a socks proxy client into the sieve communication stack. A socks client is not too hard to implement, I did this many years ago but it is definitely a ton of work.

Makes this unlikely to land anytime soon.

Currently the only workaround I can think of is using such a proxify application. It is basically a proxy which talks to the proxy. There are tons out there, but which one works highly depends on your use-case.