Hi team,
I am facing an issue when trying to connect to oracle database. The oracle database TCP connection tunneled through Http proxy. Here, I am trying to connect to database and do not have access directly via internet. When I try to use JDBC thin driver to connect using tcps connection as mentioned in Doc : https://docs.oracle.com/en/database/oracle/oracle-database/21/jjdbc/data-sources-and-URLs.html#GUID-8D0ADAE6-B8EF-4E02-85E3-15C2509ACBD8 .
The issue is the driver default implementation consists of a DNS lookup before connecting to the proxy instead of relying on the DNS resolver of the proxy.
oracle.net.nt.TcpNTAdapter#connect
public void connect() throws IOException {
String var1 = (String)this.socketOptions.get(2);
boolean var2 = Boolean.parseBoolean((String)this.socketOptions.get(18));
if (this.inetAddresses == null) {
**this.inetAddresses = InetAddress.getAllByName(this.host);**
if (var2 && this.inetAddresses.length > 1) {
this.inetAddresses = getAddressesInCircularOrder(this.host, this.inetAddresses);
}
DownHostsCache.getInstance().reorderAddresses(this.inetAddresses, this.port); this.attempts = this.inetAddresses.length; this.count = 0;
}
Do we have any way to skip this host name resolution and let proxy server do the resolution of hostname or any workaround for it.