update 2026-05-25 16:15:17

This commit is contained in:
action 2026-05-25 16:15:17 +08:00
parent 67a9d21136
commit 28010b5f14
3 changed files with 18 additions and 8 deletions

View File

@ -258,6 +258,7 @@ local function encode_trojan(node)
if o.tls.sni then table.insert(p, "sni=" .. urlencode(o.tls.sni)) end
if o.tls.fp then table.insert(p, "fp=" .. urlencode(o.tls.fp)) end
if o.tls.alpn then table.insert(p, "alpn=" .. urlencode(o.tls.alpn)) end
if o.tls.ech then table.insert(p, "ech=" .. urlencode(o.tls.ech)) end
if o.tls.pcs then table.insert(p, "pcs=" .. urlencode(o.tls.pcs)) end
table.insert(p, "allowInsecure=" .. (o.tls.insecure and "1" or "0"))
@ -294,6 +295,7 @@ local function encode_vmess(node)
sni = o.tls.sni,
alpn = o.tls.alpn,
fp = o.tls.fp,
ech = o.tls.ech,
pcs = o.tls.pcs,
insecure = o.tls.insecure and "1" or "0",
tfo = node.tfo and "1" or "0"
@ -425,7 +427,6 @@ local function encode_tuic(node)
if node["disable-sni"] then table.insert(p, "disable_sni=1") end
if node["skip-cert-verify"] then table.insert(p, "allowInsecure=1") end
if node["udp-relay-mode"] then table.insert(p, "udp_relay_mode=" .. node["udp-relay-mode"]) end
if #p > 0 then
link = link .. "?" .. table.concat(p, "&")
@ -436,14 +437,19 @@ end
-- AnyTLS
local function encode_anytls(node)
local o = build_common(node)
local link = "anytls://" .. (node.password or "") .. "@" .. host_format(node.server) .. ":" .. node.port
local p = {}
if node.sni then table.insert(p, "sni=" .. urlencode(node.sni)) end
if node["skip-cert-verify"] then table.insert(p, "allowInsecure=1") end
if node.alpn then
table.insert(p, "alpn=" .. urlencode(build_alpn(node.alpn)))
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")
else
table.insert(p, "allowInsecure=" .. (o.tls.insecure and "1" or "0"))
end
if #p > 0 then

View File

@ -1547,6 +1547,10 @@ local function processData(szType, content, add_mode, group, sub_cfg)
result.reality_publicKey = params.pbk or nil
result.reality_shortId = params.sid or nil
end
if params.ech and params.ech ~= "" then
result.ech = "1"
result.ech_config = params.ech
end
end
result.port = port
local insecure = params.allowinsecure or params.insecure

View File

@ -30,13 +30,13 @@ define Download/geosite
HASH:=1c039aacd6346523f7a316d63318c62d4333864f7a88519e445777005cf65ef3
endef
GEOSITE_IRAN_VER:=202605180152
GEOSITE_IRAN_VER:=202605250156
GEOSITE_IRAN_FILE:=iran.dat.$(GEOSITE_IRAN_VER)
define Download/geosite-ir
URL:=https://github.com/bootmortis/iran-hosted-domains/releases/download/$(GEOSITE_IRAN_VER)/
URL_FILE:=iran.dat
FILE:=$(GEOSITE_IRAN_FILE)
HASH:=4dbd8da72b1a785cde54611c6867619b3e6fb064050fb2903d29345900a4dd54
HASH:=2ae051203f836c859169a46c81b2ce177b608c2a95897c47db5e3cce446cdea9
endef
define Package/v2ray-geodata/template