Okay, I figured it out myself. In this point the documentation could be improved.
You just need to add the jar mentioned above to your classpath (dlls are included) and this code helped me to configure the proxy stettings:
ProxySearch proxySearch = new ProxySearch();
proxySearch.addStrategy(Strategy.OS_DEFAULT);
proxySearch.addStrategy(Strategy.JAVA);
proxySearch.addStrategy(Strategy.BROWSER);
ProxySelector proxySelector = proxySearch.getProxySelector();
ProxySelector.setDefault(proxySelector);
URI home = URI.create("
http://mobilogue.collide.info");
System.out.println("ProxySelector: " + proxySelector);
System.out.println("URI: " + home);
List<Proxy> proxyList = proxySelector.select(home);
if (proxyList != null && !proxyList.isEmpty()) {
for (Proxy proxy : proxyList) {
System.out.println(proxy);
SocketAddress address = proxy.address();
if (address instanceof InetSocketAddress) {
String host = ((InetSocketAddress) address).getHostName();
String port = Integer.toString(((InetSocketAddress) address).getPort());
System.setProperty("http.proxyHost", host);
System.setProperty("http.proxyPort", port);
}
}
}
Hope that will help others :)