Package com.atlassian.localtunnel.data

Examples of com.atlassian.localtunnel.data.Backend


        System.out.println(String.format("Creating tunnel: '%s' to forward local port '%s' to remote server '%s', with credentials: '%s' ...", tunnelName, port, host, clientName));
        LocalTunnelProtocol protocol = new LocalTunnelProtocol();

        URL hostURL = new URL(host);

        Backend backend = getBackend(hostURL);
        Socket control = createControlSocket(backend);
       
        protocol.sendVersion(control);
        protocol.sendMessage(control,protocol.controlRequest(getTunnelName(), getClientName()));
View Full Code Here


    }

    private Backend getBackend(URL url)
    {
        int backendPort = discoverBackendPort(url);
        return new Backend(url.getHost(), backendPort);
    }
View Full Code Here

    }

    @Override
    public Socket createControlSocket(final Backend backend) throws IOException
    {
        Backend be = backend;
       
        if(null == backend)
        {
            be = getBackend(new URL(host));
        }
        return new Socket(be.getHost(),be.getPort());
    }
View Full Code Here

        return new Socket(be.getHost(),be.getPort());
    }

    public Socket createControlSocket(final Backend backend, Proxy proxy) throws IOException
    {
        Backend be = backend;

        if(null == backend)
        {
            be = getBackend(new URL(host));
        }
       
        Socket socket = new Socket(proxy);
        InetSocketAddress addr = new InetSocketAddress(be.getHost(),be.getPort());
        socket.connect(addr);
        return socket;
    }
View Full Code Here

    @Override
    public void start() throws IOException
    {
        LocalTunnelProtocol protocol = new LocalTunnelProtocol();
        Backend backend = getBackend(host);
        Socket control = createControlSocket(backend);
       
        protocol.sendVersion(control);
        protocol.sendMessage(control,protocol.controlRequest(getTunnelName(), getClientName()));
View Full Code Here

            bPort = Integer.parseInt(bParts[1]);
        }
       
        int backendPort = discoverBackendPort(bHost,bPort);
       
        return new Backend(bHost,backendPort);
    }
View Full Code Here

    }

    @Override
    public Socket createControlSocket(final Backend backend) throws IOException
    {
        Backend be = backend;
       
        if(null == backend)
        {
            be = getBackend(host);
        }
        return new Socket(be.getHost(),be.getPort());
    }
View Full Code Here

        return new Socket(be.getHost(),be.getPort());
    }

    public Socket createControlSocket(final Backend backend, Proxy proxy) throws IOException
    {
        Backend be = backend;

        if(null == backend)
        {
            be = getBackend(host);
        }
       
        Socket socket = new Socket(proxy);
        InetSocketAddress addr = new InetSocketAddress(be.getHost(),be.getPort());
        socket.connect(addr);
        return socket;
    }
View Full Code Here

TOP

Related Classes of com.atlassian.localtunnel.data.Backend

Copyright © 2018 www.massapicom. 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.