diff options
author | Christian Schneppe <christian@pix-art.de> | 2019-01-27 12:44:04 +0100 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2019-01-27 12:44:04 +0100 |
commit | a53f01ed7adaf3cd0e39c3c313d3427b2f978f2f (patch) | |
tree | 625f634e094bc5829c47da47b4ff441a857e312c /src/main | |
parent | 30e6ac6324fa87d19b8e67252ceb5b2dddc2fd02 (diff) |
do not require starttls when connecting over to .onion domain
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/de/pixart/messenger/xmpp/XmppConnection.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java b/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java index 705a3178d..2c736493e 100644 --- a/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java +++ b/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java @@ -286,7 +286,7 @@ public class XmppConnection implements Runnable { } } else if (useTor) { String destination; - if (account.getHostname().isEmpty()) { + if (account.getHostname().isEmpty() || account.isOnion()) { destination = account.getServer(); } else { destination = account.getHostname(); @@ -866,7 +866,7 @@ public class XmppConnection implements Runnable { private void processStreamFeatures(final Tag currentTag) throws XmlPullParserException, IOException { this.streamFeatures = tagReader.readElement(currentTag); - final boolean isSecure = features.encryptionEnabled || Config.ALLOW_NON_TLS_CONNECTIONS; + final boolean isSecure = features.encryptionEnabled || Config.ALLOW_NON_TLS_CONNECTIONS || account.isOnion(); final boolean needsBinding = !isBound && !account.isOptionSet(Account.OPTION_REGISTER); if (this.streamFeatures.hasChild("starttls") && !features.encryptionEnabled) { sendStartTLS(); |