Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] HTTPS and ProxyServlet

Hi,

On Fri, Apr 8, 2016 at 10:37 AM, Mark Wang <mark.wu.wang@xxxxxxxxx> wrote:
> Hi,
> I'm using Jetty 9.3.5, and take advantage of ProxyServlet as a tunnel proxy.
> Please consider the following test codes,
>
> ********************************
> SslContextFactory sslContextFactory = new SslContextFactory();
> sslContextFactory.setSslContext(sslContext);
>
> HttpClient client = new HttpClient(sslContextFactory);
> client.getProxyConfiguration().getProxies().add(new HttpProxy(new
> Origin.Address(host, port), true));
> client.start();

Here, "host" and "port" refer to the proxy.

> String url = "http://host:port/xxx";;

Here, you use the proxy's host and port, which is wrong.
You should use the server's host and port.

-- 
Simone Bordet
----
http://cometd.org
http://webtide.com
Developer advice, training, services and support
from the Jetty & CometD experts.


Back to the top