• R/O
  • HTTP
  • SSH
  • HTTPS

v2raya-openwrt: 提交

opkg feed of v2rayA for OpenWrt users


Commit MetaInfo

修订版b218b60c1de50e78e7e5502d8115c471afb33059 (tree)
时间2022-09-06 13:53:20
作者Tianling Shen <cnsztl@immo...>
CommiterTianling Shen

Log Message

luci-app-v2raya: add basic luci support for v2rayA

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

更改概述

差异

--- a/.github/workflows/multi-arch-build.yml
+++ b/.github/workflows/multi-arch-build.yml
@@ -79,7 +79,7 @@ jobs:
7979 env:
8080 ARCH: ${{ matrix.arch }}-openwrt-21.02
8181 FEEDNAME: v2raya_ci
82- PACKAGES: ca-certificates v2fly-geodata v2ray-core xray-core v2raya
82+ PACKAGES: ca-certificates v2fly-geodata v2ray-core xray-core v2raya luci-app-v2raya
8383 NO_REFRESH_CHECK: 1
8484
8585 - name: Generate metadata
--- /dev/null
+++ b/luci-app-v2raya/Makefile
@@ -0,0 +1,13 @@
1+# SPDX-License-Identifier: GPL-3.0-only
2+#
3+# Copyright (C) 2022 ImmortalWrt.org
4+
5+include $(TOPDIR)/rules.mk
6+
7+LUCI_TITLE:=LuCI support for v2rayA
8+LUCI_DEPENDS:=+v2raya
9+LUCI_PKGARCH:=all
10+
11+include $(TOPDIR)/feeds/luci/luci.mk
12+
13+# call BuildPackage - OpenWrt buildroot signature
--- /dev/null
+++ b/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js
@@ -0,0 +1,197 @@
1+/* SPDX-License-Identifier: GPL-3.0-only
2+ *
3+ * Copyright (C) 2022 ImmortalWrt.org
4+ */
5+
6+'use strict';
7+'require form';
8+'require fs';
9+'require poll';
10+'require rpc';
11+'require uci';
12+'require ui';
13+'require validation';
14+'require view';
15+
16+var callServiceList = rpc.declare({
17+ object: 'service',
18+ method: 'list',
19+ params: ['name'],
20+ expect: { '': {} }
21+});
22+
23+function getServiceStatus() {
24+ return L.resolveDefault(callServiceList('v2raya'), {}).then(function (res) {
25+ var isRunning = false;
26+ try {
27+ isRunning = res['v2raya']['instances']['v2raya']['running'];
28+ } catch (e) { }
29+ return isRunning;
30+ });
31+}
32+
33+function renderStatus(isRunning, port) {
34+ var spanTemp = '<span style="color:%s"><strong>%s %s</strong></span>';
35+ var renderHTML;
36+ if (isRunning) {
37+ var button = String.format('&nbsp;<a class="btn cbi-button" href="%s:%s" target="_blank" rel="noreferrer noopener">%s</a>',
38+ window.location.origin, port, _('Open Web Interface'));
39+ renderHTML = spanTemp.format('green', _('v2rayA'), _('RUNNING')) + button;
40+ } else {
41+ renderHTML = spanTemp.format('red', _('v2rayA'), _('NOT RUNNING'));
42+ }
43+
44+ return renderHTML;
45+}
46+
47+function uploadCertificate(type, filename, ev) {
48+ L.resolveDefault(fs.exec('/bin/mkdir', [ '-p', '/etc/v2raya/' ]));
49+
50+ return ui.uploadFile('/etc/v2raya/' + filename, ev.target)
51+ .then(L.bind(function(btn, res) {
52+ btn.firstChild.data = _('Checking %s...').format(type);
53+
54+ if (res.size <= 0) {
55+ ui.addNotification(null, E('p', _('The uploaded %s is empty.').format(type)));
56+ return fs.remove('/etc/v2raya/' + filename);
57+ }
58+
59+ ui.addNotification(null, E('p', _('Your %s was successfully uploaded. Size: %sB.').format(type, res.size)));
60+ }, this, ev.target))
61+ .catch(function(e) { ui.addNotification(null, E('p', e.message)) })
62+ .finally(L.bind(function(btn, input) {
63+ btn.firstChild.data = _('Upload...');
64+ }, this, ev.target));
65+}
66+
67+return view.extend({
68+ load: function() {
69+ return Promise.all([
70+ uci.load('v2raya')
71+ ]);
72+ },
73+
74+ render: function(data) {
75+ var m, s, o;
76+ var webport = (uci.get(data[0], 'config', 'address') || '0.0.0.0:2017').split(':').slice(-1)[0];
77+
78+ m = new form.Map('v2raya', _('v2rayA'),
79+ _('v2rayA is a V2Ray Linux client supporting global transparent proxy, compatible with SS, SSR, Trojan(trojan-go), PingTunnel protocols.'));
80+
81+ s = m.section(form.TypedSection);
82+ s.anonymous = true;
83+ s.render = function () {
84+ poll.add(function () {
85+ return L.resolveDefault(getServiceStatus()).then(function (res) {
86+ var view = document.getElementById('service_status');
87+ view.innerHTML = renderStatus(res, webport);
88+ });
89+ });
90+
91+ return E('div', { class: 'cbi-section', id: 'status_bar' }, [
92+ E('p', { id: 'service_status' }, _('Collecting data...'))
93+ ]);
94+ }
95+
96+ s = m.section(form.NamedSection, 'config', 'v2raya');
97+
98+ o = s.option(form.Flag, 'enabled', _('Enable'));
99+ o.default = o.disabled;
100+ o.rmempty = false;
101+
102+ o = s.option(form.Value, 'address', _('Listening address'));
103+ o.default = '0.0.0.0:2017';
104+ o.validate = function(section_id, value) {
105+ if (!section_id)
106+ return true;
107+ else if (!value)
108+ return _('Expecting: %s').format('non-empty value');
109+
110+ var addr = value.split(':').slice(0, -1).join(':'),
111+ port = validation.parseInteger(value.split(':').slice(-1)[0]);
112+
113+ if (!addr || !port || port < 0 || port > 65535)
114+ return _('Expecting: %s').format(_('valid address:port value'));
115+ else if (!validation.parseIPv4(addr)) {
116+ if (validation.parseIPv6(addr))
117+ return _('IPv6 address should be used with [].')
118+ else if (addr.match(/\[(.+)\]/) && validation.parseIPv6(RegExp.$1))
119+ return true;
120+ else
121+ return _('Expecting: %s').format(_('valid address:port value'));
122+ }
123+
124+ return true;
125+ }
126+
127+ o = s.option(form.Value, 'config', _('Configuration directory'));
128+ o.datatype = 'path';
129+ o.default = '/etc/v2raya';
130+ o.rmempty = false;
131+
132+ o = s.option(form.ListValue, 'ipv6_support', _('IPv6 support'),
133+ _('Make sure your IPv6 network works fine before you turn it on.'));
134+ o.value('auto', _('Auto'));
135+ o.value('on', _('On'));
136+ o.value('off', _('Off'));
137+ o.default = 'auto';
138+ o.rmempty = false;
139+
140+ o = s.option(form.ListValue, 'log_level', _('Log level'));
141+ o.value('trace', _('Trace'));
142+ o.value('debug', _('Debug'));
143+ o.value('info', _('Info'));
144+ o.value('warn', _('Warn'));
145+ o.value('error', _('Error'));
146+ o.default = 'info';
147+ o.rmempty = false;
148+
149+ o = s.option(form.Value, 'log_file', _('Log file path'));
150+ o.datatype = 'path';
151+ o.default = '/var/log/v2raya/v2raya.log';
152+ o.rmempty = false;
153+ /* Due to ACL rule, this value must retain default otherwise log page will be broken */
154+ o.readonly = true;
155+
156+ o = s.option(form.Value, 'log_max_days', _('Max log retention period'),
157+ _('Maximum number of days to keep log files.'));
158+ o.datatype = 'uinteger';
159+ o.default = '3';
160+ o.rmempty = false;
161+
162+ o = s.option(form.Flag, 'log_disable_color', _('Disable log color output'));
163+ o.default = o.enabled;
164+ o.rmempty = false;
165+
166+ o = s.option(form.Flag, 'log_disable_timestamp', _('Disable log timestamp'));
167+ o.default = o.disabled;
168+ o.rmempty = false;
169+
170+ o = s.option(form.Value, 'v2ray_bin', _('v2ray binary path'),
171+ _('Executable v2ray binary path. Auto-detect if put it empty (recommended).'));
172+ o.datatype = 'path';
173+
174+ o = s.option(form.Value, 'v2ray_confdir', _('Extra config directory'),
175+ _('Additional v2ray config directory, files in it will be combined with config generated by v2rayA.'));
176+ o.datatype = 'path';
177+
178+ o = s.option(form.Value, 'vless_grpc_inbound_cert_key', _('Certpath for gRPC inbound'),
179+ _('Specify the certification path instead of automatically generating a self-signed certificate.'));
180+ o.value('', _('Automatically generate'));
181+ o.value('/etc/v2raya/grpc_certificate.crt,/etc/v2raya/grpc_private.key');
182+
183+ o = s.option(form.Button, '_upload_cert', _('Upload certificate'));
184+ o.inputstyle = 'action';
185+ o.inputtitle = _('Upload...');
186+ o.onclick = L.bind(uploadCertificate, this, _('certificate'), 'grpc_certificate.crt');
187+ o.depends('vless_grpc_inbound_cert_key', '/etc/v2raya/grpc_certificate.crt,/etc/v2raya/grpc_private.key');
188+
189+ o = s.option(form.Button, '_upload_key', _('Upload privateKey'));
190+ o.inputstyle = 'action';
191+ o.inputtitle = _('Upload...');
192+ o.onclick = L.bind(uploadCertificate, this, _('private key'), 'grpc_private.key');
193+ o.depends('vless_grpc_inbound_cert_key', '/etc/v2raya/grpc_certificate.crt,/etc/v2raya/grpc_private.key');
194+
195+ return m.render();
196+ }
197+});
--- /dev/null
+++ b/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/log.js
@@ -0,0 +1,80 @@
1+/* SPDX-License-Identifier: GPL-3.0-only
2+ *
3+ * Copyright (C) 2022 ImmortalWrt.org
4+ */
5+
6+'use strict';
7+'require dom';
8+'require fs';
9+'require poll';
10+'require uci';
11+'require view';
12+
13+return view.extend({
14+ render: function() {
15+ /* Thanks to luci-app-aria2 */
16+ var css = ' \
17+ #log_textarea { \
18+ padding: 10px; \
19+ text-align: left; \
20+ } \
21+ #log_textarea pre { \
22+ padding: .5rem; \
23+ word-break: break-all; \
24+ margin: 0; \
25+ } \
26+ .description { \
27+ background-color: #33ccff; \
28+ }';
29+
30+ var log_textarea = E('div', { 'id': 'log_textarea' },
31+ E('img', {
32+ 'src': L.resource(['icons/loading.gif']),
33+ 'alt': _('Loading...'),
34+ 'style': 'vertical-align:middle'
35+ }, _('Collecting data...'))
36+ );
37+
38+ var log_path = uci.get('v2raya', 'config', 'log_file') || '/var/log/v2raya/v2raya.log';
39+
40+ poll.add(L.bind(function() {
41+ return fs.read_direct(log_path, 'text')
42+ .then(function(res) {
43+ var log = E('pre', { 'wrap': 'pre' }, [
44+ res.trim() || _('Log is clean.')
45+ ]);
46+
47+ dom.content(log_textarea, log);
48+ }).catch(function(err) {
49+ var log;
50+
51+ if (err.toString().includes('NotFoundError'))
52+ log = E('pre', { 'wrap': 'pre' }, [
53+ _('Log file does not exist.')
54+ ]);
55+ else
56+ log = E('pre', { 'wrap': 'pre' }, [
57+ _('Unknown error: %s').format(err)
58+ ]);
59+
60+ dom.content(log_textarea, log);
61+ });
62+ }));
63+
64+ return E([
65+ E('style', [ css ]),
66+ E('div', {'class': 'cbi-map'}, [
67+ E('div', {'class': 'cbi-section'}, [
68+ log_textarea,
69+ E('div', {'style': 'text-align:right'},
70+ E('small', {}, _('Refresh every %s seconds.').format(L.env.pollinterval))
71+ )
72+ ])
73+ ])
74+ ]);
75+ },
76+
77+ handleSaveApply: null,
78+ handleSave: null,
79+ handleReset: null
80+});
--- /dev/null
+++ b/luci-app-v2raya/po/templates/v2raya.pot
@@ -0,0 +1,222 @@
1+msgid ""
2+msgstr "Content-Type: text/plain; charset=UTF-8"
3+
4+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:175
5+msgid ""
6+"Additional v2ray config directory, files in it will be combined with config "
7+"generated by v2rayA."
8+msgstr ""
9+
10+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:134
11+msgid "Auto"
12+msgstr ""
13+
14+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:180
15+msgid "Automatically generate"
16+msgstr ""
17+
18+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:178
19+msgid "Certpath for gRPC inbound"
20+msgstr ""
21+
22+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:52
23+msgid "Checking %s..."
24+msgstr ""
25+
26+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:92
27+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/log.js:35
28+msgid "Collecting data..."
29+msgstr ""
30+
31+#: applications/luci-app-v2raya/root/usr/share/rpcd/luci/menu.d/luci-app-v2raya.json:14
32+msgid "Configuration"
33+msgstr ""
34+
35+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:127
36+msgid "Configuration directory"
37+msgstr ""
38+
39+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:142
40+msgid "Debug"
41+msgstr ""
42+
43+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:162
44+msgid "Disable log color output"
45+msgstr ""
46+
47+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:166
48+msgid "Disable log timestamp"
49+msgstr ""
50+
51+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:98
52+msgid "Enable"
53+msgstr ""
54+
55+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:145
56+msgid "Error"
57+msgstr ""
58+
59+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:171
60+msgid ""
61+"Executable v2ray binary path. Auto-detect if put it empty (recommended)."
62+msgstr ""
63+
64+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:108
65+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:114
66+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:121
67+msgid "Expecting: %s"
68+msgstr ""
69+
70+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:174
71+msgid "Extra config directory"
72+msgstr ""
73+
74+#: applications/luci-app-v2raya/root/usr/share/rpcd/acl.d/luci-app-v2raya.json:3
75+msgid "Grant access to v2rayA configuration"
76+msgstr ""
77+
78+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:117
79+msgid "IPv6 address should be used with []."
80+msgstr ""
81+
82+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:132
83+msgid "IPv6 support"
84+msgstr ""
85+
86+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:143
87+msgid "Info"
88+msgstr ""
89+
90+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:102
91+msgid "Listening address"
92+msgstr ""
93+
94+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/log.js:33
95+msgid "Loading..."
96+msgstr ""
97+
98+#: applications/luci-app-v2raya/root/usr/share/rpcd/luci/menu.d/luci-app-v2raya.json:22
99+msgid "Log"
100+msgstr ""
101+
102+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/log.js:53
103+msgid "Log file does not exist."
104+msgstr ""
105+
106+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:149
107+msgid "Log file path"
108+msgstr ""
109+
110+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/log.js:44
111+msgid "Log is clean."
112+msgstr ""
113+
114+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:140
115+msgid "Log level"
116+msgstr ""
117+
118+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:133
119+msgid "Make sure your IPv6 network works fine before you turn it on."
120+msgstr ""
121+
122+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:156
123+msgid "Max log retention period"
124+msgstr ""
125+
126+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:157
127+msgid "Maximum number of days to keep log files."
128+msgstr ""
129+
130+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:41
131+msgid "NOT RUNNING"
132+msgstr ""
133+
134+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:136
135+msgid "Off"
136+msgstr ""
137+
138+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:135
139+msgid "On"
140+msgstr ""
141+
142+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:38
143+msgid "Open Web Interface"
144+msgstr ""
145+
146+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:39
147+msgid "RUNNING"
148+msgstr ""
149+
150+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/log.js:70
151+msgid "Refresh every %s seconds."
152+msgstr ""
153+
154+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:179
155+msgid ""
156+"Specify the certification path instead of automatically generating a self-"
157+"signed certificate."
158+msgstr ""
159+
160+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:55
161+msgid "The uploaded %s is empty."
162+msgstr ""
163+
164+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:141
165+msgid "Trace"
166+msgstr ""
167+
168+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/log.js:57
169+msgid "Unknown error: %s"
170+msgstr ""
171+
172+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:183
173+msgid "Upload certificate"
174+msgstr ""
175+
176+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:189
177+msgid "Upload privateKey"
178+msgstr ""
179+
180+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:63
181+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:185
182+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:191
183+msgid "Upload..."
184+msgstr ""
185+
186+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:144
187+msgid "Warn"
188+msgstr ""
189+
190+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:59
191+msgid "Your %s was successfully uploaded. Size: %sB."
192+msgstr ""
193+
194+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:186
195+msgid "certificate"
196+msgstr ""
197+
198+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:192
199+msgid "private key"
200+msgstr ""
201+
202+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:170
203+msgid "v2ray binary path"
204+msgstr ""
205+
206+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:39
207+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:41
208+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:78
209+#: applications/luci-app-v2raya/root/usr/share/rpcd/luci/menu.d/luci-app-v2raya.json:3
210+msgid "v2rayA"
211+msgstr ""
212+
213+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:79
214+msgid ""
215+"v2rayA is a V2Ray Linux client supporting global transparent proxy, "
216+"compatible with SS, SSR, Trojan(trojan-go), PingTunnel protocols."
217+msgstr ""
218+
219+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:114
220+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:121
221+msgid "valid address:port value"
222+msgstr ""
--- /dev/null
+++ b/luci-app-v2raya/po/zh_Hans/v2raya.po
@@ -0,0 +1,232 @@
1+msgid ""
2+msgstr ""
3+"Content-Type: text/plain; charset=UTF-8\n"
4+"Project-Id-Version: PACKAGE VERSION\n"
5+"Last-Translator: Automatically generated\n"
6+"Language-Team: none\n"
7+"Language: zh-Hans\n"
8+"MIME-Version: 1.0\n"
9+"Content-Transfer-Encoding: 8bit\n"
10+
11+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:175
12+msgid ""
13+"Additional v2ray config directory, files in it will be combined with config "
14+"generated by v2rayA."
15+msgstr ""
16+"附加 v2ray 配置目录,包含在其中的文件将被合并至 v2rayA 生成的配置文件中。"
17+
18+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:134
19+msgid "Auto"
20+msgstr "自动"
21+
22+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:180
23+msgid "Automatically generate"
24+msgstr "自动生成"
25+
26+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:178
27+msgid "Certpath for gRPC inbound"
28+msgstr "gPRC 入站证书目录"
29+
30+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:52
31+msgid "Checking %s..."
32+msgstr "检查%s中..."
33+
34+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:92
35+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/log.js:35
36+msgid "Collecting data..."
37+msgstr "收集数据中..."
38+
39+#: applications/luci-app-v2raya/root/usr/share/rpcd/luci/menu.d/luci-app-v2raya.json:14
40+msgid "Configuration"
41+msgstr "配置"
42+
43+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:127
44+msgid "Configuration directory"
45+msgstr "配置文件目录"
46+
47+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:142
48+msgid "Debug"
49+msgstr "调试"
50+
51+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:162
52+msgid "Disable log color output"
53+msgstr "禁用日志彩色输出"
54+
55+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:166
56+msgid "Disable log timestamp"
57+msgstr "禁用日志时间戳"
58+
59+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:98
60+msgid "Enable"
61+msgstr "启用"
62+
63+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:145
64+msgid "Error"
65+msgstr "错误"
66+
67+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:171
68+msgid ""
69+"Executable v2ray binary path. Auto-detect if put it empty (recommended)."
70+msgstr "v2ray 可执行二进制文件目录。留空以自动检测(推荐)。"
71+
72+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:108
73+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:114
74+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:121
75+msgid "Expecting: %s"
76+msgstr "请输入:%s"
77+
78+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:174
79+msgid "Extra config directory"
80+msgstr "附加配置目录"
81+
82+#: applications/luci-app-v2raya/root/usr/share/rpcd/acl.d/luci-app-v2raya.json:3
83+msgid "Grant access to v2rayA configuration"
84+msgstr "授予访问 v2rayA 配置的权限"
85+
86+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:117
87+msgid "IPv6 address should be used with []."
88+msgstr "IPv6 地址应与 [] 一起使用。"
89+
90+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:132
91+msgid "IPv6 support"
92+msgstr "IPv6 支持"
93+
94+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:143
95+msgid "Info"
96+msgstr "信息"
97+
98+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:102
99+msgid "Listening address"
100+msgstr "监听地址"
101+
102+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/log.js:33
103+msgid "Loading..."
104+msgstr "加载中..."
105+
106+#: applications/luci-app-v2raya/root/usr/share/rpcd/luci/menu.d/luci-app-v2raya.json:22
107+msgid "Log"
108+msgstr "日志"
109+
110+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/log.js:53
111+msgid "Log file does not exist."
112+msgstr "日志文件不存在。"
113+
114+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:149
115+msgid "Log file path"
116+msgstr "日志文件路径"
117+
118+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/log.js:44
119+msgid "Log is clean."
120+msgstr "日志为空。"
121+
122+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:140
123+msgid "Log level"
124+msgstr "日志等级"
125+
126+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:133
127+msgid "Make sure your IPv6 network works fine before you turn it on."
128+msgstr "开启前,请确保您的 IPv6 网络工作正常。"
129+
130+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:156
131+msgid "Max log retention period"
132+msgstr "最长日志保留时间"
133+
134+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:157
135+msgid "Maximum number of days to keep log files."
136+msgstr "保留日志文件的最长天数。"
137+
138+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:41
139+msgid "NOT RUNNING"
140+msgstr "未运行"
141+
142+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:136
143+msgid "Off"
144+msgstr "关"
145+
146+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:135
147+msgid "On"
148+msgstr "开"
149+
150+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:38
151+msgid "Open Web Interface"
152+msgstr "打开 Web 界面"
153+
154+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:39
155+msgid "RUNNING"
156+msgstr "运行中"
157+
158+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/log.js:70
159+msgid "Refresh every %s seconds."
160+msgstr "每 %s 秒刷新。"
161+
162+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:179
163+msgid ""
164+"Specify the certification path instead of automatically generating a self-"
165+"signed certificate."
166+msgstr "指定证书目录而不是自动生成自签证书。"
167+
168+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:55
169+msgid "The uploaded %s is empty."
170+msgstr "上传的%s为空。"
171+
172+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:141
173+msgid "Trace"
174+msgstr "跟踪"
175+
176+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/log.js:57
177+msgid "Unknown error: %s"
178+msgstr "未知错误:%s"
179+
180+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:183
181+msgid "Upload certificate"
182+msgstr "上传证书"
183+
184+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:189
185+msgid "Upload privateKey"
186+msgstr "上传私钥"
187+
188+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:63
189+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:185
190+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:191
191+msgid "Upload..."
192+msgstr "上传..."
193+
194+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:144
195+msgid "Warn"
196+msgstr "警告"
197+
198+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:59
199+msgid "Your %s was successfully uploaded. Size: %sB."
200+msgstr "您的%s上传成功。大小:%sB。"
201+
202+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:186
203+msgid "certificate"
204+msgstr "证书"
205+
206+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:192
207+msgid "private key"
208+msgstr "私钥"
209+
210+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:170
211+msgid "v2ray binary path"
212+msgstr "v2ray 二进制路径"
213+
214+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:39
215+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:41
216+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:78
217+#: applications/luci-app-v2raya/root/usr/share/rpcd/luci/menu.d/luci-app-v2raya.json:3
218+msgid "v2rayA"
219+msgstr "v2rayA"
220+
221+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:79
222+msgid ""
223+"v2rayA is a V2Ray Linux client supporting global transparent proxy, "
224+"compatible with SS, SSR, Trojan(trojan-go), PingTunnel protocols."
225+msgstr ""
226+"v2rayA 是一个易用而强大的,跨平台的 V2Ray 客户端,支持 SS、SSR、"
227+"Trojan(trojan-go)、PingTunnel 协议。"
228+
229+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:114
230+#: applications/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/config.js:121
231+msgid "valid address:port value"
232+msgstr "有效 地址:端口 值"
--- /dev/null
+++ b/luci-app-v2raya/root/usr/share/rpcd/acl.d/luci-app-v2raya.json
@@ -0,0 +1,22 @@
1+{
2+ "luci-app-v2raya": {
3+ "description": "Grant access to v2rayA configuration",
4+ "read": {
5+ "file": {
6+ "/bin/mkdir -p /etc/v2raya/": [ "exec" ],
7+ "/var/log/v2raya/v2raya.log": [ "read" ]
8+ },
9+ "ubus": {
10+ "service": [ "list" ]
11+ },
12+ "uci": [ "v2raya" ]
13+ },
14+ "write": {
15+ "file": {
16+ "/etc/v2raya/grpc_certificate.crt": [ "write" ],
17+ "/etc/v2raya/grpc_private.key": [ "write" ]
18+ },
19+ "uci": [ "v2raya" ]
20+ }
21+ }
22+}
--- /dev/null
+++ b/luci-app-v2raya/root/usr/share/rpcd/luci/menu.d/luci-app-v2raya.json
@@ -0,0 +1,29 @@
1+{
2+ "admin/services/v2raya": {
3+ "title": "v2rayA",
4+ "order": 90,
5+ "action": {
6+ "type": "firstchild"
7+ },
8+ "depends": {
9+ "acl": [ "luci-app-v2raya" ],
10+ "uci": { "v2raya": true }
11+ }
12+ },
13+ "admin/services/v2raya/config": {
14+ "title": "Configuration",
15+ "order": 10,
16+ "action": {
17+ "type": "view",
18+ "path": "v2raya/config"
19+ }
20+ },
21+ "admin/services/v2raya/log": {
22+ "title": "Log",
23+ "order": 20,
24+ "action": {
25+ "type": "view",
26+ "path": "v2raya/log"
27+ }
28+ }
29+}
Show on old repository browser