Removed SOCKS5 proxy support

This commit is contained in:
M66B
2020-06-26 11:09:57 +02:00
parent 6867f9ab6b
commit 9a9b4c8660
5 changed files with 2 additions and 96 deletions

View File

@@ -145,25 +145,8 @@ public class EmailService implements AutoCloseable {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
this.harden = prefs.getBoolean("ssl_harden", false);
boolean socks_enabled = prefs.getBoolean("socks_enabled", false);
String socks_proxy = prefs.getString("socks_proxy", "localhost:9050");
boolean auth_sasl = prefs.getBoolean("auth_sasl", true);
// SOCKS proxy
if (socks_enabled) {
String[] address = socks_proxy.split(":");
String host = (address.length > 0 ? address[0] : null);
String port = (address.length > 1 ? address[1] : null);
if (TextUtils.isEmpty(host))
host = "localhost";
if (TextUtils.isEmpty(port))
port = "9050";
properties.put("mail." + protocol + ".socks.host", host);
properties.put("mail." + protocol + ".socks.port", port);
Log.i("Using SOCKS proxy=" + host + ":" + port);
}
properties.put("mail.event.scope", "folder");
properties.put("mail.event.executor", executor);