Reputation: 173
For some reason, I have to connect mysql with socks proxy during the development, and the program uses druid as datasource.
I've tried to add vm option -Dhttp.proxyHost=host -Dhttp.proxyPort=port
in idea's run/debug configurations, and set JAVA_OPTS="$JAVA_OPTS -Dhttp.proxyHost=host -Dhttp.proxyPort=port"
in catalina.sh, but neither of them works.
I wonder is there any way to connect datasource while using proxy? Thanks for your helping!
Upvotes: 1
Views: 948
Reputation: 21
From https://docs.oracle.com/javase/8/docs/technotes/guides/net/proxies.html
Try -DsocksProxyHost=socks.example.com - DsocksProxyPort=1080
Upvotes: 1