1 Answer
  • 0
Votes
name

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

name Punditsdkoslkdosdkoskdo

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?

Download script demo [LINK]
Download script demo [LINK 2] Download script demo [LINK 2]

This topic describes how to connect to SQL Server through a proxy server in SQL Server 2019 (15.x) by using SQL Server Configuration Manager. To listen remotely by way of Remote WinSock (RWS), define the local address table (LAT) for the proxy server so that the listening node address is outside the range of LAT entries.

Using SQL Server Configuration Manager

To enable connections to SQL Server through Microsoft Proxy Server

  1. Follow the steps in Configure a Server to Listen on a Specific TCP Port (SQL Server Configuration Manager) to determine which TCP/IP ports are used by the Database Engine, or to configure the Database Engine to use a desired port.

  2. In your proxy server define the local address table (LAT) for the proxy server so that the listening node address is outside the range of LAT entries. For more information, see your proxy server documentation.

see demo
  • 0
Reply Report