mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-30 20:52:21 -05:00
always use ipv4 localhost for Orbot connections
This commit is contained in:
parent
1339b9c464
commit
bb48f67a30
@ -12,6 +12,8 @@ import eu.siacs.conversations.Config;
|
||||
|
||||
public class SocksSocketFactory {
|
||||
|
||||
private static final byte[] LOCALHOST = new byte[]{127,0,0,1};
|
||||
|
||||
public static void createSocksConnection(Socket socket, String destination, int port) throws IOException {
|
||||
InputStream proxyIs = socket.getInputStream();
|
||||
OutputStream proxyOs = socket.getOutputStream();
|
||||
@ -44,7 +46,7 @@ public class SocksSocketFactory {
|
||||
}
|
||||
|
||||
public static Socket createSocketOverTor(String destination, int port) throws IOException {
|
||||
return createSocket(new InetSocketAddress(InetAddress.getLocalHost(), 9050), destination, port);
|
||||
return createSocket(new InetSocketAddress(InetAddress.getByAddress(LOCALHOST), 9050), destination, port);
|
||||
}
|
||||
|
||||
static class SocksConnectionException extends IOException {
|
||||
|
Loading…
Reference in New Issue
Block a user