mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-23 20:42:06 +01:00
Change Dest.Addr
This commit is contained in:
parent
7320d01997
commit
7a7b45ad9b
1 changed files with 4 additions and 3 deletions
|
@ -87,6 +87,7 @@ public class JingleS5BTransportHandler implements JingleTransportHandler<JingleS
|
||||||
final Socks5Client socks5Client = new Socks5Client(streamHost, transport.getDestinationAddress());
|
final Socks5Client socks5Client = new Socks5Client(streamHost, transport.getDestinationAddress());
|
||||||
connectedSocket = socks5Client.getSocket(10 * 1000);
|
connectedSocket = socks5Client.getSocket(10 * 1000);
|
||||||
connectedCandidate = candidate;
|
connectedCandidate = candidate;
|
||||||
|
LOGGER.log(Level.INFO, "Connected to "+address);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
catch (TimeoutException | IOException | SmackException | XMPPException | InterruptedException e) {
|
catch (TimeoutException | IOException | SmackException | XMPPException | InterruptedException e) {
|
||||||
|
@ -208,10 +209,10 @@ public class JingleS5BTransportHandler implements JingleTransportHandler<JingleS
|
||||||
// establish socket
|
// establish socket
|
||||||
try {
|
try {
|
||||||
final Socks5Client socks5Client = new Socks5Client(streamHost,
|
final Socks5Client socks5Client = new Socks5Client(streamHost,
|
||||||
((JingleS5BTransport) sessionHandler.getReceivedContent().getJingleTransports().get(0))
|
((JingleS5BTransport) sessionHandler.getProposedContent().getJingleTransports().get(0))
|
||||||
.getDestinationAddress());
|
.getDestinationAddress());
|
||||||
connectedSocket = socks5Client.getSocket(10 * 1000);
|
connectedSocket = socks5Client.getSocket(10 * 1000);
|
||||||
break;
|
LOGGER.log(Level.INFO, "Connected to " + address);
|
||||||
}
|
}
|
||||||
catch (TimeoutException | IOException | SmackException | XMPPException | InterruptedException e) {
|
catch (TimeoutException | IOException | SmackException | XMPPException | InterruptedException e) {
|
||||||
LOGGER.log(Level.WARNING, "Could not connect to own proxy at " + address + ": " + e, e);
|
LOGGER.log(Level.WARNING, "Could not connect to own proxy at " + address + ": " + e, e);
|
||||||
|
@ -301,7 +302,7 @@ public class JingleS5BTransportHandler implements JingleTransportHandler<JingleS
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
LOGGER.log(Level.INFO, "Established connection with " + parent.usedCandidate.getHost() + " using " + Socks5Proxy.getSocks5Proxy().getLocalAddresses().get(0));
|
||||||
callback.onSessionEstablished(new Socks5BytestreamSession(parent.connectedSocket, parent.usedCandidate.getType() == JingleS5BTransportCandidate.Type.direct));
|
callback.onSessionEstablished(new Socks5BytestreamSession(parent.connectedSocket, parent.usedCandidate.getType() == JingleS5BTransportCandidate.Type.direct));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue