work around idn short comings in minidns
This commit is contained in:
parent
7cbef529ae
commit
da00a58902
|
@ -80,7 +80,7 @@ public class Resolver {
|
|||
}
|
||||
List<Result> list = new ArrayList<>();
|
||||
try {
|
||||
ResolverResult<D> results = resolveWithFallback(srv.name,type, !authenticated);
|
||||
ResolverResult<D> 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;
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue