Examples of Socks5Proxy


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

    public void testSocks5BytestreamWithLocalSocks5Proxy() throws Exception {

        // setup port for local socks5 proxy
        SmackConfiguration.setLocalSocks5ProxyEnabled(true);
        SmackConfiguration.setLocalSocks5ProxyPort(7778);
        Socks5Proxy socks5Proxy = Socks5Proxy.getSocks5Proxy();
        socks5Proxy.start();

        assertTrue(socks5Proxy.isRunning());

        Connection initiatorConnection = getConnection(0);
        Connection targetConnection = getConnection(1);

        // test data
View Full Code Here

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

        boolean isLocalS5Penabled = SmackConfiguration
            .isLocalSocks5ProxyEnabled();

        SmackConfiguration.setLocalSocks5ProxyEnabled(false);

        Socks5Proxy proxy = Socks5Proxy.getSocks5Proxy();

        SmackConfiguration.setLocalSocks5ProxyEnabled(isLocalS5Penabled);

        return proxy;
    }
View Full Code Here

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

     *            boolean flag, if the address is to be inserted in front of the
     *            list. If <code>false</code>, address is added at the end of
     *            the list.
     */
    public static void addProxyAddress(String ip, boolean inFront) {
        Socks5Proxy proxy = getSocks5ProxySafe();

        if (!inFront) {
            proxy.addLocalAddress(ip);
            return;
        }
        ArrayList<String> list = new ArrayList<String>(
            proxy.getLocalAddresses());
        list.remove(ip);
        list.add(0, ip);
        proxy.replaceLocalAddresses(list);
    }
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.