Java JDBC Connection using Socks
问题 Using Java, I need to connect to a SQL Server database using JDBC. I need to go through our companies SOCKS proxy, so I did this and it appeared to work. Connection conn = null; Properties systemProperties = System.getProperties(); systemProperties.setProperty("socksProxyHost","socksproxy.domain.com"); systemProperties.setProperty("socksProxyPort","1081"); connectionUrl = "jdbc:sqlserver://1.2.3.4:60304;databaseName=myDatabase;sslProtocol=TLSv1.2;"; Class.forName("com.microsoft.sqlserver.jdbc