-
Notifications
You must be signed in to change notification settings - Fork 542
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
Connection-scoped proxy support for Java/JDBC client #1338
Comments
Hi @ngucandy! Currently, the ClickHouse JDBC driver does not have a specific option for configuring a proxy per connection. However, the library uses HttpURLConnection by default to access the ClickHouse server. You can set up a JVM-wide proxy using system properties as mentioned in the Java documentation. Keep in mind that this will apply the proxy settings to all connections in your application. If you need a quick workaround to specify a proxy for a single connection, consider using chproxy, a ClickHouse proxy server, in conjunction with different DNS configurations for the backend. This approach allows you to route ClickHouse connections through different proxies based on the backend DNS configuration, providing a more granular control over your connections. |
@zhicwu Thanks for confirming this isn't something currently supported. Unfortunately, using chproxy would not be a "quick" workaround for us. We actually have our own proxy implementation that we must use to allow for secure connections between our application servers and our user's databases (which often sit behind a corporate firewall). I see that Lines 106 to 108 in 5dddbf5
Is it feasible to modify this approach so that different types of proxies could be passed in instead? For example, change the current option
This should allow the construction of a |
I'm using the ClickHouse JDBC client in a multi-tenant server application that allows users to connect to several different databases. Many JDBC drivers allow configuration of HTTP(S) or SOCKS proxies that are scoped only to a single connection. I don't see any way to do this with ClickHouse JDBC. If this is possible, can someone point me in right direction? If this isn't possible, how do I submit an enhancement request to add this ability?
The text was updated successfully, but these errors were encountered: