Question: how can I force Java not to resolve some hostnames to IP addresses.
In my application, I am using Socks proxy to make connections to external sites. Our socks proxy server is configured in such a way that it can only accept URL's "www.google.com" and not the resolved IP addresses like "xxx.xxx.xx.xx".
This socks proxy connections are done within another api on whose code I don't have control. I just wrote a proxyselector and made sure that whenever certain URLS are being called, it will be going through our proxy server. This logic seems to work in our lower environments . but in production boxes, somehow the URLS that are being sent to socks proxy are resolved IP's rather than URLS.
My Question, how can I force Java not to resolve hostnames that go through socks proxy.
Thanks.
Regards, Hariharan