Examples of Socks5ClientForInitiator


Examples of org.jivesoftware.smackx.bytestreams.socks5.Socks5ClientForInitiator

        streamHost.setPort(socks5Proxy.getPort());

        // create digest to get the socket opened by target
        String digest = Socks5Utils.createDigest(sessionID, initiatorJID, targetJID);

        Socks5ClientForInitiator socks5Client = new Socks5ClientForInitiator(streamHost, digest,
                        connection, sessionID, targetJID);

        try {
            socks5Client.getSocket(10000);

            fail("exception should be thrown");
        }
        catch (XMPPException e) {
            assertTrue(e.getMessage().contains("target is not connected to SOCKS5 proxy"));
View Full Code Here

Examples of org.jivesoftware.smackx.bytestreams.socks5.Socks5ClientForInitiator

        targetThread.start();

        Thread.sleep(200);

        // initiator connects
        Socks5ClientForInitiator socks5Client = new Socks5ClientForInitiator(streamHost, digest,
                        connection, sessionID, targetJID);

        Socket socket = socks5Client.getSocket(10000);

        // verify test data
        InputStream in = socket.getInputStream();
        for (int i = 0; i < data.length; i++) {
            assertEquals(data[i], in.read());
View Full Code Here

Examples of org.jivesoftware.smackx.bytestreams.socks5.Socks5ClientForInitiator

        streamHost.setPort(socks5Proxy.getPort());

        // create digest to get the socket opened by target
        String digest = Socks5Utils.createDigest(sessionID, initiatorJID, targetJID);

        Socks5ClientForInitiator socks5Client = new Socks5ClientForInitiator(streamHost, digest,
                        connection, sessionID, targetJID);

        try {

            socks5Client.getSocket(10000);

            fail("exception should be thrown");
        }
        catch (XMPPException e) {
            assertTrue(e.getMessage().contains("activating SOCKS5 Bytestream failed"));
View Full Code Here

Examples of org.jivesoftware.smackx.bytestreams.socks5.Socks5ClientForInitiator

        streamHost.setPort(socks5Proxy.getPort());

        // create digest to get the socket opened by target
        String digest = Socks5Utils.createDigest(sessionID, initiatorJID, targetJID);

        Socks5ClientForInitiator socks5Client = new Socks5ClientForInitiator(streamHost, digest,
                        connection, sessionID, targetJID);

        Socket initiatorSocket = socks5Client.getSocket(10000);
        InputStream in = initiatorSocket.getInputStream();

        Socket targetSocket = socks5Proxy.getSocket(digest);
        OutputStream out = targetSocket.getOutputStream();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.