snowflake-jdbc
snowflake-jdbc copied to clipboard
SNOW-519633: useProxy=false Connection Parameter Can't Override JVM Proxy Settings
In the scenario where the host JVM has proxy settings and the user wants to override those on the connection level by disabling proxy altogether, setting useProxy=false in the connection string doesn't help.
The workaround is to use a hack by setting the following connection parameters:
useProxy=true
proxyHost=127.2.2.2
proxyPort=999
nonProxyHosts=*
ProxyHost and ProxyPort parameters are irrelevant and they can point to anything since we're bypassing the proxy for connections to any host using nonProxyHosts=*.
This is due to how the code is structured in SFBaseSession where we set useProxy=false as the default value. We don't act on that parameter unless it was explicitly set to true by the user.
The code needs to be rewritten so that we're not forced to set a default value to that parameter. For example, we can check if this has been set on the connection level, and in that case, we should honor that regardless of its value by ignoring anything else set on the JVM level. If not, then check what has been set on the JVM and use that instead.
recreate jira
@sfc-gh-wfateem Please create a ticket using new system.
To clean up and re-prioritize more pressing bugs and feature requests we are closing all issues older than 6 months as of March 1, 2023. If there are any issues or feature requests that you would like us to address, please create them according to the new templates we have created. For urgent issues, opening a support case with this link Snowflake Community is the fastest way to get a response.