【发布时间】:2013-07-27 23:47:21
【问题描述】:
所以我为_JAVA_OPTIONS 提供了一个相当加载的环境变量
export _JAVA_OPTIONS="-Dhttp.proxyHost=my-proxy.com -Dhttp.proxyPort=1080
-Dhttps.proxyHost=my-proxy.com -Dhttps.proxyPort=1080
-DsocksProxyHost=my-socks-proxy.com
-Dhttp.nonProxyHosts=\"localhost|127.0.0.1|*.local|*.my-co.com\""
但是,当我使用 Apache HTTP 客户端 API 从 Scala 代码尝试它时,我无法让它忽略内部服务器 url。
https://username:pwd@server.my-co.com/foo/bar
我是否需要为 HTTPS 指定不同的 nonProxyHosts?文档没有指定这样的参数。我错过了什么?我在 Mac 上。
【问题讨论】:
-
根据docs.oracle.com/javase/7/docs/api/java/net/doc-files/…,
http.nonProxyHosts代理设置是 HTTPS 的正确属性。在同一份文档中,有一段 SOCKS 内容如下:setting a SOCKS proxy server will result in all TCP connections to go through that proxy, unless other proxies are specified.是否应该通过my-socks-proxy.com或my-proxy.com访问my-co.com?
标签: java jvm environment-variables jvm-arguments