I'm using Burp's proxy server which is running in background. I have inserted the cacert.der into my java trust store to which my eclipse is pointing to.
Now I have the following code : ...........................................................................
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());
...........................................................................
The above code is giving me the following error :
Exception in thread "main" java.util.concurrent.ExecutionException: java.io.IOException: SOCKS4 tunnel failed with code 84 at org.eclipse.jetty.client.util.FutureResponseListener.getResult(FutureResponseListener.java:118) at org.eclipse.jetty.client.util.FutureResponseListener.get(FutureResponseListener.java:101) at org.eclipse.jetty.client.HttpRequest.send(HttpRequest.java:653) at Get.main(Get.java:43) ...............................................................................
Can anyone suggest me how to resolve this ??