Commit c6b27514 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Added (back) binding of the Jetty service to specific interfaces.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@6405 b35dd754-fafc-0310-a699-88a17e54d16e
parent 12bdc823
...@@ -482,6 +482,15 @@ public class HttpServerManager { ...@@ -482,6 +482,15 @@ public class HttpServerManager {
private Connector createConnector(int port) { private Connector createConnector(int port) {
if (port > 0) { if (port > 0) {
SelectChannelConnector connector = new SelectChannelConnector(); SelectChannelConnector connector = new SelectChannelConnector();
// Listen on a specific network interface if it has been set.
String interfaceName = JiveGlobals.getXMLProperty("network.interface");
String bindInterface = null;
if (interfaceName != null) {
if (interfaceName.trim().length() > 0) {
bindInterface = interfaceName;
}
}
connector.setHost(bindInterface);
connector.setPort(port); connector.setPort(port);
return connector; return connector;
} }
...@@ -493,6 +502,14 @@ public class HttpServerManager { ...@@ -493,6 +502,14 @@ public class HttpServerManager {
if (securePort > 0 && CertificateManager.isRSACertificate(SSLConfig.getKeyStore(), if (securePort > 0 && CertificateManager.isRSACertificate(SSLConfig.getKeyStore(),
XMPPServer.getInstance().getServerInfo().getName())) { XMPPServer.getInstance().getServerInfo().getName())) {
SslSocketConnector sslConnector = new JiveSslConnector(); SslSocketConnector sslConnector = new JiveSslConnector();
String interfaceName = JiveGlobals.getXMLProperty("network.interface");
String bindInterface = null;
if (interfaceName != null) {
if (interfaceName.trim().length() > 0) {
bindInterface = interfaceName;
}
}
sslConnector.setHost(bindInterface);
sslConnector.setPort(securePort); sslConnector.setPort(securePort);
sslConnector.setTrustPassword(SSLConfig.getTrustPassword()); sslConnector.setTrustPassword(SSLConfig.getTrustPassword());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment