Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] ConnectHandler on HTTPS to Upstream Proxy


I am making use of the proxy capabilities with Jetty in the following manner:


        SelectChannelConnector connector = new SelectChannelConnector();



        HandlerCollection handlers = new HandlerCollection();


        ServletContextHandler context = new ServletContextHandler(handlers, "/", ServletContextHandler.SESSIONS);

        ServletHolder proxyServlet = new ServletHolder(testClassServlet);


        context.addServlet(proxyServlet, "/*");


        // A CONNECT handler allows SSL connections but does not support an upstream proxy

        ConnectHandler proxy = new ConnectHandler();




The problem I currently have is that this will work so long as you have a direct connection to the internet.  If you are working with an upstream HTTP proxy, the HTTP insecure content will work fine and be handled by my servlet but anything HTTPS which will be handled by ConnectHandler is not.  Is there a way to configure the ConnectHandler to support an upstream proxy?






Zach Calvert



Back to the top