Skip to content

Commit

Permalink
fix oracle proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
guowl3 committed Jan 8, 2025
1 parent db6e18f commit b3ff9d1
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@ public static Map<String, String> getJdbcParams(@NonNull ConnectionConfig connec
if (StringUtils.isNotBlank(proxyHost) && Objects.nonNull(proxyPort)) {
jdbcUrlParams.put("socksProxyHost", proxyHost);
jdbcUrlParams.put("socksProxyPort", proxyPort + "");
jdbcUrlParams.put("oracle.net.socksProxyHost", proxyHost);
jdbcUrlParams.put("oracle.net.socksProxyPort", proxyPort + "");
jdbcUrlParams.put("oracle.jdbc.javaNio", "false");
}
}
SSLConfig sslConfig = connectionConfig.getSslConfig();
Expand Down Expand Up @@ -195,6 +198,7 @@ public static Map<String, String> getJdbcParams(@NonNull ConnectionConfig connec
// prevent local DNS resolution when using a proxy service
if (jdbcUrlParams.containsKey("socksProxyHost")) {
jdbcUrlParams.put("socksProxyRemoteDns", "true");
jdbcUrlParams.put("oracle.net.socksRemoteDNS", "true");
}
return jdbcUrlParams;
}
Expand Down

0 comments on commit b3ff9d1

Please sign in to comment.