0

I know it's possible to set the socks proxy server via network app and there is a Mac specific utility to set it but I prefer to just set the socks proxy server as an environment variable if possible. Does anyone know the appropriate export setting?

In case anyone is wondering this is possible for http proxy, for example, export http_proxy=http://my-proxy-server:1080/ get picked up by the JVM as http.proxyPort=1080 and http.proxyHost=my-proxy-server. When passed as Mac system level setting, socks proxy is seen as socksProxyHost=my-socks-proxy-server but I can't determine the equivalent environment variable name.

Bob
  • 8,424
  • 17
  • 72
  • 110

1 Answers1

0

I couldn't find the appropriate environment variable to set but found an alternate solution. Adding this to bash_profile works for me

export _JAVA_OPTIONS="-Dhttp.proxyHost=my-proxy-server -Dhttp.proxyPort=1080 -DsocksProxyHost=my-socks-server"
Bob
  • 8,424
  • 17
  • 72
  • 110