Skip to content

Commit

Permalink
prepare for release 0.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
deleolajide committed Nov 23, 2023
1 parent 648672c commit 860262a
Show file tree
Hide file tree
Showing 10 changed files with 43 additions and 44 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This plugin uses the Pion Turn Project (https://github.com/pion/turn) to create
</p>

<h2>Known Issues</h2>
This version has embedded binaries for only Linux 64, MacOS 64, Windows 64 and Windows 32.
This version has embedded binaries for only Linux 64 and Windows 64 only.
<p>

</p>
Expand Down
5 changes: 3 additions & 2 deletions changelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@ <h1>
PionTurn Plugin Changelog
</h1>

<p><b>0.0.5</b> -- January 2023</p>
<p><b>0.0.5</b> -- November 2023</p>
<ul>
<li>Upgrade to PION Turn 2.0.9</li>
<li>Upgrade to PION Turn 2.1.4</li>
<li>Add UDP port range</li>
</ul>

<p><b>0.0.4</b> -- February 23 2022</p>
Expand Down
Binary file modified classes/linux-64/turn-server-log
Binary file not shown.
Binary file removed classes/mac-64/turn-server-log
Binary file not shown.
Binary file removed classes/win-32/turn-server-log.exe
Binary file not shown.
Binary file modified classes/win-64/turn-server-log.exe
Binary file not shown.
29 changes: 2 additions & 27 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<artifactId>plugins</artifactId>
<groupId>org.igniterealtime.openfire</groupId>
<version>4.5.1</version>
<version>4.7.5</version>
</parent>

<groupId>org.igniterealtime.openfire</groupId>
Expand Down Expand Up @@ -50,32 +50,13 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<fork>true</fork>
<compilerArgument>-XDignore.symbol.file</compilerArgument>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-jspc-maven-plugin</artifactId>
<version>9.2.14.v20151106</version>
<dependencies>
<dependency>
<groupId>org.igniterealtime.openfire</groupId>
<artifactId>xmppserver</artifactId>
<version>${openfire.version}</version>
</dependency>
</dependencies>
</plugin>
</plugin>
</plugins>
</build>

Expand All @@ -86,12 +67,6 @@
<version>${openfire.version}</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-proxy</artifactId>
<version>9.4.18.v20190429</version>
</dependency>

</dependencies>

Expand Down
2 changes: 2 additions & 0 deletions src/i18n/pionturn_i18n.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ plugin.title.description=Pion TURN/STUN Server for Openfire
config.page.settings=Pion Turn/Stun
config.page.settings.description=PionTurn Settings
config.page.configuration.port=Port
config.page.configuration.min.port=UDP Port Range Min
config.page.configuration.max.port=UDP Port Range Max
config.page.configuration.ipaddr=IP Address
config.page.configuration.username=Username
config.page.configuration.password=Password
Expand Down
25 changes: 12 additions & 13 deletions src/java/org/ifsoft/turn/openfire/PionTurn.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,16 @@ public void initializePlugin(final PluginManager manager, final File pluginDirec

String ipaddr = " -public-ip " + JiveGlobals.getProperty("pionturn.ipaddr", getIpAddress());
String port = " -port " + JiveGlobals.getProperty("pionturn.port", getPort());
String minPort = " -min_port " + JiveGlobals.getProperty("pionturn.min.port", getMinPort());
String maxPort = " -max_port " + JiveGlobals.getProperty("pionturn.max.port", getMaxPort());
String realm = " -realm " + XMPPServer.getInstance().getServerInfo().getXMPPDomain();
String username = JiveGlobals.getProperty("pionturn.username", "admin");
String password = JiveGlobals.getProperty("pionturn.password", "admin");

if (!"".equals(username) && !"".equals(password))
{
String authentication = " -users " + username + "=" + password;
String cmd = pionTurnExePath + ipaddr + port + realm + authentication;
String cmd = pionTurnExePath + ipaddr + port + minPort + maxPort + realm + authentication;
pionTurnThread = Spawn.startProcess(cmd, new File(pionTurnHomePath), this);

Log.info("PionTurn enabled " + cmd);
Expand All @@ -107,10 +109,17 @@ public void sendLine(String command)
if (pionTurnThread != null) pionTurnThread.sendLine(command);
}

public String getPort()
{
public String getPort() {
return "3478";
}

public String getMinPort() {
return "50000";
}

public String getMaxPort() {
return "55000";
}

public String getIpAddress()
{
Expand Down Expand Up @@ -166,16 +175,6 @@ else if(OSUtils.IS_WINDOWS64)
suffix = "win-64" + File.separator + "turn-server-log.exe";
}

else if(OSUtils.IS_WINDOWS32)
{
suffix = "win-32" + File.separator + "turn-server-log.exe";
}

else if(OSUtils.IS_MAC64)
{
suffix = "mac-64" + File.separator + "turn-server-log";
}

if (suffix != null)
{
pionTurnHomePath = pluginDirectory.getAbsolutePath() + File.separator + "classes";
Expand Down
24 changes: 23 additions & 1 deletion src/web/pionturn.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@
String port = request.getParameter("port");
JiveGlobals.setProperty("pionturn.port", port);
String min_port = request.getParameter("min_port");
JiveGlobals.setProperty("pionturn.min.port", min_port);
String max_port = request.getParameter("max_port");
JiveGlobals.setProperty("pionturn.max.port", max_port);
String ipaddr = request.getParameter("ipaddr");
JiveGlobals.setProperty("pionturn.ipaddr", ipaddr);
Expand Down Expand Up @@ -85,14 +91,30 @@
<td><input type="text" size="50" maxlength="100" name="ipaddr" required
value="<%= JiveGlobals.getProperty("pionturn.ipaddr", plugin.getIpAddress()) %>">
</td>
</tr>
</tr>
<tr>
<td align="left" width="150">
<fmt:message key="config.page.configuration.port"/>
</td>
<td><input type="text" size="50" maxlength="100" name="port" required
value="<%= JiveGlobals.getProperty("pionturn.port", plugin.getPort()) %>">
</td>
</tr>
<tr>
<td align="left" width="150">
<fmt:message key="config.page.configuration.min.port"/>
</td>
<td><input type="text" size="50" maxlength="100" name="min_port" required
value="<%= JiveGlobals.getProperty("pionturn.min.port", plugin.getMinPort()) %>">
</td>
</tr>
<tr>
<td align="left" width="150">
<fmt:message key="config.page.configuration.max.port"/>
</td>
<td><input type="text" size="50" maxlength="100" name="max_port" required
value="<%= JiveGlobals.getProperty("pionturn.max.port", plugin.getMaxPort()) %>">
</td>
</tr>
</tbody>
</table>
Expand Down

0 comments on commit 860262a

Please sign in to comment.