Jetty(9.2.13)带有Socks4Proxy的HTTP客户端挂起

时间:2018-01-15 10:51:55

标签: java jetty burp

我正在使用在后台运行的Burp代理服务器。 我已将cacert.der插入到我的eclipse指向的java信任库中。

现在我有以下代码: .................................................. .........................

SslContextFactory sslContextFactory = new SslContextFactory();
HttpClient httpClient = new HttpClient(sslContextFactory);
httpClient.start();
Address address = new Address("127.0.0.1",8082);
Socks4Proxy socks4Proxy = new Socks4Proxy(address, true);
proxyConfiguration.getProxies().add(socks4Proxy);
Request request = httpClient.newRequest(
new URI("https://google.com"));
request.method(HttpMethod.GET);

ContentResponse contentResponse = request.send();
System.out.println(contentResponse.getContentAsString());    

............................................... ............................

上面的代码给出了以下错误:

线程“main”中的异常java.util.concurrent.ExecutionException:java.io.IOException:SOCKS4隧道失败,代码为84 at org.eclipse.jetty.client.util.FutureResponseListener.getResult(FutureResponseListener.java:118) at org.eclipse.jetty.client.util.FutureResponseListener.get(FutureResponseListener.java:101) 在org.eclipse.jetty.client.HttpRequest.send(HttpRequest.java:653) 在Get.main(Get.java:43) .................................................. .............................

有谁能建议我如何解决这个问题?

0 个答案:

没有答案