Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set a proxy for a JBoss Instance

Tags:

java

proxy

jboss

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?

like image 749
deken Avatar asked Oct 17 '11 20:10

deken


People also ask

How do I configure proxy server?

To set up a proxy server connection manuallySelect the Start button, then select Settings > Network & Internet > Proxy. Under Manual proxy setup, turn on Use a proxy server. Do the following: In the Address and Port boxes, enter the proxy server name or IP address and port (optional) in the respective boxes.

How do I configure proxy settings for Java?

Configure Proxies through the Java Control PanelIn the Java Control Panel, under the General tab, click on Network Settings. Select the Use Browser Settings checkbox. Click OK to save your changes. Close all browser windows.


2 Answers

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>
like image 136
Spyros Doulgeridis Avatar answered Sep 27 '22 02:09

Spyros Doulgeridis


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

like image 20
Fparis Avatar answered Sep 25 '22 02:09

Fparis