luci-app-natmap: add forward_port option and update stun_server description

Signed-off-by: Richard Yu <yurichard3839@gmail.com>
This commit is contained in:
Richard Yu 2022-12-21 18:07:06 +08:00 committed by Hannu Nyman
parent 592836113f
commit 1a4ac92282
2 changed files with 29 additions and 26 deletions

View file

@ -79,7 +79,7 @@ return view.extend({
o.datatype = 'uinteger'; o.datatype = 'uinteger';
o.modalonly = true; o.modalonly = true;
o = s.option(form.Value, 'stun_server', _('STUN server'), _('For UDP mode')); o = s.option(form.Value, 'stun_server', _('STUN server'));
o.datatype = 'host'; o.datatype = 'host';
o.modalonly = true; o.modalonly = true;
o.optional = false; o.optional = false;
@ -88,12 +88,10 @@ return view.extend({
o = s.option(form.Value, 'http_server', _('HTTP server'), _('For TCP mode')); o = s.option(form.Value, 'http_server', _('HTTP server'), _('For TCP mode'));
o.datatype = 'host'; o.datatype = 'host';
o.modalonly = true; o.modalonly = true;
o.optional = false;
o.rmempty = false; o.rmempty = false;
o = s.option(form.Value, 'port', _('Port')); o = s.option(form.Value, 'port', _('Bind port'));
o.datatype = 'port'; o.datatype = 'port';
o.optional = false;
o.rmempty = false; o.rmempty = false;
o = s.option(form.Flag, '_forward_mode', _('Forward mode')); o = s.option(form.Flag, '_forward_mode', _('Forward mode'));
@ -109,6 +107,11 @@ return view.extend({
o.modalonly = true; o.modalonly = true;
o.depends('_forward_mode', '1'); o.depends('_forward_mode', '1');
o = s.option(form.Value, 'forward_port', _('Forward target port'));
o.datatype = 'port';
o.modalonly = true;
o.depends('_forward_mode', '1');
o = s.option(form.Value, 'notify_script', _('Notify script')); o = s.option(form.Value, 'notify_script', _('Notify script'));
o.datatype = 'file'; o.datatype = 'file';
o.modalonly = true; o.modalonly = true;

View file

@ -1,83 +1,83 @@
msgid "" msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8" msgstr "Content-Type: text/plain; charset=UTF-8"
#: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:56 #: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:55
msgid "Enable" msgid "Enable"
msgstr "" msgstr ""
#: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:117 #: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:121
msgid "External IP" msgid "External IP"
msgstr "" msgstr ""
#: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:124 #: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:128
msgid "External Port" msgid "External Port"
msgstr "" msgstr ""
#: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:89 #: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:88
msgid "For TCP mode" msgid "For TCP mode"
msgstr "" msgstr ""
#: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:83 #: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:99
msgid "For UDP mode"
msgstr ""
#: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:100
msgid "Forward mode" msgid "Forward mode"
msgstr "" msgstr ""
#: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:108 #: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:107
msgid "Forward target" msgid "Forward target"
msgstr "" msgstr ""
#: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:112
msgid "Forward target port"
msgstr ""
#: applications/luci-app-natmap/root/usr/share/rpcd/acl.d/luci-app-natmap.json:3 #: applications/luci-app-natmap/root/usr/share/rpcd/acl.d/luci-app-natmap.json:3
msgid "Grant access to LuCI app natmap" msgid "Grant access to LuCI app natmap"
msgstr "" msgstr ""
#: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:89 #: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:88
msgid "HTTP server" msgid "HTTP server"
msgstr "" msgstr ""
#: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:72 #: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:71
msgid "IPv4 and IPv6" msgid "IPv4 and IPv6"
msgstr "" msgstr ""
#: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:73 #: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:72
msgid "IPv4 only" msgid "IPv4 only"
msgstr "" msgstr ""
#: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:74 #: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:73
msgid "IPv6 only" msgid "IPv6 only"
msgstr "" msgstr ""
#: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:76 #: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:75
msgid "Interface" msgid "Interface"
msgstr "" msgstr ""
#: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:79 #: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:78
msgid "Keep-alive interval" msgid "Keep-alive interval"
msgstr "" msgstr ""
#: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:51 #: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:50
#: applications/luci-app-natmap/root/usr/share/luci/menu.d/luci-app-natmap.json:3 #: applications/luci-app-natmap/root/usr/share/luci/menu.d/luci-app-natmap.json:3
msgid "NATMap" msgid "NATMap"
msgstr "" msgstr ""
#: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:113 #: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:117
msgid "Notify script" msgid "Notify script"
msgstr "" msgstr ""
#: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:95 #: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:94
msgid "Port" msgid "Port"
msgstr "" msgstr ""
#: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:60 #: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:59
msgid "Protocol" msgid "Protocol"
msgstr "" msgstr ""
#: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:70 #: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:69
msgid "Restrict to address family" msgid "Restrict to address family"
msgstr "" msgstr ""
#: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:83 #: applications/luci-app-natmap/htdocs/luci-static/resources/view/natmap.js:82
msgid "STUN server" msgid "STUN server"
msgstr "" msgstr ""