Skip to content

Commit 750a551

Browse files
luci-app-upnp: Adapt to new package UCI configuration options introduced
in openwrt/packages#24988 Signed-off-by: Self-Hosting-Group <[email protected]>
1 parent 645faa7 commit 750a551

File tree

1 file changed

+15
-15
lines changed
  • applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp

1 file changed

+15
-15
lines changed

applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -141,21 +141,24 @@ return view.extend({
141141
o = s.taboption('setup', form.Flag, 'enable_upnp', _('Enable UPnP IGD protocol'));
142142
o.default = '1';
143143

144-
o = s.taboption('setup', form.Flag, 'enable_natpmp', _('Enable PCP/NAT-PMP protocols'));
144+
o = s.taboption('setup', form.Flag, 'enable_pcp_pmp', _('Enable PCP/NAT-PMP protocols'));
145145
o.default = '1';
146146

147-
o = s.taboption('setup', form.Flag, 'igdv1', _('UPnP IGDv1 compatibility mode'),
148-
_('Advertise as IGDv1 (IPv4 only) device instead of IGDv2'));
149-
o.default = '1';
150-
o.rmempty = false;
147+
o = s.taboption('setup', form.ListValue, 'upnp_igd_compat', _('UPnP IGD compatibility mode'),
148+
_('Report as different device to workaround/assist/mignate/pretend IGDv2 incompatible clients'));
149+
o.value('igdv1', _('IGDv1 (IPv4 only)'));
150+
o.value('igdv2', _('IGDv2'));
151+
o.default = 'igdv1';
151152
o.depends('enable_upnp', '1');
152153

153-
o = s.taboption('setup', form.Value, 'download', _('Download speed'),
154-
_('Report maximum download speed in kByte/s'));
154+
o = s.taboption('setup', form.Value, 'download_kbps', _('Download speed'),
155+
_('Report maximum download speed in kbit/s'));
156+
o.placeholder = 'Default interface link speed';
155157
o.depends('enable_upnp', '1');
156158

157-
o = s.taboption('setup', form.Value, 'upload', _('Upload speed'),
158-
_('Report maximum upload speed in kByte/s'));
159+
o = s.taboption('setup', form.Value, 'upload_kbps', _('Upload speed'),
160+
_('Report maximum upload speed in kbit/s'));
161+
o.placeholder = 'Default interface link speed';
159162
o.depends('enable_upnp', '1');
160163

161164
s.taboption('advanced', form.Flag, 'use_stun', _('Use %s', 'Use %s (%s = STUN)')
@@ -171,10 +174,8 @@ return view.extend({
171174
o.datatype = 'port';
172175
o.placeholder = '3478';
173176

174-
o = s.taboption('advanced', form.Flag, 'secure_mode', _('Enable secure mode'),
175-
_('Allow adding port maps for requesting IP addresses only'));
176-
o.default = '1';
177-
o.depends('enable_upnp', '1');
177+
o = s.taboption('advanced', form.Flag, 'allow_third_party_mapping', _('Allow third-party mapping'),
178+
_('Allow adding port maps for non-requesting IP addresses'));
178179

179180
o = s.taboption('advanced', form.Value, 'notify_interval', _('Notify interval'),
180181
_('A 900s interval will result in %s notifications with the minimum max-age of 1800s', 'A 900s interval will result in %s (%s = SSDP) notifications with the minimum max-age of 1800s')
@@ -210,10 +211,9 @@ return view.extend({
210211
_('Puts extra debugging information into the system log'));
211212

212213
o = s.taboption('advanced', form.Value, 'upnp_lease_file', _('Service lease file'));
213-
o.placeholder = '/var/run/miniupnpd.leases';
214214

215215
s = m.section(form.GridSection, 'perm_rule', _('Service Access Control List'),
216-
_('ACL specify which client addresses and ports can be mapped, IPv6 always allowed.'));
216+
_('ACL specify which client addresses and ports can be mapped, IPv6 always allowed. Deny by default.'));
217217
s.sortable = true;
218218
s.anonymous = true;
219219
s.addremove = true;

0 commit comments

Comments
 (0)