简体   繁体   English

java自动代​​理配置

[英]java automatic proxy configuration

I have written an application in jsoup that needs to connect through company proxy. 我已经在jsoup中编写了一个需要通过公司代理连接的应用程序。 I have tried giving the auto proxy config url in the java settings in control panel(XP) but it still times out the connection. 我已经尝试在控制面板(XP)的java设置中提供自动代理配置URL,但它仍然超时连接。 What else do I need to do 还有什么我需要做的

Proxy settings in Java Control Panel affect only Java Web Start applications and applets. Java控制面板中的代理设置仅影响Java Web Start应用程序和小程序。

For regular Java applications, you should use the following properties to configure proxy: 对于常规Java应用程序,应使用以下属性配置代理:

  • http.proxyHost , http.proxyPort , and http.nonProxyHosts . http.proxyHosthttp.proxyPorthttp.nonProxyHosts
  • https.proxyHost , https.proxyPort (HTTPS handler uses http.nonProxyHosts ). https.proxyHosthttps.proxyPort (HTTPS处理程序使用http.nonProxyHosts )。
  • ftp.proxyHost , ftp.proxyPort , and ftp.nonProxyHosts . ftp.proxyHostftp.proxyPortftp.nonProxyHosts

See Networking Properties for more details on configuring behavior of the various classes of the java.net package. 有关配置java.net包的各个类的行为的更多详细信息,请参见网络属性

There's no built-in way to use automatic proxy configuration for regular Java applications. 没有针对常规Java应用程序使用自动代理配置的内置方法。 See answers to this question for various options to do it. 有关各种选项,请参阅此问题的答案。

You must set the java environment proxy settings. 您必须设置Java环境代理设置。

Check the Oracle guide . 查看Oracle指南

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM