1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-27 14:32:06 +01:00

SOCKS5 WERKSgit add .

This commit is contained in:
vanitasvitae 2017-06-14 18:25:46 +02:00
parent f3c1eebd05
commit e6e2a6cd08
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
2 changed files with 5 additions and 2 deletions

View file

@ -11,6 +11,7 @@ import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smack.XMPPException;
import org.jivesoftware.smackx.bytestreams.socks5.Socks5BytestreamSession;
import org.jivesoftware.smackx.bytestreams.socks5.Socks5Client;
import org.jivesoftware.smackx.bytestreams.socks5.Socks5ClientForInitiator;
import org.jivesoftware.smackx.bytestreams.socks5.Socks5Proxy;
import org.jivesoftware.smackx.bytestreams.socks5.packet.Bytestream;
import org.jivesoftware.smackx.jingle.JingleSessionHandler;
@ -219,7 +220,9 @@ public class JingleS5BTransportHandler implements JingleTransportHandler<JingleS
// establish socket
try {
final Socks5Client socks5Client = new Socks5Client(streamHost, digest);
final Socks5ClientForInitiator socks5Client = new Socks5ClientForInitiator(streamHost, digest, getConnection(),
parent.sessionHandler.getFullJidAndSessionId().getSessionId(),
parent.sessionHandler.getFullJidAndSessionId().getFullJid());
connectedSocket = socks5Client.getSocket(10 * 1000);
LOGGER.log(Level.INFO, "Connected to " + address + " using " + digest);
}

View file

@ -40,7 +40,7 @@ import org.jxmpp.jid.Jid;
*
* @author Henning Staib
*/
class Socks5ClientForInitiator extends Socks5Client {
public class Socks5ClientForInitiator extends Socks5Client {
/* the XMPP connection used to communicate with the SOCKS5 proxy */
private WeakReference<XMPPConnection> connection;