mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-15 04:53:00 +08:00
🏅 Sync 2026-08-09 09:19:32
This commit is contained in:
1 parent
ee62266d6b
commit
40a4a808cd
32 files changed
+313
-221
No files matched your search
@@ -91,6 +91,11 @@ local function convert_geofile()
|
||||
convert(GEO_VAR.IP_PATH, "geoip", GEO_VAR.IP_TAGS)
|
||||
end
|
||||
|
||||
local function get_log_level(s)
|
||||
if s == "warning" then s = "warn" end
|
||||
return s
|
||||
end
|
||||
|
||||
function parseDNS(str)
|
||||
local result_dns_server
|
||||
-- [proto]://[ip]
|
||||
@@ -256,6 +261,7 @@ function gen_outbound(flag, node, tag, proxy_table)
|
||||
fragment = fragment,
|
||||
record_fragment = record_fragment,
|
||||
certificate = (node.tls_certificate == "1" and node.tls_certificate_pem ~= "") and split(node.tls_certificate_pem, "\n") or nil,
|
||||
cipher_suites = node.cipherSuites or nil,
|
||||
ech = (node.ech == "1") and (function()
|
||||
local function get_ech_domain(s) --兼容xray "域名+DNS" 格式ech
|
||||
local domain, dns = s:match("^([^+]+)%+(.+)$")
|
||||
@@ -1072,7 +1078,7 @@ function gen_config_server(node)
|
||||
local config = {
|
||||
log = {
|
||||
disabled = (not node or node.log == "0") and true or false,
|
||||
level = node.loglevel or "info",
|
||||
level = get_log_level(node.loglevel) or "info",
|
||||
timestamp = true,
|
||||
--output = logfile,
|
||||
},
|
||||
@@ -2160,7 +2166,7 @@ function gen_config(var)
|
||||
local config = {
|
||||
log = {
|
||||
disabled = log == "0" and true or false,
|
||||
level = loglevel,
|
||||
level = get_log_level(loglevel),
|
||||
timestamp = true,
|
||||
output = logfile,
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user