-
Notifications
You must be signed in to change notification settings - Fork 418
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE REQUEST] Add connection properties to use proxy server like proxyHost and proxyPort #1788
Comments
hi @rikat-ms Java supports proxies via the https.proxyHost and https.proxyPort system properties: https://docs.oracle.com/javase/8/docs/technotes/guides/net/proxies.html These settings get used by the underlying libraries in MSAL4J. There isn’t anything needed in the JDBC driver to propagate those down. |
Hi @lilgreenbird, Thank you for your comment. I think it's not "https.proxyHost" but socksProxyHost because SQL Connectivity uses Socket. JRE-wide settings would help as you mentioned and as I wrote "In this case, users have to change system proxyHost/proxyPort setting". However, this request is for the scenario users want to use "socketFactoryClass" option instead. |
I apologize you are correct. I have added this feature request to our backlog it will be triaged along with other feature requests when we plan for the next semester. Thanks. |
I think the easiest would be to add a factory which then can be used with the mentioned connectionFactoryClass attribute (as it exists in the classpath). That class can then configure a proxy selector and use normal SocketImpl. I wonder if there is an syntax to configure proxy from a string (property). |
This would be helpful for me, to match the functionality that Oracle's JDBC driver offers: https://docs.oracle.com/en/database/oracle/oracle-database/23/jjdbc/data-sources-and-URLs.html#GUID-8D0ADAE6-B8EF-4E02-85E3-15C2509ACBD8 |
Is your feature request related to a problem? If so, please give a short summary of the problem and how the feature would resolve it
Using socketFactoryClass option introduced in Microsoft JDBC Driver 8.4 enables users to connect to SQL Server via a proxy server. This is useful only for developers who develop own Java applications, but this doesn't help users to use the third-party applications with JDBC driver because such applications accept only connection string and don't provide opportunities to implement custom socket class. In this case, users have to change system proxyHost/proxyPort setting if possible or ask the third-party application providers to implement custom socket factory.
Describe the preferred solution
As using proxy servers is very common recently, it would be helpful for users if JDBC driver could have options for proxy like proxyhost and proxyport as the connection properties.
Reference Documentations/Specifications
https://docs.microsoft.com/en-us/sql/connect/jdbc/setting-the-connection-properties?view=sql-server-ver15
#1223
The text was updated successfully, but these errors were encountered: