summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-upnp
diff options
context:
space:
mode:
Diffstat (limited to 'applications/luci-app-upnp')
-rw-r--r--applications/luci-app-upnp/Makefile2
-rw-r--r--applications/luci-app-upnp/po/da/upnp.po250
-rw-r--r--applications/luci-app-upnp/po/de/upnp.po10
-rw-r--r--applications/luci-app-upnp/po/el/upnp.po12
-rw-r--r--applications/luci-app-upnp/po/fi/upnp.po38
-rw-r--r--applications/luci-app-upnp/po/fr/upnp.po12
-rw-r--r--applications/luci-app-upnp/po/it/upnp.po6
-rw-r--r--applications/luci-app-upnp/po/ko/upnp.po10
-rw-r--r--applications/luci-app-upnp/po/pl/upnp.po9
-rw-r--r--applications/luci-app-upnp/po/ro/upnp.po38
-rw-r--r--applications/luci-app-upnp/po/ru/upnp.po8
-rw-r--r--applications/luci-app-upnp/po/zh_Hant/upnp.po8
-rwxr-xr-xapplications/luci-app-upnp/root/usr/libexec/rpcd/luci.upnp155
-rw-r--r--applications/luci-app-upnp/root/usr/share/rpcd/ucode/luci.upnp139
14 files changed, 466 insertions, 231 deletions
diff --git a/applications/luci-app-upnp/Makefile b/applications/luci-app-upnp/Makefile
index 324e3e2aa4..84a4d48576 100644
--- a/applications/luci-app-upnp/Makefile
+++ b/applications/luci-app-upnp/Makefile
@@ -7,7 +7,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=Universal Plug & Play configuration module
-LUCI_DEPENDS:=+miniupnpd
+LUCI_DEPENDS:=+miniupnpd +rpcd-mod-ucode
include ../../luci.mk
diff --git a/applications/luci-app-upnp/po/da/upnp.po b/applications/luci-app-upnp/po/da/upnp.po
new file mode 100644
index 0000000000..e54cf19636
--- /dev/null
+++ b/applications/luci-app-upnp/po/da/upnp.po
@@ -0,0 +1,250 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-05-19 19:36+0200\n"
+"PO-Revision-Date: 2021-11-13 08:12+0000\n"
+"Last-Translator: drax red <drax@outlook.dk>\n"
+"Language-Team: Danish <https://hosted.weblate.org/projects/openwrt/"
+"luciapplicationsupnp/da/>\n"
+"Language: da\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+"X-Generator: Weblate 4.9.1-dev\n"
+
+#: 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"
+msgstr ""
+"ACL'er angiver, hvilke eksterne porte der kan omdirigeres til hvilke interne "
+"adresser og porte"
+
+#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:202
+msgid "Action"
+msgstr "Handling"
+
+#: 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"
+msgstr "Aktive UPnP-omdirigeringer"
+
+#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:119
+msgid "Advanced Settings"
+msgstr "Avancerede indstillinger"
+
+#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:131
+msgid "Advertise as IGDv1 device instead of IGDv2"
+msgstr "Annoncerer som IGDv1-enhed i stedet for IGDv2"
+
+#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:128
+msgid "Allow adding forwards only to requesting ip addresses"
+msgstr "Tillad kun at tilføje viderestillinger til ip-adresser, der anmoder om"
+
+#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:150
+msgid "Announced model number"
+msgstr "Annonceret modelnummer"
+
+#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:149
+msgid "Announced serial number"
+msgstr "Annonceret serienummer"
+
+#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:160
+msgid "Clean rules interval"
+msgstr "Interval for rene regler"
+
+#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:156
+msgid "Clean rules threshold"
+msgstr "Tærskel for rene regler"
+
+#: applications/luci-app-upnp/htdocs/luci-static/resources/view/status/include/80_upnp.js:45
+#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:85
+msgid "Client Address"
+msgstr "Klient adresse"
+
+#: applications/luci-app-upnp/htdocs/luci-static/resources/view/status/include/80_upnp.js:47
+#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:87
+msgid "Client Port"
+msgstr "Klient port"
+
+#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:188
+msgid "Comment"
+msgstr "Kommentar"
+
+#: applications/luci-app-upnp/htdocs/luci-static/resources/view/status/include/80_upnp.js:66
+#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:62
+#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:106
+msgid "Delete"
+msgstr "Slet"
+
+#: applications/luci-app-upnp/htdocs/luci-static/resources/view/status/include/80_upnp.js:48
+#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:88
+msgid "Description"
+msgstr "Beskrivelse"
+
+#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:148
+msgid "Device UUID"
+msgstr "Enhedens UUID"
+
+#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:136
+msgid "Downlink"
+msgstr "Downlink"
+
+#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:130
+msgid "Enable IGDv1 mode"
+msgstr "Aktiver IGDv1-tilstand"
+
+#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:125
+msgid "Enable NAT-PMP functionality"
+msgstr "Aktiver NAT-PMP-funktionalitet"
+
+#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:124
+msgid "Enable UPnP functionality"
+msgstr "Aktiver UPnP-funktionalitet"
+
+#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:133
+msgid "Enable additional logging"
+msgstr "Aktiver yderligere logning"
+
+#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:127
+msgid "Enable secure mode"
+msgstr "Aktiver sikker tilstand"
+
+#: applications/luci-app-upnp/htdocs/luci-static/resources/view/status/include/80_upnp.js:44
+#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:84
+msgid "External Port"
+msgstr "Ekstern port"
+
+#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:190
+msgid "External ports"
+msgstr "Eksterne porte"
+
+#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:118
+msgid "General Settings"
+msgstr "Generelle indstillinger"
+
+#: applications/luci-app-upnp/root/usr/share/rpcd/acl.d/luci-app-upnp.json:3
+msgid "Grant access to upnp procedures"
+msgstr "Giv adgang til upnp-procedurer"
+
+#: applications/luci-app-upnp/htdocs/luci-static/resources/view/status/include/80_upnp.js:46
+#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:86
+msgid "Host"
+msgstr "Vært"
+
+#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:194
+msgid "Internal addresses"
+msgstr "Interne adresser"
+
+#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:198
+msgid "Internal ports"
+msgstr "Interne porte"
+
+#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:181
+msgid "MiniUPnP ACLs"
+msgstr "MiniUPnP ACL'er"
+
+#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:116
+msgid "MiniUPnP settings"
+msgstr "MiniUPnP-indstillinger"
+
+#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:152
+msgid "Notify interval"
+msgstr "Underretningsinterval"
+
+#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:142
+msgid "Port"
+msgstr "Port"
+
+#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:164
+msgid "Presentation URL"
+msgstr "URL til præsentation"
+
+#: applications/luci-app-upnp/htdocs/luci-static/resources/view/status/include/80_upnp.js:43
+#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:83
+msgid "Protocol"
+msgstr "Protokol"
+
+#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:134
+msgid "Puts extra debugging information into the system log"
+msgstr "Sætter ekstra fejlfindingsoplysninger i systemloggen"
+
+#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:146
+msgid "Report system instead of daemon uptime"
+msgstr "Rapportere system i stedet for dæmonens oppetid"
+
+#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:172
+msgid "STUN Host"
+msgstr "STUN vært"
+
+#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:176
+msgid "STUN Port"
+msgstr "STUN Port"
+
+#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:121
+msgid "Start UPnP and NAT-PMP service"
+msgstr "Start UPnP- og NAT-PMP-tjenesten"
+
+#: 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."
+msgstr "Der er ingen aktive omdirigeringer."
+
+#: applications/luci-app-upnp/root/usr/share/luci/menu.d/luci-app-upnp.json:3
+msgid "UPnP"
+msgstr "UPnP"
+
+#: 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."
+msgstr ""
+"UPnP gør det muligt for klienter i det lokale netværk at konfigurere "
+"routeren automatisk."
+
+#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:167
+msgid "UPnP lease file"
+msgstr "UPnP-lease-fil"
+
+#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:75
+msgid "Universal Plug & Play"
+msgstr "Universelt plug &play"
+
+#: applications/luci-app-upnp/htdocs/luci-static/resources/view/status/include/80_upnp.js:60
+#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:56
+#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:100
+msgid "Unknown"
+msgstr "Ukendt"
+
+#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:139
+msgid "Uplink"
+msgstr "Uplink"
+
+#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:170
+msgid "Use STUN"
+msgstr "Brug STUN"
+
+#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:137
+#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:140
+msgid "Value in KByte/s, informational only"
+msgstr "Værdi i KByte/s, kun til information"
+
+#~ 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."
diff --git a/applications/luci-app-upnp/po/de/upnp.po b/applications/luci-app-upnp/po/de/upnp.po
index 10d5838612..d2e9faa452 100644
--- a/applications/luci-app-upnp/po/de/upnp.po
+++ b/applications/luci-app-upnp/po/de/upnp.po
@@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-05-26 17:57+0200\n"
-"PO-Revision-Date: 2020-07-11 21:29+0000\n"
+"PO-Revision-Date: 2022-02-24 06:56+0000\n"
"Last-Translator: ssantos <ssantos@web.de>\n"
"Language-Team: German <https://hosted.weblate.org/projects/openwrt/"
"luciapplicationsupnp/de/>\n"
@@ -12,7 +12,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 4.2-dev\n"
+"X-Generator: Weblate 4.11-dev\n"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:182
msgid ""
@@ -177,11 +177,11 @@ msgstr "Systemlaufzeit statt Prozesslaufzeit melden"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:172
msgid "STUN Host"
-msgstr ""
+msgstr "STUN-Host"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:176
msgid "STUN Port"
-msgstr ""
+msgstr "STUN-Port"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:121
msgid "Start UPnP and NAT-PMP service"
@@ -225,7 +225,7 @@ msgstr "Uplink"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:170
msgid "Use STUN"
-msgstr ""
+msgstr "STUN verwenden"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:137
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:140
diff --git a/applications/luci-app-upnp/po/el/upnp.po b/applications/luci-app-upnp/po/el/upnp.po
index 03fbaa14ce..00046fec7d 100644
--- a/applications/luci-app-upnp/po/el/upnp.po
+++ b/applications/luci-app-upnp/po/el/upnp.po
@@ -3,8 +3,8 @@ msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-05-28 02:08+0200\n"
-"PO-Revision-Date: 2021-01-23 03:57+0000\n"
-"Last-Translator: Savvas Sfantos <savvassfa@gmail.com>\n"
+"PO-Revision-Date: 2022-10-03 08:34+0000\n"
+"Last-Translator: TakissX <pxatzidakis@gmail.com>\n"
"Language-Team: Greek <https://hosted.weblate.org/projects/openwrt/"
"luciapplicationsupnp/el/>\n"
"Language: el\n"
@@ -12,7 +12,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 4.5-dev\n"
+"X-Generator: Weblate 4.14.1\n"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:182
msgid ""
@@ -22,7 +22,7 @@ msgstr ""
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:202
msgid "Action"
-msgstr ""
+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
@@ -69,7 +69,7 @@ msgstr ""
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:188
msgid "Comment"
-msgstr ""
+msgstr "Σχόλιο"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/status/include/80_upnp.js:66
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:62
@@ -163,7 +163,7 @@ msgstr ""
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/status/include/80_upnp.js:43
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:83
msgid "Protocol"
-msgstr ""
+msgstr "Πρωτόκολλο"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:134
msgid "Puts extra debugging information into the system log"
diff --git a/applications/luci-app-upnp/po/fi/upnp.po b/applications/luci-app-upnp/po/fi/upnp.po
index 04b809063d..8a4d50fb63 100644
--- a/applications/luci-app-upnp/po/fi/upnp.po
+++ b/applications/luci-app-upnp/po/fi/upnp.po
@@ -3,8 +3,8 @@ msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-05-19 19:36+0200\n"
-"PO-Revision-Date: 2021-09-09 14:30+0000\n"
-"Last-Translator: Demian Wright <wright.demian+weblate@gmail.com>\n"
+"PO-Revision-Date: 2022-04-21 23:00+0000\n"
+"Last-Translator: Jiri Grönroos <jiri.gronroos@iki.fi>\n"
"Language-Team: Finnish <https://hosted.weblate.org/projects/openwrt/"
"luciapplicationsupnp/fi/>\n"
"Language: fi\n"
@@ -12,7 +12,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 4.8.1-dev\n"
+"X-Generator: Weblate 4.12-dev\n"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:182
msgid ""
@@ -27,7 +27,7 @@ msgstr "Toiminta"
#: 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"
-msgstr ""
+msgstr "Aktiivise UPnP-uudelleenohjaukset"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:119
msgid "Advanced Settings"
@@ -84,7 +84,7 @@ msgstr "Kuvaus"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:148
msgid "Device UUID"
-msgstr ""
+msgstr "Laitteen UUID"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:136
msgid "Downlink"
@@ -92,15 +92,15 @@ msgstr ""
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:130
msgid "Enable IGDv1 mode"
-msgstr ""
+msgstr "Käytä IGDv1-tilaa"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:125
msgid "Enable NAT-PMP functionality"
-msgstr ""
+msgstr "Käytä NAT-PMP-toiminnallisuutta"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:124
msgid "Enable UPnP functionality"
-msgstr ""
+msgstr "Käytä UPnP-toiminnallisuutta"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:133
msgid "Enable additional logging"
@@ -113,15 +113,15 @@ msgstr ""
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/status/include/80_upnp.js:44
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:84
msgid "External Port"
-msgstr ""
+msgstr "Ulkoinen portti"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:190
msgid "External ports"
-msgstr ""
+msgstr "Ulkoiset portit"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:118
msgid "General Settings"
-msgstr "Yleisasetukset"
+msgstr "Yleiset asetukset"
#: applications/luci-app-upnp/root/usr/share/rpcd/acl.d/luci-app-upnp.json:3
msgid "Grant access to upnp procedures"
@@ -134,11 +134,11 @@ msgstr "Palvelin"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:194
msgid "Internal addresses"
-msgstr ""
+msgstr "Sisäiset osoitteet"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:198
msgid "Internal ports"
-msgstr ""
+msgstr "Sisäiset portit"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:181
msgid "MiniUPnP ACLs"
@@ -146,11 +146,11 @@ msgstr ""
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:116
msgid "MiniUPnP settings"
-msgstr ""
+msgstr "MiniUPnP-asetukset"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:152
msgid "Notify interval"
-msgstr ""
+msgstr "Ilmoitusväli"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:142
msgid "Port"
@@ -183,13 +183,13 @@ msgstr ""
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:121
msgid "Start UPnP and NAT-PMP service"
-msgstr ""
+msgstr "Käynnistä UPnP- ja NAT-PMP-palvelu"
#: 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."
-msgstr ""
+msgstr "Ei aktiivisia uudelleenohjauksia."
#: applications/luci-app-upnp/root/usr/share/luci/menu.d/luci-app-upnp.json:3
msgid "UPnP"
@@ -203,7 +203,7 @@ msgstr ""
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:167
msgid "UPnP lease file"
-msgstr ""
+msgstr "UPnP-lainatiedosto"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:75
msgid "Universal Plug & Play"
@@ -221,7 +221,7 @@ msgstr "Lähetysyhteys"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:170
msgid "Use STUN"
-msgstr ""
+msgstr "Käytä STUN:ia"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:137
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:140
diff --git a/applications/luci-app-upnp/po/fr/upnp.po b/applications/luci-app-upnp/po/fr/upnp.po
index 04c8c4cb98..47def8e9f5 100644
--- a/applications/luci-app-upnp/po/fr/upnp.po
+++ b/applications/luci-app-upnp/po/fr/upnp.po
@@ -3,8 +3,8 @@ msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-05-19 19:36+0200\n"
-"PO-Revision-Date: 2020-06-24 17:41+0000\n"
-"Last-Translator: viking76 <liaudetgael@gmail.com>\n"
+"PO-Revision-Date: 2022-02-04 18:56+0000\n"
+"Last-Translator: ButterflyOfFire <ButterflyOfFire@protonmail.com>\n"
"Language-Team: French <https://hosted.weblate.org/projects/openwrt/"
"luciapplicationsupnp/fr/>\n"
"Language: fr\n"
@@ -12,7 +12,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
-"X-Generator: Weblate 4.2-dev\n"
+"X-Generator: Weblate 4.11-dev\n"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:182
msgid ""
@@ -180,11 +180,11 @@ msgstr ""
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:172
msgid "STUN Host"
-msgstr ""
+msgstr "Hôte STUN"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:176
msgid "STUN Port"
-msgstr ""
+msgstr "Port STUN"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:121
msgid "Start UPnP and NAT-PMP service"
@@ -228,7 +228,7 @@ msgstr "Liaison montante"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:170
msgid "Use STUN"
-msgstr ""
+msgstr "Utiliser STUN"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:137
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:140
diff --git a/applications/luci-app-upnp/po/it/upnp.po b/applications/luci-app-upnp/po/it/upnp.po
index bd6baa7690..5e5d168a38 100644
--- a/applications/luci-app-upnp/po/it/upnp.po
+++ b/applications/luci-app-upnp/po/it/upnp.po
@@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-05-19 19:36+0200\n"
-"PO-Revision-Date: 2021-09-15 08:34+0000\n"
+"PO-Revision-Date: 2022-02-18 20:58+0000\n"
"Last-Translator: pisquan8 <cimurro@outlook.de>\n"
"Language-Team: Italian <https://hosted.weblate.org/projects/openwrt/"
"luciapplicationsupnp/it/>\n"
@@ -12,7 +12,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 4.9-dev\n"
+"X-Generator: Weblate 4.11-dev\n"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:182
msgid ""
@@ -156,7 +156,7 @@ msgstr "Intervallo di notifica"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:142
msgid "Port"
-msgstr "Port"
+msgstr "Porta"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:164
msgid "Presentation URL"
diff --git a/applications/luci-app-upnp/po/ko/upnp.po b/applications/luci-app-upnp/po/ko/upnp.po
index 4811bcf212..96c4a89abb 100644
--- a/applications/luci-app-upnp/po/ko/upnp.po
+++ b/applications/luci-app-upnp/po/ko/upnp.po
@@ -3,8 +3,8 @@ msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-05-19 19:36+0200\n"
-"PO-Revision-Date: 2021-06-07 10:49+0000\n"
-"Last-Translator: Sunggu Choi <dkaost@outlook.com>\n"
+"PO-Revision-Date: 2022-07-31 13:17+0000\n"
+"Last-Translator: somni <me@somni.one>\n"
"Language-Team: Korean <https://hosted.weblate.org/projects/openwrt/"
"luciapplicationsupnp/ko/>\n"
"Language: ko\n"
@@ -12,7 +12,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Weblate 4.7-dev\n"
+"X-Generator: Weblate 4.14-dev\n"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:182
msgid ""
@@ -75,7 +75,7 @@ msgstr ""
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:62
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:106
msgid "Delete"
-msgstr ""
+msgstr "삭제"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/status/include/80_upnp.js:48
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:88
@@ -163,7 +163,7 @@ msgstr ""
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/status/include/80_upnp.js:43
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:83
msgid "Protocol"
-msgstr ""
+msgstr "프로토콜"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:134
msgid "Puts extra debugging information into the system log"
diff --git a/applications/luci-app-upnp/po/pl/upnp.po b/applications/luci-app-upnp/po/pl/upnp.po
index d169b86e80..e6c991c08b 100644
--- a/applications/luci-app-upnp/po/pl/upnp.po
+++ b/applications/luci-app-upnp/po/pl/upnp.po
@@ -1,8 +1,8 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"PO-Revision-Date: 2021-06-26 18:17+0000\n"
-"Last-Translator: Adam Stańczyk <a.stanczyk@onet.pl>\n"
+"PO-Revision-Date: 2022-06-10 13:18+0000\n"
+"Last-Translator: Matthaiks <kitynska@gmail.com>\n"
"Language-Team: Polish <https://hosted.weblate.org/projects/openwrt/"
"luciapplicationsupnp/pl/>\n"
"Language: pl\n"
@@ -11,7 +11,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
"|| n%100>=20) ? 1 : 2;\n"
-"X-Generator: Weblate 4.7.1-dev\n"
+"X-Generator: Weblate 4.13-dev\n"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:182
msgid ""
@@ -168,7 +168,8 @@ msgstr "Protokół"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:134
msgid "Puts extra debugging information into the system log"
-msgstr "Dodaje dodatkowe informacje debugowania do loga systemowego"
+msgstr ""
+"Umieszcza dodatkowe informacje dotyczące debugowania w dzienniku systemowym"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:146
msgid "Report system instead of daemon uptime"
diff --git a/applications/luci-app-upnp/po/ro/upnp.po b/applications/luci-app-upnp/po/ro/upnp.po
index 5119773a14..41dd562853 100644
--- a/applications/luci-app-upnp/po/ro/upnp.po
+++ b/applications/luci-app-upnp/po/ro/upnp.po
@@ -1,8 +1,8 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"PO-Revision-Date: 2020-03-29 12:19+0000\n"
-"Last-Translator: Cristian Ionescu <joker_op@yahoo.com>\n"
+"PO-Revision-Date: 2022-01-25 22:56+0000\n"
+"Last-Translator: CRISTIAN ANDREI <cristianvdr@gmail.com>\n"
"Language-Team: Romanian <https://hosted.weblate.org/projects/openwrt/"
"luciapplicationsupnp/ro/>\n"
"Language: ro\n"
@@ -11,7 +11,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < "
"20)) ? 1 : 2;\n"
-"X-Generator: Weblate 4.0-dev\n"
+"X-Generator: Weblate 4.11-dev\n"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:182
msgid ""
@@ -23,7 +23,7 @@ msgstr ""
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:202
msgid "Action"
-msgstr "Actiune"
+msgstr "Acțiune"
#: 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
@@ -36,7 +36,7 @@ msgstr "Setări avansate"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:131
msgid "Advertise as IGDv1 device instead of IGDv2"
-msgstr ""
+msgstr "Publicitate ca dispozitiv IGDv1 în loc de IGDv2"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:128
msgid "Allow adding forwards only to requesting ip addresses"
@@ -44,11 +44,11 @@ msgstr "Permite adaugarea forward-urilor doar catre adresele ip solicitante"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:150
msgid "Announced model number"
-msgstr "Numar de model anuntat"
+msgstr "Numărul modelului anunțat"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:149
msgid "Announced serial number"
-msgstr "Numar serial anuntat"
+msgstr "Număr de serie anunțat"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:160
msgid "Clean rules interval"
@@ -76,7 +76,7 @@ msgstr "Comentariu"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:62
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:106
msgid "Delete"
-msgstr ""
+msgstr "Ștergeți"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/status/include/80_upnp.js:48
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:88
@@ -89,11 +89,11 @@ msgstr "UUID al dispozitivului"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:136
msgid "Downlink"
-msgstr "Downlink"
+msgstr "Link în jos"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:130
msgid "Enable IGDv1 mode"
-msgstr ""
+msgstr "Activează modul IGDv1"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:125
msgid "Enable NAT-PMP functionality"
@@ -126,12 +126,12 @@ msgstr "Setări generale"
#: applications/luci-app-upnp/root/usr/share/rpcd/acl.d/luci-app-upnp.json:3
msgid "Grant access to upnp procedures"
-msgstr ""
+msgstr "Acordarea accesului la procedurile upnp"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/status/include/80_upnp.js:46
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:86
msgid "Host"
-msgstr ""
+msgstr "Gazdă"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:194
msgid "Internal addresses"
@@ -176,15 +176,15 @@ msgstr "Raporteaza timpul de functionare de sistem in loc de serviciu"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:172
msgid "STUN Host"
-msgstr ""
+msgstr "Gazda STUN"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:176
msgid "STUN Port"
-msgstr ""
+msgstr "Portul STUN"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:121
msgid "Start UPnP and NAT-PMP service"
-msgstr "Porneste UPnP si serviciul NAT-PMP"
+msgstr "Porniți UPnP și serviciul NAT-PMP"
#: 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
@@ -209,21 +209,21 @@ msgstr "Fisierul de conexiuni UPnP"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:75
msgid "Universal Plug & Play"
-msgstr "Universal Plug & Play"
+msgstr "Plug & Play universal"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/status/include/80_upnp.js:60
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:56
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:100
msgid "Unknown"
-msgstr ""
+msgstr "Necunoscut"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:139
msgid "Uplink"
-msgstr "Uplink"
+msgstr "Legătură ascendentă"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:170
msgid "Use STUN"
-msgstr ""
+msgstr "Utilizați STUN"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:137
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:140
diff --git a/applications/luci-app-upnp/po/ru/upnp.po b/applications/luci-app-upnp/po/ru/upnp.po
index a4e50e6b1f..df2a9063fa 100644
--- a/applications/luci-app-upnp/po/ru/upnp.po
+++ b/applications/luci-app-upnp/po/ru/upnp.po
@@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: LuCI: upnp\n"
"POT-Creation-Date: 2009-05-19 19:36+0200\n"
-"PO-Revision-Date: 2021-03-11 08:13+0000\n"
-"Last-Translator: Artem <KovalevArtem.ru@gmail.com>\n"
+"PO-Revision-Date: 2021-10-26 14:59+0000\n"
+"Last-Translator: Darin Avdeyeva <yulyablack@inbox.lv>\n"
"Language-Team: Russian <https://hosted.weblate.org/projects/openwrt/"
"luciapplicationsupnp/ru/>\n"
"Language: ru\n"
@@ -12,7 +12,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
-"X-Generator: Weblate 4.5.2-dev\n"
+"X-Generator: Weblate 4.9-dev\n"
"Project-Info: Это технический перевод, не дословный. Главное-удобный русский "
"интерфейс, все проверялось в графическом режиме, совместим с другими apps\n"
@@ -134,7 +134,7 @@ msgstr "Предоставить доступ к процедурам UPnP"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/status/include/80_upnp.js:46
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:86
msgid "Host"
-msgstr "Хост"
+msgstr "Устройство"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:194
msgid "Internal addresses"
diff --git a/applications/luci-app-upnp/po/zh_Hant/upnp.po b/applications/luci-app-upnp/po/zh_Hant/upnp.po
index a7da95b4e6..1f45165420 100644
--- a/applications/luci-app-upnp/po/zh_Hant/upnp.po
+++ b/applications/luci-app-upnp/po/zh_Hant/upnp.po
@@ -4,8 +4,8 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"PO-Revision-Date: 2021-04-13 11:51+0000\n"
-"Last-Translator: LGA1150 <dqfext@gmail.com>\n"
+"PO-Revision-Date: 2022-02-05 09:21+0000\n"
+"Last-Translator: Hulen <shift0106@gmail.com>\n"
"Language-Team: Chinese (Traditional) <https://hosted.weblate.org/projects/"
"openwrt/luciapplicationsupnp/zh_Hant/>\n"
"Language: zh_Hant\n"
@@ -13,7 +13,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Weblate 4.6-dev\n"
+"X-Generator: Weblate 4.11-dev\n"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:182
msgid ""
@@ -155,7 +155,7 @@ msgstr "通知時間間隔"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:142
msgid "Port"
-msgstr "通訊埠"
+msgstr "連接埠"
#: applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js:164
msgid "Presentation URL"
diff --git a/applications/luci-app-upnp/root/usr/libexec/rpcd/luci.upnp b/applications/luci-app-upnp/root/usr/libexec/rpcd/luci.upnp
deleted file mode 100755
index a122360c61..0000000000
--- a/applications/luci-app-upnp/root/usr/libexec/rpcd/luci.upnp
+++ /dev/null
@@ -1,155 +0,0 @@
-#!/usr/bin/env lua
-
-local json = require "luci.jsonc"
-local UCI = require "luci.model.uci"
-local fs = require "nixio.fs"
-local sys = require "luci.sys"
-
-local methods = {
- get_status = {
- call = function()
- local uci = UCI.cursor()
- local lease_file = uci:get("upnpd", "config", "upnp_lease_file")
-
- local ipv4_hints = sys.net.ipv4_hints()
- local rule = { }
-
- local ipt = io.popen("iptables --line-numbers -t nat -xnvL MINIUPNPD 2>/dev/null")
- if ipt then
- local upnpf = lease_file and io.open(lease_file, "r")
- while true do
- local ln = ipt:read("*l")
- if not ln then
- break
- elseif ln:match("^%d+") then
- local num, proto, extport, intaddr, intport =
- ln:match("^(%d+).-([a-z]+).-dpt:(%d+) to:(%S-):(%d+)")
- local descr = ""
-
- if num and proto and extport and intaddr and intport then
- extport = tonumber(extport)
- intport = tonumber(intport)
-
- if upnpf then
- local uln = upnpf:read("*l")
- if uln then descr = uln:match(string.format("^%s:%d:%s:%d:%%d*:(.*)$", proto:upper(), extport, intaddr, intport)) end
- if not descr then descr = "" end
- end
-
- local host_hint, _, e
-
- for _,e in pairs(ipv4_hints) do
- if e[1] == intaddr then
- host_hint = e[2]
- break
- end
- end
-
- rule[#rule+1] = {
- num = num,
- proto = proto:upper(),
- extport = extport,
- intaddr = intaddr,
- host_hint = host_hint,
- intport = intport,
- descr = descr
- }
- end
- end
- end
-
- if upnpf then upnpf:close() end
- ipt:close()
- end
-
- return { rules = rule }
- end
- },
- delete_rule = {
- args = { token = "token" },
- call = function(args)
- local util = require "luci.util"
- local idx = args and tonumber(args.token)
- local res = {}
-
- if idx and idx > 0 then
- local uci = UCI.cursor()
-
- sys.call("iptables -t filter -D MINIUPNPD %d 2>/dev/null" % idx)
- sys.call("iptables -t nat -D MINIUPNPD %d 2>/dev/null" % idx)
-
- local lease_file = uci:get("upnpd", "config", "upnp_lease_file")
- if lease_file and fs.access(lease_file) then
- sys.call("sed -i -e '%dd' %s" %{ idx, util.shellquote(lease_file) })
- end
-
- uci.unload()
-
- return { result = "OK" }
- end
-
- return { result = "Bad request" }
- end
- }
-}
-
-local function parseInput()
- local parse = json.new()
- local done, err
-
- while true do
- local chunk = io.read(4096)
- if not chunk then
- break
- elseif not done and not err then
- done, err = parse:parse(chunk)
- end
- end
-
- if not done then
- print(json.stringify({ error = err or "Incomplete input" }))
- os.exit(1)
- end
-
- return parse:get()
-end
-
-local function validateArgs(func, uargs)
- local method = methods[func]
- if not method then
- print(json.stringify({ error = "Method not found" }))
- os.exit(1)
- end
-
- if type(uargs) ~= "table" then
- print(json.stringify({ error = "Invalid arguments" }))
- os.exit(1)
- end
-
- uargs.ubus_rpc_session = nil
-
- local k, v
- local margs = method.args or {}
- for k, v in pairs(uargs) do
- if margs[k] == nil or
- (v ~= nil and type(v) ~= type(margs[k]))
- then
- print(json.stringify({ error = "Invalid arguments" }))
- os.exit(1)
- end
- end
-
- return method
-end
-
-if arg[1] == "list" then
- local _, method, rv = nil, nil, {}
- for _, method in pairs(methods) do rv[_] = method.args or {} end
- print((json.stringify(rv):gsub(":%[%]", ":{}")))
-elseif arg[1] == "call" then
- local args = parseInput()
- local method = validateArgs(arg[2], args)
- local result, code = method.call(args)
- print((json.stringify(result):gsub("^%[%]$", "{}")))
- os.exit(code or 0)
-end \ No newline at end of file
diff --git a/applications/luci-app-upnp/root/usr/share/rpcd/ucode/luci.upnp b/applications/luci-app-upnp/root/usr/share/rpcd/ucode/luci.upnp
new file mode 100644
index 0000000000..9ee47f2968
--- /dev/null
+++ b/applications/luci-app-upnp/root/usr/share/rpcd/ucode/luci.upnp
@@ -0,0 +1,139 @@
+// Copyright 2022 Jo-Philipp Wich <jo@mein.io>
+// Licensed to the public under the Apache License 2.0.
+
+'use strict';
+
+import { access, open, popen } from 'fs';
+import { connect } from 'ubus';
+import { cursor } from 'uci';
+
+// Establish ubus connection persistently outside of the call handler scope to
+// prevent premature GC'ing. Can be moved into `get_status` callback once
+// https://github.com/jow-/ucode/commit/a58fe4709f661b5f28e26701ea8638efccf5aeb6
+// is merged.
+const ubus = connect();
+
+const methods = {
+ get_status: {
+ call: function(req) {
+ const uci = cursor();
+
+ const rules = [];
+ const leases = [];
+
+ const leasefile = open(uci.get('upnpd', 'config', 'upnp_lease_file'), 'r');
+
+ if (leasefile) {
+ for (let line = leasefile.read('line'); length(line); line = leasefile.read('line')) {
+ const record = split(line, ':', 6);
+
+ if (length(record) == 6) {
+ push(leases, {
+ proto: uc(record[0]),
+ extport: +record[1],
+ intaddr: arrtoip(iptoarr(record[2])),
+ intport: +record[3],
+ expiry: +record[4],
+ description: trim(record[5])
+ });
+ }
+ }
+
+ leasefile.close();
+ }
+
+ const ipt = popen('iptables --line-numbers -t nat -xnvL MINIUPNPD 2>/dev/null');
+
+ if (ipt) {
+ for (let line = ipt.read('line'); length(line); line = ipt.read('line')) {
+ let m = match(line, /^([0-9]+)\s+([a-z]+).+dpt:([0-9]+) to:(\S+):([0-9]+)/);
+
+ if (m) {
+ push(rules, {
+ num: m[1],
+ proto: uc(m[2]),
+ extport: +m[3],
+ intaddr: arrtoip(iptoarr(m[4])),
+ intport: +m[5],
+ descr: ''
+ });
+ }
+ }
+
+ ipt.close();
+ }
+
+ const nft = popen('nft --handle list chain inet fw4 upnp_prerouting 2>/dev/null');
+
+ if (nft) {
+ for (let line = nft.read('line'), num = 1; length(line); line = nft.read('line')) {
+ let m = match(line, /^\t\tiif ".+" @nh,72,8 (0x6|0x11) th dport ([0-9]+) dnat ip to ([0-9.]+):([0-9]+)/);
+
+ if (m) {
+ push(rules, {
+ num: `${num}`,
+ proto: (m[1] == '0x6') ? 'TCP' : 'UDP',
+ extport: +m[2],
+ intaddr: arrtoip(iptoarr(m[3])),
+ intport: +m[4],
+ descr: ''
+ });
+
+ num++;
+ }
+ }
+
+ nft.close();
+ }
+
+ return ubus.defer('luci-rpc', 'getHostHints', {}, function(rc, host_hints) {
+ for (let rule in rules) {
+ for (let lease in leases) {
+ if (lease.proto == rule.proto &&
+ lease.intaddr == rule.intaddr &&
+ lease.intport == rule.intport &&
+ lease.extport == rule.extport)
+ {
+ rule.descr = lease.description;
+ break;
+ }
+ }
+
+ for (let mac, hint in host_hints) {
+ if (rule.intaddr in hint.ipaddrs) {
+ rule.host_hint = hint.name;
+ break;
+ }
+ }
+ }
+
+ req.reply({ rules });
+ });
+ }
+ },
+
+ delete_rule: {
+ args: { token: 'token' },
+ call: function(req) {
+ const idx = +req.args?.token;
+
+ if (idx > 0) {
+ const uci = cursor();
+ const leasefile = uci.get('upnpd', 'config', 'upnp_lease_file');
+
+ if (access(leasefile)) {
+ system(['sed', '-i', '-e', `${idx}d`, leasefile]);
+ system(['/etc/init.d/miniupnpd', 'restart']);
+ }
+
+ return { result: 'OK' };
+ }
+
+ return { result: 'Bad request' };
+ }
+ }
+};
+
+return { 'luci.upnp': methods };
+
+