diff --git a/src/main/java/eu/siacs/conversations/utils/Resolver.java b/src/main/java/eu/siacs/conversations/utils/Resolver.java index 075447be6..fb1f05239 100644 --- a/src/main/java/eu/siacs/conversations/utils/Resolver.java +++ b/src/main/java/eu/siacs/conversations/utils/Resolver.java @@ -80,7 +80,7 @@ public class Resolver { } List list = new ArrayList<>(); try { - ResolverResult results = resolveWithFallback(srv.name,type, !authenticated); + ResolverResult results = resolveWithFallback(DNSName.from(srv.name.toString()),type, !authenticated); for (D record : results.getAnswersOrEmptySet()) { Result resolverResult = Result.fromRecord(srv, directTls); resolverResult.authenticated = results.isAuthenticData() && authenticated; diff --git a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java index a07fad235..c49eb82f5 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java +++ b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java @@ -18,6 +18,7 @@ import java.io.IOException; import java.io.InputStream; import java.math.BigInteger; import java.net.ConnectException; +import java.net.IDN; import java.net.InetAddress; import java.net.InetSocketAddress; import java.net.Socket; @@ -369,7 +370,7 @@ public class XmppConnection implements Runnable { + ": using values from dns " + result.getHostname().toString() + "/" + result.getIp().getHostAddress() + ":" + result.getPort() + " tls: " + features.encryptionEnabled); } else { - addr = new InetSocketAddress(result.getHostname().toString(), result.getPort()); + addr = new InetSocketAddress(IDN.toASCII(result.getHostname().toString()), result.getPort()); Log.d(Config.LOGTAG, account.getJid().toBareJid().toString() + ": using values from dns " + result.getHostname().toString() + ":" + result.getPort() + " tls: " + features.encryptionEnabled);