mirror of
https://github.com/opnsense/plugins.git
synced 2026-06-03 22:08:11 -04:00
Merge pull request #5345 from fraenki/turnserver_120
net/turnserver: release 1.2
This commit is contained in:
commit
8ec5fbd5ba
6 changed files with 54 additions and 21 deletions
|
|
@ -1,5 +1,5 @@
|
|||
PLUGIN_NAME= turnserver
|
||||
PLUGIN_VERSION= 1.1
|
||||
PLUGIN_VERSION= 1.2
|
||||
PLUGIN_COMMENT= The coturn STUN/TURN Server
|
||||
PLUGIN_DEPENDS= turnserver
|
||||
PLUGIN_MAINTAINER= opnsense@moov.de
|
||||
|
|
|
|||
|
|
@ -6,6 +6,14 @@ WWW: https://github.com/coturn/coturn
|
|||
Plugin Changelog
|
||||
================
|
||||
|
||||
1.2
|
||||
|
||||
Added:
|
||||
* add support for external IPs and IP mappings (#4906)
|
||||
|
||||
Changed:
|
||||
* modernize UI template
|
||||
|
||||
1.1
|
||||
|
||||
Added:
|
||||
|
|
|
|||
|
|
@ -35,6 +35,14 @@
|
|||
<type>text</type>
|
||||
<help>Upper bound of the UDP relay endpoints (Default: 65535).</help>
|
||||
</field>
|
||||
<field>
|
||||
<id>turnserver.settings.ExternalIP</id>
|
||||
<label>External IP</label>
|
||||
<type>select_multiple</type>
|
||||
<style>tokenize</style>
|
||||
<allownew>true</allownew>
|
||||
<help>If the TURN service is behind a NAT, it's external IP address should be specified. When using multiple external IP addresses, IP Mappings should be used instead, i.e. 60.70.80.91/172.17.19.101 (public-ip/private-ip).</help>
|
||||
</field>
|
||||
<field>
|
||||
<label>TLS Support</label>
|
||||
<type>header</type>
|
||||
|
|
|
|||
|
|
@ -25,6 +25,12 @@
|
|||
<Default>65535</Default>
|
||||
<Required>Y</Required>
|
||||
</MaxPort>
|
||||
<ExternalIP type="CSVListField">
|
||||
<Required>N</Required>
|
||||
<Multiple>Y</Multiple>
|
||||
<Mask>/^((([0-9a-zA-Z._\-]+[\/0-9a-zA-Z._\-]*)([,]){0,1}))*/u</Mask>
|
||||
<ValidationMessage>Please provide an external IP address or an IP mapping, i.e. 60.70.80.91/172.17.19.101.</ValidationMessage>
|
||||
</ExternalIP>
|
||||
<TlsEnabled type="BooleanField">
|
||||
<Default>0</Default>
|
||||
<Required>Y</Required>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{#
|
||||
|
||||
Copyright (C) 2025 Frank Wall
|
||||
Copyright (C) 2025-2026 Frank Wall
|
||||
OPNsense® is Copyright © 2014 – 2015 by Deciso B.V.
|
||||
All rights reserved.
|
||||
|
||||
|
|
@ -28,30 +28,36 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
#}
|
||||
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
mapDataToFormUI({'frm_Settings':"/api/turnserver/settings/get"}).done(function(data){
|
||||
$(document).ready(function() {
|
||||
mapDataToFormUI({'frm_Settings': "/api/turnserver/settings/get"}).done(function() {
|
||||
formatTokenizersUI();
|
||||
$('.selectpicker').selectpicker('refresh');
|
||||
});
|
||||
|
||||
// link save button to API set action
|
||||
$("#saveAct").click(function(){
|
||||
saveFormToEndpoint("/api/turnserver/settings/set",'frm_Settings',function(){
|
||||
// reconfigure service
|
||||
ajaxCall(url="/api/turnserver/service/reconfigure", sendData={},callback=function(data,status) {
|
||||
});
|
||||
});
|
||||
updateServiceControlUI('turnserver');
|
||||
$("#reconfigureAct").SimpleActionButton({
|
||||
onPreAction: function() {
|
||||
const dfObj = new $.Deferred();
|
||||
saveFormToEndpoint(
|
||||
"/api/turnserver/settings/set",
|
||||
'frm_Settings',
|
||||
function() {
|
||||
dfObj.resolve();
|
||||
},
|
||||
true,
|
||||
function() {
|
||||
dfObj.reject();
|
||||
}
|
||||
);
|
||||
return dfObj.promise();
|
||||
},
|
||||
onAction: function() {
|
||||
updateServiceControlUI('turnserver');
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<div class="alert alert-info hidden" role="alert" id="responseMsg">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="content-box">
|
||||
{{ partial("layout_partials/base_form",['fields':settingsForm,'id':'frm_Settings'])}}
|
||||
</div>
|
||||
|
||||
<div class="col-md-12">
|
||||
<button class="btn btn-primary" id="saveAct" type="button"><b>{{ lang._('Apply') }}</b></button>
|
||||
</div>
|
||||
{{ partial('layout_partials/base_apply_button', {'data_endpoint': '/api/turnserver/service/reconfigure', 'data_service_widget': 'turnserver'}) }}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,11 @@ listening-ip={{ listenip }}
|
|||
listening-port={{ OPNsense.turnserver.settings.ListenPort }}
|
||||
min-port={{ OPNsense.turnserver.settings.MinPort }}
|
||||
max-port={{ OPNsense.turnserver.settings.MaxPort }}
|
||||
{% if helpers.exists('OPNsense.turnserver.settings.ExternalIP') and OPNsense.turnserver.settings.ExternalIP|default("") != "" %}
|
||||
{% for externalip in OPNsense.turnserver.settings.ExternalIP.split(",") %}
|
||||
external-ip={{ externalip }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
# TLS
|
||||
{% if helpers.exists('OPNsense.turnserver.settings.TlsEnabled') and OPNsense.turnserver.settings.TlsEnabled|default("") == "1" %}
|
||||
|
|
|
|||
Loading…
Reference in a new issue