Configure JDBC to use SOCKS proxy
A PHP Error was encountered
Severity: Notice
Message: Undefined index: userid
Filename: views/question.php
Line Number: 191
Backtrace:
File: /var/www/html/cnasolution/application/views/question.php
Line: 191
Function: _error_handler
File: /var/www/html/cnasolution/application/controllers/Questions.php
Line: 419
Function: view
File: /var/www/html/cnasolution/index.php
Line: 315
Function: require_once
Configure JDBC to use SOCKS proxy
I'm trying to access an MS SQL database via JDBC. My code looks similar to this using the com.microsoft.sqlserver.jdbc.SQLServerDriver package:
SQLServerDataSource ds = new SQLServerDataSource(); ds.setIntegratedSecurity(true); ds.setServerName("{IP Address}"); ds.setPortNumber({Port}); ds.setDatabaseName("{db name}");
I need to setup the connection to route through a SOCKS proxy. I can't and dont' want to set the proxy globally as it has negative impacts to the rest of the system. I was hoping somthing like ds.setProxy() would exist, but in the absense of such a method I'm not sure how to move forward.
Does anyone know if it's possible to configure a SOCKS proxy for a JDBC database connection object?