OSDN Git Service

luci-app-v2raya: add nftables_support option
authorTianling Shen <cnsztl@immortalwrt.org>
Mon, 20 Mar 2023 17:54:20 +0000 (01:54 +0800)
committerTianling Shen <cnsztl@immortalwrt.org>
Mon, 20 Mar 2023 17:54:20 +0000 (01:54 +0800)
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
luci-app-v2raya/Makefile
luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js
luci-app-v2raya/po/templates/v2raya.pot
luci-app-v2raya/po/zh_Hans/v2raya.po

index 1abb8c1..a68f3c5 100644 (file)
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
 LUCI_TITLE:=LuCI support for v2rayA
 LUCI_DEPENDS:=+v2raya
 LUCI_PKGARCH:=all
-PKG_VERSION:=$(COMMITCOUNT)
+PKG_VERSION:=10
 
 include $(TOPDIR)/feeds/luci/luci.mk
 
index c6af6d3..9cd682f 100644 (file)
@@ -5,12 +5,9 @@
 
 'use strict';
 'require form';
-'require fs';
 'require poll';
 'require rpc';
 'require uci';
-'require ui';
-'require validation';
 'require view';
 
 var callServiceList = rpc.declare({
@@ -97,6 +94,14 @@ return view.extend({
                o.default = 'auto';
                o.rmempty = false;
 
+               o = s.option(form.ListValue, 'nftables_support', _('Nftables support'),
+                       _('Make sure you have installed nftables before you turn it on.'));
+               o.value('auto', _('Auto'));
+               o.value('on', _('On'));
+               o.value('off', _('Off'));
+               o.default = 'auto';
+               o.rmempty = false;
+
                o = s.option(form.ListValue, 'log_level', _('Log level'));
                o.value('trace', _('Trace'));
                o.value('debug', _('Debug'));
@@ -117,15 +122,12 @@ return view.extend({
                        _('Maximum number of days to keep log files.'));
                o.datatype = 'uinteger';
                o.default = '3';
-               o.rmempty = false;
 
                o = s.option(form.Flag, 'log_disable_color', _('Disable log color output'));
-               o.default = o.enabled;
-               o.rmempty = false;
+               o.default = o.disabled;
 
                o = s.option(form.Flag, 'log_disable_timestamp', _('Disable log timestamp'));
                o.default = o.disabled;
-               o.rmempty = false;
 
                o = s.option(form.Value, 'v2ray_bin', _('v2ray binary path'),
                        _('Executable v2ray binary path. Auto-detect if put it empty (recommended).'));
index 84c0584..8a4e77c 100644 (file)
@@ -1,17 +1,18 @@
 msgid ""
 msgstr "Content-Type: text/plain; charset=UTF-8"
 
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:135
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:137
 msgid ""
 "Additional v2ray config directory, files in it will be combined with config "
 "generated by v2rayA."
 msgstr ""
 
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:94
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:91
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:99
 msgid "Auto"
 msgstr ""
 
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:72
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:69
 #: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/log.js:35
 msgid "Collecting data..."
 msgstr ""
@@ -20,36 +21,36 @@ msgstr ""
 msgid "Configuration"
 msgstr ""
 
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:87
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:84
 msgid "Configuration directory"
 msgstr ""
 
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:102
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:107
 msgid "Debug"
 msgstr ""
 
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:122
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:126
 msgid "Disable log color output"
 msgstr ""
 
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:126
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:129
 msgid "Disable log timestamp"
 msgstr ""
 
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:78
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:75
 msgid "Enable"
 msgstr ""
 
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:105
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:110
 msgid "Error"
 msgstr ""
 
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:131
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:133
 msgid ""
 "Executable v2ray binary path. Auto-detect if put it empty (recommended)."
 msgstr ""
 
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:134
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:136
 msgid "Extra config directory"
 msgstr ""
 
@@ -57,15 +58,15 @@ msgstr ""
 msgid "Grant access to v2rayA configuration"
 msgstr ""
 
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:92
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:89
 msgid "IPv6 support"
 msgstr ""
 
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:103
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:108
 msgid "Info"
 msgstr ""
 
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:82
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:79
 msgid "Listening address"
 msgstr ""
 
@@ -81,7 +82,7 @@ msgstr ""
 msgid "Log file does not exist."
 msgstr ""
 
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:109
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:114
 msgid "Log file path"
 msgstr ""
 
@@ -89,39 +90,49 @@ msgstr ""
 msgid "Log is clean."
 msgstr ""
 
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:100
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:105
 msgid "Log level"
 msgstr ""
 
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:93
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:98
+msgid "Make sure you have installed nftables before you turn it on."
+msgstr ""
+
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:90
 msgid "Make sure your IPv6 network works fine before you turn it on."
 msgstr ""
 
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:116
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:121
 msgid "Max log retention period"
 msgstr ""
 
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:117
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:122
 msgid "Maximum number of days to keep log files."
 msgstr ""
 
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:41
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:38
 msgid "NOT RUNNING"
 msgstr ""
 
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:96
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:97
+msgid "Nftables support"
+msgstr ""
+
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:93
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:101
 msgid "Off"
 msgstr ""
 
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:95
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:92
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:100
 msgid "On"
 msgstr ""
 
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:38
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:35
 msgid "Open Web Interface"
 msgstr ""
 
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:39
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:36
 msgid "RUNNING"
 msgstr ""
 
@@ -129,7 +140,7 @@ msgstr ""
 msgid "Refresh every %s seconds."
 msgstr ""
 
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:101
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:106
 msgid "Trace"
 msgstr ""
 
@@ -137,22 +148,22 @@ msgstr ""
 msgid "Unknown error: %s"
 msgstr ""
 
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:104
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:109
 msgid "Warn"
 msgstr ""
 
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:130
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:132
 msgid "v2ray binary path"
 msgstr ""
 
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:39
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:41
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:58
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:36
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:38
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:55
 #: applications/luci-app-v2raya/root/usr/share/luci/menu.d/luci-app-v2raya.json:3
 msgid "v2rayA"
 msgstr ""
 
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:59
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:56
 msgid ""
 "v2rayA is a V2Ray Linux client supporting global transparent proxy, "
 "compatible with SS, SSR, Trojan(trojan-go), PingTunnel protocols."
index e28c10f..c7398d0 100644 (file)
@@ -8,18 +8,19 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:135
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:137
 msgid ""
 "Additional v2ray config directory, files in it will be combined with config "
 "generated by v2rayA."
 msgstr ""
 "附加 v2ray 配置目录,包含在其中的文件将被合并至 v2rayA 生成的配置文件中。"
 
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:94
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:91
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:99
 msgid "Auto"
 msgstr "自动"
 
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:72
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:69
 #: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/log.js:35
 msgid "Collecting data..."
 msgstr "收集数据中..."
@@ -28,36 +29,36 @@ msgstr "收集数据中..."
 msgid "Configuration"
 msgstr "配置"
 
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:87
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:84
 msgid "Configuration directory"
 msgstr "配置文件目录"
 
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:102
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:107
 msgid "Debug"
 msgstr "调试"
 
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:122
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:126
 msgid "Disable log color output"
 msgstr "禁用日志彩色输出"
 
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:126
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:129
 msgid "Disable log timestamp"
 msgstr "禁用日志时间戳"
 
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:78
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:75
 msgid "Enable"
 msgstr "启用"
 
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:105
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:110
 msgid "Error"
 msgstr "错误"
 
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:131
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:133
 msgid ""
 "Executable v2ray binary path. Auto-detect if put it empty (recommended)."
 msgstr "v2ray 可执行二进制文件目录。留空以自动检测(推荐)。"
 
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:134
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:136
 msgid "Extra config directory"
 msgstr "附加配置目录"
 
@@ -65,15 +66,15 @@ msgstr "附加配置目录"
 msgid "Grant access to v2rayA configuration"
 msgstr "授予访问 v2rayA 配置的权限"
 
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:92
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:89
 msgid "IPv6 support"
 msgstr "IPv6 支持"
 
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:103
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:108
 msgid "Info"
 msgstr "信息"
 
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:82
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:79
 msgid "Listening address"
 msgstr "监听地址"
 
@@ -89,7 +90,7 @@ msgstr "日志"
 msgid "Log file does not exist."
 msgstr "日志文件不存在。"
 
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:109
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:114
 msgid "Log file path"
 msgstr "日志文件路径"
 
@@ -97,39 +98,49 @@ msgstr "日志文件路径"
 msgid "Log is clean."
 msgstr "日志为空。"
 
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:100
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:105
 msgid "Log level"
 msgstr "日志等级"
 
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:93
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:98
+msgid "Make sure you have installed nftables before you turn it on."
+msgstr "开启前,请确保您已安装 nftables."
+
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:90
 msgid "Make sure your IPv6 network works fine before you turn it on."
 msgstr "开启前,请确保您的 IPv6 网络工作正常。"
 
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:116
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:121
 msgid "Max log retention period"
 msgstr "最长日志保留时间"
 
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:117
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:122
 msgid "Maximum number of days to keep log files."
 msgstr "保留日志文件的最长天数。"
 
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:41
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:38
 msgid "NOT RUNNING"
 msgstr "未运行"
 
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:96
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:97
+msgid "Nftables support"
+msgstr "Nftables 支持"
+
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:93
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:101
 msgid "Off"
 msgstr "关"
 
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:95
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:92
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:100
 msgid "On"
 msgstr "开"
 
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:38
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:35
 msgid "Open Web Interface"
 msgstr "打开 Web 界面"
 
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:39
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:36
 msgid "RUNNING"
 msgstr "运行中"
 
@@ -137,7 +148,7 @@ msgstr "运行中"
 msgid "Refresh every %s seconds."
 msgstr "每 %s 秒刷新。"
 
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:101
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:106
 msgid "Trace"
 msgstr "跟踪"
 
@@ -145,22 +156,22 @@ msgstr "跟踪"
 msgid "Unknown error: %s"
 msgstr "未知错误:%s"
 
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:104
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:109
 msgid "Warn"
 msgstr "警告"
 
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:130
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:132
 msgid "v2ray binary path"
 msgstr "v2ray 二进制路径"
 
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:39
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:41
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:58
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:36
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:38
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:55
 #: applications/luci-app-v2raya/root/usr/share/luci/menu.d/luci-app-v2raya.json:3
 msgid "v2rayA"
 msgstr "v2rayA"
 
-#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:59
+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:56
 msgid ""
 "v2rayA is a V2Ray Linux client supporting global transparent proxy, "
 "compatible with SS, SSR, Trojan(trojan-go), PingTunnel protocols."