update 2026-09-19 02:48:47

This commit is contained in:
action committed 2026-09-19 02:48:47 +08:00
1 parent 08aa7a0044
commit 7465c09d9e
1968 files changed
+1523239 -21

No files matched your search

@@ -258,7 +258,7 @@ o.validate = function(self, value, t)
local ca = s.fields["tls_certificateFile"] and s.fields["tls_certificateFile"]:formvalue(t) or ""
local key = s.fields["tls_keyFile"] and s.fields["tls_keyFile"]:formvalue(t) or ""
if ca == "" or key == "" then
return nil, translate("Public key and Private key path can not be empty!")
return nil, translate("Certificate or Private key path can not be empty!")
end
end
return value
@@ -311,8 +311,8 @@ o:depends({ protocol = "hysteria" })
-- [[ TLS部分 ]] --
o = s:option(FileUpload, "tls_certificateFile", translate("Public key absolute path"), translate("as:") .. "/etc/ssl/fullchain.pem")
o.default = m:get(s.section, "tls_certificateFile") or "/etc/config/ssl/" .. arg[1] .. ".pem"
o = s:option(FileUpload, "tls_certificateFile", translate("Path to the certificate file"), translate("as:") .. "/etc/ssl/fullchain.crt")
o.default = m:get(s.section, "tls_certificateFile") or "/etc/config/ssl/" .. arg[1] .. ".crt"
if o and o:formvalue(arg[1]) then o.default = o:formvalue(arg[1]) end
o:depends({ tls = true, reality = false })
o:depends({ protocol = "naive" })
@@ -330,7 +330,7 @@ o.validate = function(self, value, t)
return nil
end
o = s:option(FileUpload, "tls_keyFile", translate("Private key absolute path"), translate("as:") .. "/etc/ssl/private.key")
o = s:option(FileUpload, "tls_keyFile", translate("Path to the private key file"), translate("as:") .. "/etc/ssl/private.key")
o.default = m:get(s.section, "tls_keyFile") or "/etc/config/ssl/" .. arg[1] .. ".key"
if o and o:formvalue(arg[1]) then o.default = o:formvalue(arg[1]) end
o:depends({ tls = true, reality = false })
@@ -198,7 +198,7 @@ o.validate = function(self, value, t)
local ca = s.fields["tls_certificateFile"] and s.fields["tls_certificateFile"]:formvalue(t) or ""
local key = s.fields["tls_keyFile"] and s.fields["tls_keyFile"]:formvalue(t) or ""
if ca == "" or key == "" then
return nil, translate("Public key and Private key path can not be empty!")
return nil, translate("Certificate or Private key path can not be empty!")
end
end
return value
@@ -263,8 +263,8 @@ end
-- [[ TLS部分 ]] --
o = s:option(FileUpload, "tls_certificateFile", translate("Public key absolute path"), translate("as:") .. "/etc/ssl/fullchain.pem")
o.default = m:get(s.section, "tls_certificateFile") or "/etc/config/ssl/" .. s.section .. ".pem"
o = s:option(FileUpload, "tls_certificateFile", translate("Path to the certificate file"), translate("as:") .. "/etc/ssl/fullchain.crt")
o.default = m:get(s.section, "tls_certificateFile") or "/etc/config/ssl/" .. s.section .. ".crt"
if o and o:formvalue(s.section) then o.default = o:formvalue(s.section) end
o:depends({ tls = true, reality = false })
o:depends({ protocol = "hysteria2"})
@@ -279,7 +279,7 @@ o.validate = function(self, value, t)
return nil
end
o = s:option(FileUpload, "tls_keyFile", translate("Private key absolute path"), translate("as:") .. "/etc/ssl/private.key")
o = s:option(FileUpload, "tls_keyFile", translate("Path to the private key file"), translate("as:") .. "/etc/ssl/private.key")
o.default = m:get(s.section, "tls_keyFile") or "/etc/config/ssl/" .. s.section .. ".key"
if o and o:formvalue(s.section) then o.default = o:formvalue(s.section) end
o:depends({ tls = true, reality = false })
@@ -120,8 +120,8 @@ o.default = "0"
o.rewrite_option = o.option
o:depends({ custom = false })
o = s:option(FileUpload, "tls_certificateFile", translate("Public key absolute path"), translate("as:") .. "/etc/ssl/fullchain.pem")
o.default = m:get(s.section, "tls_certificateFile") or "/etc/config/ssl/" .. arg[1] .. ".pem"
o = s:option(FileUpload, "tls_certificateFile", translate("Path to the certificate file"), translate("as:") .. "/etc/ssl/fullchain.crt")
o.default = m:get(s.section, "tls_certificateFile") or "/etc/config/ssl/" .. arg[1] .. ".crt"
if o and o:formvalue(arg[1]) then o.default = o:formvalue(arg[1]) end
o.validate = function(self, value, t)
if value and value ~= "" then
@@ -135,7 +135,7 @@ o.validate = function(self, value, t)
end
o:depends({ custom = false })
o = s:option(FileUpload, "tls_keyFile", translate("Private key absolute path"), translate("as:") .. "/etc/ssl/private.key")
o = s:option(FileUpload, "tls_keyFile", translate("Path to the private key file"), translate("as:") .. "/etc/ssl/private.key")
o.default = m:get(s.section, "tls_keyFile") or "/etc/config/ssl/" .. arg[1] .. ".key"
if o and o:formvalue(arg[1]) then o.default = o:formvalue(arg[1]) end
o.validate = function(self, value, t)
@@ -150,7 +150,7 @@ o.validate = function(self, value, t)
end
o:depends({ custom = false })
o = s:option(FileUpload, "ech_keyFile", translate("ECH key absolute path"), translate("as:") .. "/etc/ssl/ech.pem")
o = s:option(FileUpload, "ech_keyFile", translate("Path to the ECH key file"), translate("as:") .. "/etc/ssl/ech.pem")
o.validate = function(self, value, t)
if value and value ~= "" then
if not fs.access(value) then
@@ -741,7 +741,7 @@ function gen_config_server(node)
if node.tls == "1" and node.ech == "1" then
tls.ech = {
enabled = true,
key = node.ech_key and { node.ech_key } or nil
key = node.ech_key and api.split(node.ech_key:gsub("\\n", "\n"), "\n") or nil
}
end
+8 -8
View File
@@ -1601,20 +1601,20 @@ msgstr "远程端口"
msgid "as:"
msgstr "如:"
msgid "Public key absolute path"
msgstr "公钥文件绝对路径"
msgid "Path to the certificate file"
msgstr "证书文件路径"
msgid "Private key absolute path"
msgstr "私钥文件绝对路径"
msgid "Path to the private key file"
msgstr "私钥文件路径"
msgid "ECH key absolute path"
msgstr "ECH 密钥绝对路径"
msgid "Path to the ECH key file"
msgstr "ECH 密钥路径"
msgid "Can't find this file!"
msgstr "找不到这个文件!"
msgid "Public key and Private key path can not be empty!"
msgstr "公钥和私钥文件路径不能为空!"
msgid "Certificate or Private key path can not be empty!"
msgstr "证书或私钥文件路径不能为空!"
msgid "Server-Side"
msgstr "服务器端"