How to set a proxy for a JBoss Instance

2019-02-08 15:31发布

I have a JBoss instance running and I would like to route all traffic through a proxy.

I have tried setting the System Properties to load in run.sh as so:

JAVA_OPTS="-Dhttp.proxyHost=localhost -Dhttp.proxyPort=1234 $JAVA_OPTS"

But it seems JBoss ignores these as I still am not able to route through the proxy.

Any help?

标签: java jboss proxy
2条回答
一夜七次
2楼-- · 2019-02-08 15:51

In standalone.xml after

</extensions>

add the following

<system-properties>
    <property name="http.proxyHost" value="yourProxyIpAddress"/>
    <property name="http.proxyPort" value="yourProxyPort"/>
    <property name="http.nonProxyHosts" value="localhost"/> <!-- if you want to ignore localhost -->
</system-properties>
查看更多
欢心
3楼-- · 2019-02-08 16:07

Take care if yor connections are http or https, because there is also a flag for https? Also you can set a blacklist (nonproxyhosts) http://docs.oracle.com/javase/6/docs/technotes/guides/net/proxies.html

查看更多
登录 后发表回答