1
0
mirror of https://github.com/kenzok8/small-package synced 2025-09-20 19:11:30 +08:00

update 2022-09-11 23:44:21

This commit is contained in:
github-actions[bot]
2022-09-11 23:44:21 +08:00
parent 78dc29381a
commit b1cac55cef
4 changed files with 56 additions and 23 deletions

View File

@ -6,7 +6,7 @@ LUCI_PKGARCH:=all
PKG_NAME:=luci-app-v2raya
PKG_VERSION:=1.1
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_MAINTAINER:=zxlhhyccc <zxlhhy@gmail.com>

View File

@ -5,15 +5,15 @@ function index()
return
end
local page = entry({"admin", "services", "v2raya"}, alias("admin", "services", "v2raya", "v2raya"), _("v2rayA"), 30)
local page = entry({"admin", "services", "v2raya"}, alias("admin", "services", "v2raya", "basic"), _("v2rayA"), 30)
page.dependent = true
page.acl_depends = { "luci-app-v2raya" }
entry({"admin", "services", "v2raya", "v2raya"}, cbi("v2raya/v2raya"), _("Basic Setting"), 1).leaf = true
entry({"admin", "services", "v2raya", "log"}, cbi("v2raya/log"), _("Logs"), 2).leaf = true
entry({"admin", "services", "v2raya", "status"}, call("act_status")).leaf = true
entry({"admin", "services", "v2raya", "basic"}, cbi("v2raya/basic")).leaf = true
entry({"admin", "services", "v2raya", "log"}, cbi("v2raya/log")).leaf = true
entry({"admin", "services", "v2raya", "get_log"}, call("get_log")).leaf = true
entry({"admin", "services", "v2raya", "clear_log"}, call("clear_log")).leaf = true
entry({"admin", "services", "v2raya", "status"}, call("act_status")).leaf = true
end
function act_status()

View File

@ -15,44 +15,52 @@ m.description = translate("v2rayA is a V2Ray Linux client supporting global tran
m:section(SimpleSection).template = "v2raya/v2raya_status"
s = m:section(TypedSection, "v2raya")
s:tab("settings", translate("Basic Setting"))
s:tab("log", translate("Logs"))
s.addremove = false
s.anonymous = true
o = s:option(Flag, "enabled", translate("Enabled"))
o.default = 0
o = s:taboption("settings", Flag, "enabled", translate("Enabled"))
o.default = o.disabled
o.rmempty = false
o = s:option(DummyValue,"v2raya_version",translate("v2rayA Version"))
o = s:taboption("settings", DummyValue,"v2raya_version",translate("v2rayA Version"))
o.rawhtml = true
o.value = v2raya_version
o = s:option(Value, "address", translate("GUI access address"))
o = s:taboption("settings", Value, "address", translate("GUI access address"))
o.description = translate("Use 0.0.0.0:2017 to monitor all access.")
--[[o.datatype = 'ipaddrport(1)']]--
o.default = "http://0.0.0.0:2017"
o.rmempty = false
o = s:option(Value, "config", translate("v2rayA configuration directory"))
o = s:taboption("settings", Value, "config", translate("v2rayA configuration directory"))
o.rmempty = '/etc/v2raya'
o.rmempty = false;
o = s:option(ListValue, "ipv6_support", translate("Ipv6 Support"))
o = s:taboption("settings", ListValue, "ipv6_support", translate("Ipv6 Support"))
o.description = translate("Make sure your IPv6 network works fine before you turn it on.")
o:value("auto", translate("AUTO"))
o:value("on", translate("ON"))
o:value("off", translate("OFF"))
o.default = auto
o.rmempty = false
o = s:option(Value, "log_file", translate("Log file"))
o = s:taboption("settings", Value, "log_file", translate("Log file"))
o.default = "/var/log/v2raya/v2raya.log"
o.rmempty = false
o.readonly = true
o = s:option(ListValue, "log_level", translate("Log Level"))
o = s:taboption("settings", ListValue, "log_level", translate("Log Level"))
o:value("trace",translate("Trace"))
o:value("debug",translate("Debug"))
o:value("info",translate("Info"))
o:value("warn",translate("Warning"))
o:value("error",translate("Error"))
o.default = "Info"
o.rmempty = false
o = s:option(ListValue, "log_max_days", translate("Log Keepd Max Days"))
o = s:taboption("settings", ListValue, "log_max_days", translate("Log Keepd Max Days"))
o.description = translate("Maximum number of days to keep log files is 3 day.")
o.datatype = "uinteger"
o:value("1", translate("1"))
@ -60,19 +68,24 @@ o:value("2", translate("2"))
o:value("3", translate("3"))
o.default = 3
o.rmempty = false
o.optional = false
o = s:option(Flag, "log_disable_color", translate("Disable log color"))
o.default = '1'
o = s:taboption("settings", Flag, "log_disable_color", translate("Disable log color"))
o.default = o.enabled
o.rmempty = false
o.optional = false
o = s:option(Flag, "log_disable_timestamp", translate("Log disable timestamp"))
o.default = '0'
o = s:taboption("settings", Flag, "log_disable_timestamp", translate("Log disable timestamp"))
o.default = o.disabled
o.rmempty = false
o.optional = false
o = s:option(Value, "vless_grpc_inbound_cert_key", translate("Upload certificate"))
o = s:taboption("settings", Value, "v2ray_bin", translate("v2ray binary path"))
o.description = translate("Executable v2ray binary path. Auto-detect if put it empty (recommended).")
o.datatype = 'path'
o = s:taboption("settings", Value, "v2ray_confdir", translate("Extra config directory"))
o.description = translate("Additional v2ray config directory, files in it will be combined with config generated by v2rayA.")
o.datatype = 'path'
o = s:taboption("settings", Value, "vless_grpc_inbound_cert_key", translate("Upload certificate"))
o.description = translate("Specify the certification path instead of automatically generating a self-signed certificate.")
o.template = "v2raya/v2raya_certupload"
@ -106,10 +119,14 @@ if luci.http.formvalue("upload") then
end
end
o = s:option(Value, "vless_grpc_inbound_cert_key", translate("Upload Certificate Path"))
o = s:taboption("settings", Value, "vless_grpc_inbound_cert_key", translate("Upload Certificate Path"))
o.description = translate("This is the path where the certificate resides after the certificate is uploaded.")
o.default = "/etc/v2raya/cert.crt,/etc/v2raya/cert.key"
o = s:taboption("log", Value, "log", translate("Logs"))
o.template = "v2raya/v2raya_log"
--[[o.rows = 50]]--
o.inputstyle = "reload"
luci.sys.exec("/etc/init.d/v2raya start >/dev/null 2>&1 &")

View File

@ -79,6 +79,22 @@ msgstr "禁用日志颜色"
msgid "Log disable timestamp"
msgstr "禁用日志时间戳"
msgid "v2ray binary path"
msgstr "v2ray 二进制路径"
msgid ""
"Executable v2ray binary path. Auto-detect if put it empty (recommended)."
msgstr "v2ray 可执行二进制文件目录。留空以自动检测(推荐)。"
msgid "Extra config directory"
msgstr "附加配置目录"
msgid ""
"Additional v2ray config directory, files in it will be combined with config "
"generated by v2rayA."
msgstr ""
"附加 v2ray 配置目录,包含在其中的文件将被合并至 v2rayA 生成的配置文件中。"
msgid "Upload certificate"
msgstr "上传证书"