Skip to content

Commit

Permalink
luci-app-upnp: Update plugin title/menu to include PCP as supported
Browse files Browse the repository at this point in the history
and revise wording

- Revise wording, remove redundancies and mention IPv6 limitations
- Mention `UPnP IGD` as `UPnP` is probably not specific enough
- Include current wording in `LUCI_TITLE` for easy finding
- Fix 4 multiple failing strings in translations and remove old comments

Updated title: `UPnP IGD & PCP/NAT-PMP Service`
Current title: `Universal Plug & Play`
Updated menu option: `UPnP IGD & PCP/NAT-PMP`
Current menu option: `UPnP`
Updated wording: `port forwards` (used in Network -> Firewall)
Current wording: `redirects`

Port Control Protocol (PCP) is the successor to NAT-PMP and has similar
protocol concepts and packet formats, but adds IPv6 support.
PCP standard:
https://datatracker.ietf.org/doc/html/rfc6887
https://en.wikipedia.org/wiki/Port_Control_Protocol
NAT-PMP std. (see 9.1 Simplicity - 9.3 for some diff. to UPnP IGD):
https://datatracker.ietf.org/doc/html/rfc6886

Signed-off-by: Self-Hosting-Group <155233284+Self-Hosting-Group@users.noreply.github.com>
  • Loading branch information
Self-Hosting-Group committed Feb 4, 2024
1 parent 1e1c6b8 commit 4189d18
Show file tree
Hide file tree
Showing 41 changed files with 2,953 additions and 2,019 deletions.
2 changes: 1 addition & 1 deletion applications/luci-app-upnp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

include $(TOPDIR)/rules.mk

LUCI_TITLE:=Universal Plug & Play configuration module
LUCI_TITLE:=Universal Plug and Play (UPnP IGD & PCP/NAT-PMP) configuration module
LUCI_DEPENDS:=+luci-base +miniupnpd +rpcd-mod-ucode

include ../../luci.mk
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ handleDelRule = function(num, ev) {
};

return baseclass.extend({
title: _('Active UPnP Redirects'),
title: _('Active UPnP IGD & PCP/NAT-PMP Port Forwards'),

load: function() {
return Promise.all([
Expand Down Expand Up @@ -67,7 +67,7 @@ return baseclass.extend({
];
});

cbi_update_table(table, rows, E('em', _('There are no active redirects.')));
cbi_update_table(table, rows, E('em', _('There are no active port forwards.')));

return table;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ return view.extend({
];
});

cbi_update_table(nodes.querySelector('#upnp_status_table'), rows, E('em', _('There are no active redirects.')));
cbi_update_table(nodes.querySelector('#upnp_status_table'), rows, E('em', _('There are no active port forwards.')));

return;
},
Expand All @@ -72,8 +72,8 @@ return view.extend({

var m, s, o;

m = new form.Map('upnpd', [_('Universal Plug & Play')],
_('UPnP allows clients in the local network to automatically configure the router.'));
m = new form.Map('upnpd', [_('UPnP IGD & PCP/NAT-PMP Service')],
_('UPnP IGD & PCP/NAT-PMP allows clients on the local network to automatically configure port forwards on the router. Also called Universal Plug and Play.'));

s = m.section(form.GridSection, '_active_rules');

Expand Down Expand Up @@ -107,43 +107,43 @@ return view.extend({
];
});

cbi_update_table(table, rows, E('em', _('There are no active redirects.')));
cbi_update_table(table, rows, E('em', _('There are no active port forwards.')));

return E('div', { 'class': 'cbi-section cbi-tblsection' }, [
E('h3', _('Active UPnP Redirects')), table ]);
E('h3', _('Active Service Port Forwards')), table ]);
}, o, this);

s = m.section(form.NamedSection, 'config', 'upnpd', _('MiniUPnP settings'));
s = m.section(form.NamedSection, 'config', 'upnpd', _('Service Settings'));
s.addremove = false;
s.tab('general', _('General Settings'));
s.tab('advanced', _('Advanced Settings'));

o = s.taboption('general', form.Flag, 'enabled', _('Start UPnP and NAT-PMP service'));
o = s.taboption('general', form.Flag, 'enabled', _('Start service'));
o.rmempty = false;

