I have a kind of Http-Gateway app, which acts as an http client towards servers outside our local network.
There is going to be a network configuration upgrade, and
I can see no good solution but have two poor possibilities:
Proxy the connections locally:
Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress(
"proxy", 5555));
URLConnection urlConnection = url.openConnection(proxy);
Register a custom URLStreamHandlerFactory with java.net.URL. Whenever openConnection() is called on the URL it would be handled by this registered custom factory, giving you control over details of the socket connection. Either use Apache's implementation or roll your own?
Url.setURLStreamHandlerFactory(URLStreamHandlerFactory fac)