mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-09-14 04:14:40 +08:00
update 2026-07-04 21:12:26
This commit is contained in:
@@ -446,14 +446,17 @@ local function encode_anytls(node)
|
||||
local link = "anytls://" .. (node.password or "") .. "@" .. host_format(node.server) .. ":" .. node.port
|
||||
local p = {}
|
||||
|
||||
if o.tls.security then table.insert(p, "security=" .. o.tls.security) end
|
||||
if o.tls.pbk then table.insert(p, "pbk=" .. urlencode(o.tls.pbk)) end
|
||||
if o.tls.sid then table.insert(p, "sid=" .. urlencode(o.tls.sid)) end
|
||||
if o.tls.sni then table.insert(p, "sni=" .. urlencode(o.tls.sni)) end
|
||||
if o.tls.alpn then table.insert(p, "alpn=" .. urlencode(o.tls.alpn)) end
|
||||
if o.tls.fp then table.insert(p, "fp=" .. urlencode(o.tls.fp)) end
|
||||
if o.tls.ech then table.insert(p, "ech=" .. urlencode(o.tls.ech)) end
|
||||
if o.tls.pcs then
|
||||
table.insert(p, "allowInsecure=1")
|
||||
table.insert(p, "insecure=1")
|
||||
else
|
||||
table.insert(p, "allowInsecure=" .. (o.tls.insecure and "1" or "0"))
|
||||
table.insert(p, "insecure=" .. (o.tls.insecure and "1" or "0"))
|
||||
end
|
||||
|
||||
if #p > 0 then
|
||||
|
||||
@@ -1299,6 +1299,10 @@ local function processData(szType, content, add_mode, group, sub_cfg)
|
||||
result.encryption = params.encryption or "none"
|
||||
result.flow = params.flow
|
||||
|
||||
if (not params.security or params.security == "") and params.flow then
|
||||
params.security = "tls"
|
||||
end
|
||||
|
||||
result.tls = "0"
|
||||
if params.security == "tls" or params.security == "reality" then
|
||||
result.tls = "1"
|
||||
|
||||
Reference in New Issue
Block a user