Commit 2a372ccc authored by Matt Tucker's avatar Matt Tucker Committed by matt

Stun refactoring in progress.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@7689 b35dd754-fafc-0310-a699-88a17e54d16e
parent 27e1c1ca
...@@ -197,6 +197,7 @@ ...@@ -197,6 +197,7 @@
<include name="**/*.css"/> <include name="**/*.css"/>
<include name="**/*.gif"/> <include name="**/*.gif"/>
<include name="**/*.png"/> <include name="**/*.png"/>
<include name="**/favicon.ico"/>
<include name="**/*.js"/> <include name="**/*.js"/>
</patternset> </patternset>
...@@ -1213,7 +1214,7 @@ ...@@ -1213,7 +1214,7 @@
<mkdir dir="${plugin.dev.dest.dir}/@{plugin}/jar"/> <mkdir dir="${plugin.dev.dest.dir}/@{plugin}/jar"/>
<copy todir="${plugin.dev.dest.dir}/@{plugin}/jar" failonerror="false" <copy todir="${plugin.dev.dest.dir}/@{plugin}/jar" failonerror="false"
overwrite="${overwrite}"> overwrite="${overwrite}">
<fileset dir="@{pluginsrc}/@{plugin}" includes="*.xml, *.html, *.gif, *.png"/> <fileset dir="@{pluginsrc}/@{plugin}" includes="*.xml, *.html, *.gif, *.png, *.ico"/>
</copy> </copy>
<!-- Copy the database and i18n file to the target dir, if they exist. --> <!-- Copy the database and i18n file to the target dir, if they exist. -->
......
...@@ -31,75 +31,6 @@ ...@@ -31,75 +31,6 @@
## ##
## REVISION HISTORY (by Openfire version): ## REVISION HISTORY (by Openfire version):
## ##
## 2.6.0
## Added key: 'audit.policy.maxdays_number'
## Added ket: 'audit.policy.maxtotal_size'
## Added key: 'admin.console.devmode'
## Added key: 'global.unlimited'
## Added key: 'sidebar.system-cache'
## Added key: 'sidebar.system-cache.descr'
## Added key: 'ssl.settings.type'
## Added key: 'startup.starting.pubsub'
## Added section: 'pubsub.*'
## Added section: 'system.cache.*'
## Added section 'upgrade.database.*'
## Removed key: 'audit.policy.maxfile_number'
## Removed key: 'group.summary.list_group'
## Removed key: 'session.summary.info'
## Removed key: 'user.summary.info'
##
## 3.0.0
## Added key: 'index.update.alert'
## Added key: 'index.update.info'
## Added key: 'startup.multiplexer'
## Added key 'plugin.admin.download'
## Added key 'plugin.admin.update-desc'
## Added key: 'upgrade.database.missing_schema'
## Added key: 'tab.tab-plugins'
## Added key: 'tab.tab-plugins.descr'
## Added key: 'sidebar.sidebar-plugin-admin'
## Added key: 'sidebar.plugin-settings'
## Added key: 'sidebar.available-plugins'
## Added key: 'sidebar.available-plugins.descr'
## Added key: 'sidebar.connection-managers-settings'
## Added key: 'sidebar.connection-managers-settings.descr'
## Added key: 'sidebar.connection-managers-session-summary'
## Added key: 'sidebar.connection-managers-session-summary.descr'
## Added key: 'sidebar.manage-updates'
## Added key: 'sidebar.manage-updates.descr'
## Updated key: 'upgrade.database.old_schema'
## Updated key: 'upgrade.database.success'
## Updated key: 'upgrade.database.failure'
## Added section 'connection-manager.*'
## Added section: 'manage-updates.*'
## Added section: 'muc.stats.*'
## Added section: 'plugin.available.*'
## Added section: 'server_bytes.stats.*'
## Added key: 'filetransfer.error.disabled'
## Added key: 'stat.filetransferproxy.transfered.name'
## Added key: 'stat.filetransferproxy.transfered.desc'
## Added key: 'stat.filetransferproxy.transfered.units'
## Added key: 'admin.console'
## Added key: 'calendar.info'
## Added key: 'calendar.about'
## Added key: 'calendar.prev_year'
## Added key: 'calendar.prev_month'
## Added key: 'calendar.go_today'
## Added key: 'calendar.next_month'
## Added key: 'calendar.next_year'
## Added key: 'calendar.select_date'
## Added key: 'calendar.drag_to_move'
## Added key: 'calendar.part_today'
## Added key: 'calendar.day_first'
## Added key: 'calendar.weekend'
## Added key: 'calendar.close'
## Added key: 'calendar.today'
## Added key: 'calendar.time_part'
## Added key: 'calendar.time'
##
## 3.0.1
## Added section: 'manage-updates.proxy.*'
##
## 3.1.0 ## 3.1.0
## Added section: 'server.db_stats.*' ## Added section: 'server.db_stats.*'
## Added key: 'group.summary.search' ## Added key: 'group.summary.search'
...@@ -219,7 +150,17 @@ ...@@ -219,7 +150,17 @@
## 3.2.1 ## 3.2.1
## Added key: 'index.certificate-warning' ## Added key: 'index.certificate-warning'
## Added section 'ssl.import.certificate.*' ## Added section 'ssl.import.certificate.*'
##
## 3.3.0
## Added key: 'sidebar.sidebar-media-services'
## Added key: 'sidebar.media-proxy'
## Added key: 'sidebar.media-proxy.descr'
## Added key: 'sidebar.stun'
## Added key: 'sidebar.stun.descr'
## Removed key: 'stun.settings.comment'
## Removed key: 'stun.settings.change'
## Removed key: 'stun.external.add'
## Removed key: 'stun.external.delete'
# Openfire # Openfire
...@@ -276,6 +217,11 @@ tab.server.descr=Click to manage server settings ...@@ -276,6 +217,11 @@ tab.server.descr=Click to manage server settings
sidebar.server-compression.descr=Click to view compression settings. sidebar.server-compression.descr=Click to view compression settings.
sidebar.transfer-proxy=File Transfer Settings sidebar.transfer-proxy=File Transfer Settings
sidebar.transfer-proxy.descr=Click to view file tranfer settings sidebar.transfer-proxy.descr=Click to view file tranfer settings
sidebar.sidebar-media-services=Media Services
sidebar.media-proxy=Media Proxy
sidebar.media-proxy.descr=Click to view media proxy settings.
sidebar.stun=STUN Settings
sidebar.stun.descr=Click to view STUN settings.
tab.tab-users=Users/Groups tab.tab-users=Users/Groups
tab.tab-users.descr=Click to manage users and groups tab.tab-users.descr=Click to manage users and groups
sidebar.sidebar-users=Users sidebar.sidebar-users=Users
...@@ -2329,12 +2275,15 @@ mediaproxy.summary.stopbutton = Stop Active Sessions ...@@ -2329,12 +2275,15 @@ mediaproxy.summary.stopbutton = Stop Active Sessions
stun.settings.alert.notvalidip = The selected IP values are not valid. Please select different IPs. stun.settings.alert.notvalidip = The selected IP values are not valid. Please select different IPs.
stun.settings.alert.notvalidport = The selected port numbers are not valid. Please select different port numbers. stun.settings.alert.notvalidport = The selected port numbers are not valid. Please select different port numbers.
stun.settings.title = STUN Server Settings stun.settings.title = STUN Settings
stun.settings.desc = Use the form below to manage STUN Server settings. \ stun.settings.desc = STUN is a protocol that lets clients discover their network settings, \
A STUN need at least two different IPs in the same machine to run and two different port numbers on each IP. including firewall and NAT device configuration. Use of the protocol is required for clients \
to establish peer to peer media sessions. The server can be configured as a STUN service itself, or it \
can send third-party STUN server addresses to clients.<br/><br/> \
In order to act as a STUN server, two different public IP addresses on the \
same machine are required, as well as two different port numbers for each IP.
stun.settings.success = Settings updated successfully. stun.settings.success = Settings updated successfully.
stun.settings.error = Server cannot start. Check your port numbers and Primary and Secondary addresses. stun.settings.error = STUN server cannot start. Check your port numbers and Primary and Secondary addresses.
stun.settings.comment = The settings will just take effects after savings settings.
stun.settings.primaryaddress = Primary Address stun.settings.primaryaddress = Primary Address
stun.settings.secondaryaddress = Secondary Address stun.settings.secondaryaddress = Secondary Address
stun.settings.primaryport = Primary Port Value stun.settings.primaryport = Primary Port Value
...@@ -2342,13 +2291,12 @@ stun.settings.secondaryport = Secondary Port Value ...@@ -2342,13 +2291,12 @@ stun.settings.secondaryport = Secondary Port Value
stun.settings.enabled = Enabled stun.settings.enabled = Enabled
stun.settings.localenabled = Local Server Enabled stun.settings.localenabled = Local Server Enabled
stun.settings.change = Change stun.settings.change = Change
stun.external.title = External Stun Servers stun.external.title = External STUN Servers
stun.external.comment = Server will also send the following address(es) to client. stun.external.comment = The server will also send the following address(es) for third-party STUN \
services to clients. Clients will try each STUN service until able to find one that is working.
stun.external.server = Server stun.external.server = Server
stun.external.port = Port stun.external.port = Port
stun.external.error = You must inform Server and Port. stun.external.error = Invalid server or port.
stun.external.add = Add
stun.external.delete = Delete
# Import signed certificate page # Import signed certificate page
......
...@@ -130,16 +130,16 @@ ...@@ -130,16 +130,16 @@
</sidebar> </sidebar>
<!-- Server Settings --> <!-- Server Settings -->
<sidebar id="sidebar-media-services" name="Media Services"> <sidebar id="sidebar-media-services" name="${sidebar.sidebar-media-services}">
<!-- Media Proxy Settings --> <!-- Media Proxy Settings -->
<item id="media-proxy-service" name="Media Proxy" <item id="media-proxy-service" name="${sidebar.media-proxy}"
url="media-proxy.jsp" url="media-proxy.jsp"
description="Media proxy settings"/> description="${sidebar.media-proxy.desc}"/>
<!-- STUN Server Settings --> <!-- STUN Server Settings -->
<item id="stun-settings" name="STUN Server Settings" <item id="stun-settings" name="${sidebar.stun}"
url="stun-settings.jsp" url="stun-settings.jsp"
description="STUN Server Settings"/> description="${sidebar.stun.desc}"/>
</sidebar> </sidebar>
</tab> </tab>
......
<%-- <%--
- $Revision: 5321 $ - Copyright (C) 2007 Jive Software. All rights reserved.
- $Date: 2006-09-11 01:22:53 -0300 (seg, 11 set 2006) $
-
- Copyright (C) 2004-2005 Jive Software. All rights reserved.
- -
- This software is published under the terms of the GNU Public License (GPL), - This software is published under the terms of the GNU Public License (GPL),
- a copy of which is included in this distribution. - a copy of which is included in this distribution.
...@@ -11,9 +8,9 @@ ...@@ -11,9 +8,9 @@
<%@ page import="org.jivesoftware.util.ParamUtils" %> <%@ page import="org.jivesoftware.util.ParamUtils" %>
<%@ page import="org.jivesoftware.wildfire.XMPPServer" %> <%@ page import="org.jivesoftware.wildfire.XMPPServer" %>
<%@ page import="org.jivesoftware.wildfire.stun.STUNService" %> <%@ page import="org.jivesoftware.wildfire.stun.STUNService" %>
<%@ page import="org.jivesoftware.wildfire.stun.StunServerAddress" %>
<%@ page import="java.net.InetAddress" %> <%@ page import="java.net.InetAddress" %>
<%@ page import="java.util.List" %> <%@ page import="java.util.List" %>
<%@ page import="org.jivesoftware.wildfire.stun.StunServerAddress" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt" %> <%@ taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt" %>
...@@ -89,10 +86,12 @@ ...@@ -89,10 +86,12 @@
success = stunService.isEnabled() == enabled && stunService.isLocalEnabled() == localEnabled; success = stunService.isEnabled() == enabled && stunService.isLocalEnabled() == localEnabled;
} else if (remove > -1) { }
else if (remove > -1) {
stunService.removeExternalServer(remove); stunService.removeExternalServer(remove);
success = true; success = true;
} else if (add) { }
else if (add) {
String server = ParamUtils.getParameter(request, "externalServer", true); String server = ParamUtils.getParameter(request, "externalServer", true);
String port = ParamUtils.getParameter(request, "externalPort", true); String port = ParamUtils.getParameter(request, "externalPort", true);
...@@ -181,62 +180,58 @@ ...@@ -181,62 +180,58 @@
<fmt:message key="stun.settings.title"/> <fmt:message key="stun.settings.title"/>
</div> </div>
<div class="jive-contentBox"> <div class="jive-contentBox">
<p>
<fmt:message key="stun.settings.comment"/>
</p>
<table cellpadding="3" cellspacing="0" border="0" width="100%"> <table cellpadding="3" cellspacing="5" border="0">
<tbody> <tbody>
<tr>
<td align="left" colspan="2">
<fmt:message key="stun.settings.localenabled"/>
:&nbsp<input type="checkbox"
name="localEnabled"
<%=stunService.isLocalEnabled()?"checked":""%>
align="left">
</td>
</tr>
<tr> <tr>
<td align="left"> <td align="left">
<fmt:message key="stun.settings.primaryaddress"/> <fmt:message key="stun.settings.primaryaddress"/>:
:&nbsp<select size="1" </td><td>
maxlength="100" <select size="1" name="primaryAddress">
name="primaryAddress" <option value="CHOOSE">-- Select Address --</option>
align="left">
<option value="<%=stunService.getPrimaryAddress()%>"><%=stunService.getPrimaryAddress()%>
<%
List<InetAddress> addresses = stunService.getAddresses();
for(InetAddress iaddress:addresses){
if(!iaddress.getHostAddress().equals(stunService.getPrimaryAddress())){
%>
<option value="<%=iaddress.getHostAddress()%>"><%=iaddress.getHostAddress()%>
</option>
<% <%
} List<InetAddress> addresses = stunService.getAddresses();
} for (InetAddress iaddress : addresses) {
String sname = JiveGlobals.getProperty("xmpp.domain", JiveGlobals.getXMLProperty("network.interface", "localhost")); String hostAddress = iaddress.getHostAddress();
boolean isPrimaryAddress = hostAddress.equals(stunService.getPrimaryAddress());
%> %>
<option value="<%=sname%>"><%=sname%> <option value="<%= hostAddress %>" <% if(isPrimaryAddress) { %>selected <% } %> ><%= hostAddress %>
</option> </option>
<% } %>
</td> </td>
</tr> </tr>
<tr> <tr>
<td align="left"> <td align="left">
<fmt:message key="stun.settings.secondaryaddress"/> <fmt:message key="stun.settings.secondaryaddress"/>:
:&nbsp<select size="1" </td><td>
maxlength="100" <select size="1" name="secondaryAddress">
name="secondaryAddress" <option value="CHOOSE">-- Select Address --</option>
align="left">
<option value="<%=stunService.getSecondaryAddress()%>"><%=stunService.getSecondaryAddress()%>
</option>
<% <%
for (InetAddress iaddress : addresses) { for (InetAddress iaddress : addresses) {
if (!iaddress.getHostAddress().equals(stunService.getSecondaryAddress())) { String hostAddress = iaddress.getHostAddress();
boolean isSecondaryAddress = hostAddress.equals(stunService.getSecondaryAddress());
%> %>
<option value="<%=iaddress.getHostAddress()%>"><%=iaddress.getHostAddress()%> <option value="<%= hostAddress %>" <% if(isSecondaryAddress) { %>selected <% } %> ><%= hostAddress %>
</option> </option>
<% } <% } %>
}%>
<option value="127.0.0.1">127.0.0.1</option>
</select> </select>
</td> </td>
</tr> </tr>
<tr> <tr>
<td align="left"> <td align="left">
<fmt:message key="stun.settings.primaryport"/> <fmt:message key="stun.settings.primaryport"/>:
:&nbsp<input type="text" size="20" </td><td>
maxlength="100" <input type="text" size="6"
maxlength="10"
name="primaryPort" name="primaryPort"
value="<%=stunService.getPrimaryPort()%>" value="<%=stunService.getPrimaryPort()%>"
align="left"> align="left">
...@@ -244,41 +239,19 @@ ...@@ -244,41 +239,19 @@
</tr> </tr>
<tr> <tr>
<td align="left"> <td align="left">
<fmt:message key="stun.settings.secondaryport"/> <fmt:message key="stun.settings.secondaryport"/>:
:&nbsp<input type="text" size="20" </td><td>
maxlength="100" <input type="text" size="6"
maxlength="10"
name="secondaryPort" name="secondaryPort"
value="<%=stunService.getSecondaryPort()%>" value="<%=stunService.getSecondaryPort()%>"
align="left"> align="left">
</td> </td>
</tr> </tr>
<tr>
<td align="left">
<fmt:message key="stun.settings.localenabled"/>
:&nbsp<input type="checkbox"
name="localEnabled"
<%=stunService.isLocalEnabled()?"checked":""%>
align="left">
</td>
</tr>
<tr>
<td align="left">
<fmt:message key="stun.settings.enabled"/>
:&nbsp<input type="checkbox"
name="enabled"
<%=stunService.isEnabled()?"checked":""%>
align="left">
</td>
</tr>
<tr>
<td>
&nbsp;
</td>
</tr>
<tr> <tr>
<td> <td>
<input type="hidden" name="save"> <input type="hidden" name="save">
<input type="button" name="set" value="<fmt:message key="stun.settings.change" />" <input type="button" name="set" value="<fmt:message key="global.save_settings" />"
onclick="checkAndSubmit()"> onclick="checkAndSubmit()">
</td> </td>
</tr> </tr>
...@@ -305,7 +278,7 @@ ...@@ -305,7 +278,7 @@
<fmt:message key="stun.external.port"/> <fmt:message key="stun.external.port"/>
</th> </th>
<th nowrap align="left"> <th nowrap align="left">
<fmt:message key="stun.external.delete"/> <fmt:message key="global.delete"/>
</th> </th>
</tr> </tr>
</thead> </thead>
...@@ -347,7 +320,7 @@ ...@@ -347,7 +320,7 @@
</tr> </tr>
<tr> <tr>
<td> <td>
<input type="submit" name="add" value="<fmt:message key="stun.external.add"/>"> <input type="submit" name="add" value="<fmt:message key="global.add"/>">
</td> </td>
</tr> </tr>
</tbody> </tbody>
......
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