s.taboption('general', form.Flag, 'enable_upnp', _('Enable UPnP functionality')).default = '1'
s.taboption('general', form.Flag, 'enable_natpmp', _('Enable NAT-PMP functionality')).default = '1'
s.taboption('general', form.Flag, 'enable_upnp', _('Enable UPnP IGD protocol')).default = '1'
s.taboption('general', form.Flag, 'enable_natpmp', _('Enable PCP/NAT-PMP protocol')).default = '1'

s.taboption('general', form.Flag, 'secure_mode', _('Enable secure mode'),
_('Allow adding forwards only to requesting ip addresses')).default = '1'
_('Allow adding port forwards only to requesting IP addresses')).default = '1'

s.taboption('general', form.Flag, 'igdv1', _('Enable IGDv1 mode'),
_('Advertise as IGDv1 device instead of IGDv2')).default = '0'
s.taboption('general', form.Flag, 'igdv1', _('Enable UPnP IGDv1 mode'),
_('Advertise as IGDv1 device (no IPv6) instead of IGDv2')).default = '0'

s.taboption('general', form.Flag, 'log_output', _('Enable additional logging'),
_('Puts extra debugging information into the system log'))

s.taboption('general', form.Value, 'download', _('Downlink'),
s.taboption('general', form.Value, 'download', _('Download speed'),
_('Value in KByte/s, informational only')).rmempty = true

s.taboption('general', form.Value, 'upload', _('Uplink'),
s.taboption('general', form.Value, 'upload', _('Upload speed'),
_('Value in KByte/s, informational only')).rmempty = true

o = s.taboption('general', form.Value, 'port', _('Port'))
o.datatype = 'port'
o.default = 5000

s.taboption('advanced', form.Flag, 'system_uptime', _('Report system instead of daemon uptime')).default = '1'
s.taboption('advanced', form.Flag, 'system_uptime', _('Report system instead of service uptime')).default = '1'

s.taboption('advanced', form.Value, 'uuid', _('Device UUID'))
s.taboption('advanced', form.Value, 'serial_number', _('Announced serial number'))
Expand All @@ -164,7 +164,7 @@ return view.extend({
o = s.taboption('advanced', form.Value, 'presentation_url', _('Presentation URL'))
o.placeholder = 'http://192.168.1.1/'

o = s.taboption('advanced', form.Value, 'upnp_lease_file', _('UPnP lease file'))
o = s.taboption('advanced', form.Value, 'upnp_lease_file', _('Service lease file'))
o.placeholder = '/var/run/miniupnpd.leases'

s.taboption('advanced', form.Flag, 'use_stun', _('Use STUN'))
Expand All @@ -178,8 +178,8 @@ return view.extend({
o.datatype = 'port'
o.placeholder = '0-65535'

s = m.section(form.GridSection, 'perm_rule', _('MiniUPnP ACLs'),
_('ACLs specify which external ports may be redirected to which internal addresses and ports'))
s = m.section(form.GridSection, 'perm_rule', _('Service ACLs'),
_('ACLs specify which external ports can be forwarded to which internal addresses and ports, IPv6 always allowed'))

s.sortable = true
s.anonymous = true
Expand Down
94 changes: 40 additions & 54 deletions applications/luci-app-upnp/po/ar/upnp.po
Original file line number Diff line number Diff line change
Expand Up @@ -17,33 +17,36 @@ msgstr ""

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:182
msgid ""
"ACLs specify which external ports may be redirected to which internal "
"addresses and ports"
"ACLs specify which external ports can be forwarded to which internal "
"addresses and ports, IPv6 always allowed"
msgstr ""

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:202
msgid "Action"
msgstr "إجراء"

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/status/include/80_upnp.js:31
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:113
msgid "Active UPnP Redirects"
msgid "Active Service Port Forwards"
msgstr ""

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/status/include/80_upnp.js:31
msgid "Active UPnP IGD & PCP/NAT-PMP Port Forwards"
msgstr ""

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:119
msgid "Advanced Settings"
msgstr "إعدادات متقدمة"

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:131
msgid "Advertise as IGDv1 device instead of IGDv2"
msgid "Advertise as IGDv1 device (no IPv6) instead of IGDv2"
msgstr ""

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:203
msgid "Allow"
msgstr ""

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:128
msgid "Allow adding forwards only to requesting ip addresses"
msgid "Allow adding port forwards only to requesting IP addresses"
msgstr ""

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:150
Expand Down Expand Up @@ -96,19 +99,19 @@ msgid "Device UUID"
msgstr ""

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:136
msgid "Downlink"
msgstr ""

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:130
msgid "Enable IGDv1 mode"
msgid "Download speed"
msgstr ""

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:125
msgid "Enable NAT-PMP functionality"
msgid "Enable PCP/NAT-PMP protocol"
msgstr ""

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:124
msgid "Enable UPnP functionality"
msgid "Enable UPnP IGD protocol"
msgstr ""

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:130
msgid "Enable UPnP IGDv1 mode"
msgstr ""

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:133
Expand All @@ -133,7 +136,7 @@ msgid "General Settings"
msgstr "الاعدادات العامة"

#: applications/luci-app-upnp/root/usr/share/rpcd/acl.d/luci-app-upnp.json:3
msgid "Grant access to upnp procedures"
msgid "Grant access to UPnP IGD & PCP/NAT-PMP configuration"
msgstr ""

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/status/include/80_upnp.js:46
Expand All @@ -149,14 +152,6 @@ msgstr ""
msgid "Internal ports"
msgstr ""

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:181
msgid "MiniUPnP ACLs"
msgstr ""

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:116
msgid "MiniUPnP settings"
msgstr ""

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:152
msgid "Notify interval"
msgstr ""
Expand All @@ -179,7 +174,7 @@ msgid "Puts extra debugging information into the system log"
msgstr ""

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:146
msgid "Report system instead of daemon uptime"
msgid "Report system instead of service uptime"
msgstr ""

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:172
Expand All @@ -190,32 +185,40 @@ msgstr ""
msgid "STUN Port"
msgstr ""

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:181
msgid "Service ACLs"
msgstr ""

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:116
msgid "Service Settings"
msgstr ""

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:167
msgid "Service lease file"
msgstr ""

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:121
msgid "Start UPnP and NAT-PMP service"
msgid "Start service"
msgstr ""

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/status/include/80_upnp.js:70
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:66
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:110
msgid "There are no active redirects."
msgid "There are no active port forwards."
msgstr ""

#: applications/luci-app-upnp/root/usr/share/luci/menu.d/luci-app-upnp.json:3
msgid "UPnP"
msgstr ""

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:76
msgid ""
"UPnP allows clients in the local network to automatically configure the "
"router."
msgid "UPnP IGD & PCP/NAT-PMP"
msgstr ""

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:167
msgid "UPnP lease file"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:75
msgid "UPnP IGD & PCP/NAT-PMP Service"
msgstr ""

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:75
msgid "Universal Plug & Play"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:76
msgid ""
"UPnP IGD & PCP/NAT-PMP allows clients on the local network to automatically "
"configure port forwards on the router. Also called Universal Plug and Play."
msgstr ""

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/status/include/80_upnp.js:60
Expand All @@ -225,7 +228,7 @@ msgid "Unknown"
msgstr "مجهول"

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:139
msgid "Uplink"
msgid "Upload speed"
msgstr ""

#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:170
Expand All @@ -236,20 +239,3 @@ msgstr ""
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:140
msgid "Value in KByte/s, informational only"
msgstr ""

#~ msgid ""
#~ "UPNP allows clients in the local network to automatically configure the "
#~ "router."
#~ msgstr ""
#~ "UPNP allows clients in the local network to automatically configure the "
#~ "router."

#~ msgid "Log output"
#~ msgstr "Log output"

#~ msgid ""
#~ "UPNP should only be enabled if absolutely necessary as it can result in "
#~ "high security risks for your network."
#~ msgstr ""
#~ "UPNP should only be enabled if absolutely necessary as it can result in "
#~ "high security risks for your network."
Loading

0 comments on commit 4189d18

Please sign in to comment.