In my Play 2 app, I am calling a Scala wrapper around java.net.URL, Bee Client. According to the docs, java.net.URL supports proxy but I can’t find the details on how and what to set for environment variables.
I have tried, without success,
export proxySet=true
export proxyHost=my-proxy-server
export proxyPort=1080
Any help will be much appreciated.
UPDATED:
After digging further, they aren’t environment variables but rather JVM command line arguments as also noted by Rick. However, I have tried the following also without success
export JAVA_OPTS="$JAVA_OPTS -Dhttp.proxyHost=my-proxy-server -Dhttp.proxyPort=1080"
sbt -Dhttp.proxyHost=my-proxy-server -Dhttp.proxyPort=1080 test
Note that I am passing the arguments to sbt test.
I figured it out, I also need to pass the socks proxy setting, could be specific to my company’s network but here is what works for me