Unable to tunnel through proxy. Proxy returns “HTTP/1.1 407” via https

爱⌒轻易说出口 提交于 2019-11-27 21:22:12
linhadiretalipe

You have to edit the variables jdk.http.auth.tunneling.disabledSchemes and jdk.http.auth.proxying.disabledSchemes to blank like this:

jdk.http.auth.tunneling.disabledSchemes=
jdk.http.auth.proxying.disabledSchemes=

In my case I found in this file

jdk1.8.0_111/jre/lib/net.properties

Change in Java 8 Update 111:

Now, proxies requiring Basic authentication when setting up a tunnel for HTTPS will no longer succeed by default. If required, this authentication scheme can be reactivated by removing Basic from the jdk.http.auth.tunneling.disabledSchemes networking property, or by setting a system property of the same name to "" ( empty ) on the command line.

http://www.oracle.com/technetwork/java/javase/8u111-relnotes-3124969.html

Your options:

  • solve the issue (for the sake of security) by upgrading the authentication scheme of your proxy, e.g. to Digest access authentication
  • or just workaround the issue by running Java with

    java -Djdk.http.auth.tunneling.disabledSchemes=""
    
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!