mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-11-05 01:44:24 +08:00
update 2026-05-25 16:15:17
This commit is contained in:
1 parent
67a9d21136
commit
28010b5f14
3 files changed
+18
-8
No files matched your search
@@ -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.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.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.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
|
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"))
|
table.insert(p, "allowInsecure=" .. (o.tls.insecure and "1" or "0"))
|
||||||
|
|
||||||
@@ -294,6 +295,7 @@ local function encode_vmess(node)
|
|||||||
sni = o.tls.sni,
|
sni = o.tls.sni,
|
||||||
alpn = o.tls.alpn,
|
alpn = o.tls.alpn,
|
||||||
fp = o.tls.fp,
|
fp = o.tls.fp,
|
||||||
|
ech = o.tls.ech,
|
||||||
pcs = o.tls.pcs,
|
pcs = o.tls.pcs,
|
||||||
insecure = o.tls.insecure and "1" or "0",
|
insecure = o.tls.insecure and "1" or "0",
|
||||||
tfo = node.tfo 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["disable-sni"] then table.insert(p, "disable_sni=1") end
|
||||||
if node["skip-cert-verify"] then table.insert(p, "allowInsecure=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 node["udp-relay-mode"] then table.insert(p, "udp_relay_mode=" .. node["udp-relay-mode"]) end
|
||||||
|
|
||||||
|
|
||||||
if #p > 0 then
|
if #p > 0 then
|
||||||
link = link .. "?" .. table.concat(p, "&")
|
link = link .. "?" .. table.concat(p, "&")
|
||||||
@@ -436,14 +437,19 @@ end
|
|||||||
|
|
||||||
-- AnyTLS
|
-- AnyTLS
|
||||||
local function encode_anytls(node)
|
local function encode_anytls(node)
|
||||||
|
local o = build_common(node)
|
||||||
|
|
||||||
local link = "anytls://" .. (node.password or "") .. "@" .. host_format(node.server) .. ":" .. node.port
|
local link = "anytls://" .. (node.password or "") .. "@" .. host_format(node.server) .. ":" .. node.port
|
||||||
local p = {}
|
local p = {}
|
||||||
|
|
||||||
if node.sni then table.insert(p, "sni=" .. urlencode(node.sni)) end
|
if o.tls.sni then table.insert(p, "sni=" .. urlencode(o.tls.sni)) end
|
||||||
if node["skip-cert-verify"] then table.insert(p, "allowInsecure=1") 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 node.alpn then
|
if o.tls.ech then table.insert(p, "ech=" .. urlencode(o.tls.ech)) end
|
||||||
table.insert(p, "alpn=" .. urlencode(build_alpn(node.alpn)))
|
if o.tls.pcs then
|
||||||
|
table.insert(p, "allowInsecure=1")
|
||||||
|
else
|
||||||
|
table.insert(p, "allowInsecure=" .. (o.tls.insecure and "1" or "0"))
|
||||||
end
|
end
|
||||||
|
|
||||||
if #p > 0 then
|
if #p > 0 then
|
||||||
|
|||||||
@@ -1547,6 +1547,10 @@ local function processData(szType, content, add_mode, group, sub_cfg)
|
|||||||
result.reality_publicKey = params.pbk or nil
|
result.reality_publicKey = params.pbk or nil
|
||||||
result.reality_shortId = params.sid or nil
|
result.reality_shortId = params.sid or nil
|
||||||
end
|
end
|
||||||
|
if params.ech and params.ech ~= "" then
|
||||||
|
result.ech = "1"
|
||||||
|
result.ech_config = params.ech
|
||||||
|
end
|
||||||
end
|
end
|
||||||
result.port = port
|
result.port = port
|
||||||
local insecure = params.allowinsecure or params.insecure
|
local insecure = params.allowinsecure or params.insecure
|
||||||
|
|||||||
@@ -30,13 +30,13 @@ define Download/geosite
|
|||||||
HASH:=1c039aacd6346523f7a316d63318c62d4333864f7a88519e445777005cf65ef3
|
HASH:=1c039aacd6346523f7a316d63318c62d4333864f7a88519e445777005cf65ef3
|
||||||
endef
|
endef
|
||||||
|
|
||||||
GEOSITE_IRAN_VER:=202605180152
|
GEOSITE_IRAN_VER:=202605250156
|
||||||
GEOSITE_IRAN_FILE:=iran.dat.$(GEOSITE_IRAN_VER)
|
GEOSITE_IRAN_FILE:=iran.dat.$(GEOSITE_IRAN_VER)
|
||||||
define Download/geosite-ir
|
define Download/geosite-ir
|
||||||
URL:=https://github.com/bootmortis/iran-hosted-domains/releases/download/$(GEOSITE_IRAN_VER)/
|
URL:=https://github.com/bootmortis/iran-hosted-domains/releases/download/$(GEOSITE_IRAN_VER)/
|
||||||
URL_FILE:=iran.dat
|
URL_FILE:=iran.dat
|
||||||
FILE:=$(GEOSITE_IRAN_FILE)
|
FILE:=$(GEOSITE_IRAN_FILE)
|
||||||
HASH:=4dbd8da72b1a785cde54611c6867619b3e6fb064050fb2903d29345900a4dd54
|
HASH:=2ae051203f836c859169a46c81b2ce177b608c2a95897c47db5e3cce446cdea9
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/v2ray-geodata/template
|
define Package/v2ray-geodata/template
|
||||||
|
|||||||
Reference in new issue
Block a user