• R/O
  • HTTP
  • SSH
  • HTTPS

luci: Commit

LuCI - OpenWrt Configuration Interface


Commit MetaInfo

Revision1c6875beb8f31fe93d515916ffb91015ea030060 (tree)
Time2022-11-25 01:10:15
AuthorTianling Shen <cnsztl@immo...>
CommiterTianling Shen

Log Message

luci-app-turboacc: fix support for mtkhnat

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>

Change Summary

Incremental Difference

--- a/applications/luci-app-turboacc/Makefile
+++ b/applications/luci-app-turboacc/Makefile
@@ -40,7 +40,7 @@ define Package/luci-app-turboacc/config
4040 bool "Use fast classifier"
4141
4242 config PACKAGE_TURBOACC_INCLUDE_SHORTCUT_FE_CM
43- bool "Use SFE connection manager"
43+ bool "Use shortcut-fe connection manager"
4444 endchoice
4545
4646 config PACKAGE_TURBOACC_INCLUDE_BBR_CCA
--- a/applications/luci-app-turboacc/htdocs/luci-static/resources/view/turboacc.js
+++ b/applications/luci-app-turboacc/htdocs/luci-static/resources/view/turboacc.js
@@ -123,7 +123,7 @@ return view.extend({
123123 if (features.hasSHORTCUTFECM)
124124 o.value('shortcut_fe_cm', _('SFE connection manager'));
125125 if (features.hasMEDIATEKHNAT)
126- o.value('mediatek_hnat', _('Mediatek HNAT'));
126+ o.value('mediatek_hnat', _('MediaTek HNAT'));
127127 o.default = 'disabled';
128128 o.rmempty = false;
129129 if (features.hasMEDIATEKHNAT)
@@ -137,7 +137,7 @@ return view.extend({
137137 else if (value === 'shortcut_fe_cm')
138138 desc.innerHTML = _('Simple connection manager for the shortcut forwarding engine.');
139139 else if (value === 'mediatek_hnat')
140- desc.innerHTML = _('Mediatek\'s open source hardware flow offloading engine.');
140+ desc.innerHTML = _('MediaTek\'s open source hardware flow offloading engine.');
141141 else
142142 desc.innerHTML = _('Offload engine for routing/NAT.');
143143 }
--- a/applications/luci-app-turboacc/po/templates/turboacc.pot
+++ b/applications/luci-app-turboacc/po/templates/turboacc.pot
@@ -83,11 +83,11 @@ msgid "IPv6 acceleration"
8383 msgstr ""
8484
8585 #: applications/luci-app-turboacc/htdocs/luci-static/resources/view/turboacc.js:126
86-msgid "Mediatek HNAT"
86+msgid "MediaTek HNAT"
8787 msgstr ""
8888
8989 #: applications/luci-app-turboacc/htdocs/luci-static/resources/view/turboacc.js:140
90-msgid "Mediatek's open source hardware flow offloading engine."
90+msgid "MediaTek's open source hardware flow offloading engine."
9191 msgstr ""
9292
9393 #: applications/luci-app-turboacc/htdocs/luci-static/resources/view/turboacc.js:117
--- a/applications/luci-app-turboacc/po/zh_Hans/turboacc.po
+++ b/applications/luci-app-turboacc/po/zh_Hans/turboacc.po
@@ -90,11 +90,11 @@ msgid "IPv6 acceleration"
9090 msgstr "IPv6 加速"
9191
9292 #: applications/luci-app-turboacc/htdocs/luci-static/resources/view/turboacc.js:126
93-msgid "Mediatek HNAT"
94-msgstr "Mediatek HNAT"
93+msgid "MediaTek HNAT"
94+msgstr "MediaTek HNAT"
9595
9696 #: applications/luci-app-turboacc/htdocs/luci-static/resources/view/turboacc.js:140
97-msgid "Mediatek's open source hardware flow offloading engine."
97+msgid "MediaTek's open source hardware flow offloading engine."
9898 msgstr "由联发科实现的开源硬件流量分载引擎。"
9999
100100 #: applications/luci-app-turboacc/htdocs/luci-static/resources/view/turboacc.js:117
--- a/applications/luci-app-turboacc/root/usr/libexec/rpcd/luci.turboacc
+++ b/applications/luci-app-turboacc/root/usr/libexec/rpcd/luci.turboacc
@@ -37,9 +37,8 @@ local methods = {
3737 fptype = "Fast classifier"
3838 elseif fs.stat("/sys/module/shortcut_fe_cm", "type") == "dir" then
3939 fptype = "Shortcut-FE CM"
40- elseif fs.access("/sys/kernel/debug/hnat/hnat_version") then
41- local hnat_ver = readfile("/sys/kernel/debug/hnat/hnat_version")
42- fptype = string.format("MediaTek HNAT (%s)", hnat_ver)
40+ elseif fs.stat("/sys/kernel/debug/hnat", "type") == "dir" then
41+ fptype = "MediaTek HNAT"
4342 end
4443 print(json.stringify({ type = fptype }))
4544 end
Show on old repository browser