Package net.lightbody.bmp.proxy.jetty.util

Examples of net.lightbody.bmp.proxy.jetty.util.InetAddrPort


    public void handleConnectOriginal(String pathInContext, String pathParams, HttpRequest request, HttpResponse response) throws HttpException, IOException {
        URI uri = request.getURI();

        try {
            LOG.fine("CONNECT: " + uri);
            InetAddrPort addrPort;
            // When logging, we'll attempt to send messages to hosts that don't exist
            if (uri.toString().endsWith(".selenium.doesnotexist:443")) {
                // so we have to do set the host to be localhost (you can't new up an IAP with a non-existent hostname)
                addrPort = new InetAddrPort(443);
            } else {
                addrPort = new InetAddrPort(uri.toString());
            }

            if (isForbidden(HttpMessage.__SSL_SCHEME, addrPort.getHost(), addrPort.getPort(), false)) {
                sendForbid(request, response, uri);
            } else {
                HttpConnection http_connection = request.getHttpConnection();
                http_connection.forceClose();
View Full Code Here


        }
    }

    private SslRelayOdo getSslRelayOrCreateNewOdo(URI uri, InetAddrPort addrPort, HttpServer server) throws Exception {
      URI realURI = requestOriginalURI.get();
      InetAddrPort realPort = new InetAddrPort(realURI.toString());
      LOG.info("GETSSLRELAY: {}, {}", realURI, realPort);
      String host = new URL("https://" + realURI.toString()).getHost();
     
      // create a host and port string so the listener sslMap can be keyed off the combination
      String hostAndPort = host.concat(String.valueOf(realPort.getPort()));
      LOG.info("getSSLRelay host: {}", hostAndPort);
      SslRelayOdo listener = null;
     
      synchronized(_sslMap) {
        listener = _sslMap.get(hostAndPort);
View Full Code Here

        //create a stream manager that will be capped to 100 Megabits
        //remember that by default it is disabled!
        streamManager = new StreamManager( 100 * BandwidthLimiter.OneMbps );

        server = new Server();
        HttpListener listener = new SocketListener(new InetAddrPort(getLocalHost(), getPort()));
        server.addListener(listener);
        HttpContext context = new HttpContext();
        context.setContextPath("/");
        server.addContext(context);

View Full Code Here

TOP

Related Classes of net.lightbody.bmp.proxy.jetty.util.InetAddrPort

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.