如何为JBoss实例设置代理

dek*_*ken 12 java proxy jboss

我有一个JBoss实例正在运行,我想通过代理路由所有流量.

我已经尝试将系统属性设置为在run.sh中加载,如下所示:

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

但似乎JBoss忽略了这些,因为我仍然无法通过代理路由.

有帮助吗?

小智 21

standalone.xml之后

</extensions>
Run Code Online (Sandbox Code Playgroud)

添加以下内容

<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>
Run Code Online (Sandbox Code Playgroud)