What Java properties to pass to a Java app to authenticate with a http proxy

后端 未结 3 1270
我在风中等你
我在风中等你 2021-01-19 18:53

I have a Java application that is trying to access a web service via http proxy. The Java app is 3rd party app for which we don\'t have access to source code.

Its la

3条回答
  •  再見小時候
    2021-01-19 19:32

    Finally I figured out by trial and error. Passing java.net.useSystemProxies=true along with https.proxyPort, https.proxyHost resolved this.

    Basically the java vm command line got

    -Djava.net.useSystemProxies=true -Dhttps.proxyPort=80 -Dhttps.proxyHost=proxyserver.mycompany.com

    I didn't have to pass https.proxyUser, https.proxyPassword. I believe proxy authentication used the same credentials as my login NTLM credentials.

提交回复
热议问题