mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-10-29 15:25:13 +08:00
update 2026-07-12 21:07:28
This commit is contained in:
1 parent
24c2eb6e4f
commit
192d5e4fd9
41 files changed
+779
-611
No files matched your search
@@ -481,7 +481,7 @@ local function parseClashNode(node, add_mode, group, sub_cfg)
|
||||
local sub_vmess_type = DEFAULT_VMESS_TYPE
|
||||
local sub_vless_type = DEFAULT_VLESS_TYPE
|
||||
local sub_hysteria2_type = DEFAULT_HYSTERIA2_TYPE
|
||||
local sub_hy_up_mbps, sub_hy_down_mbps = 1000, 1000
|
||||
local sub_hy_up_mbps, sub_hy_down_mbps
|
||||
if sub_cfg then
|
||||
if sub_cfg.allowInsecure and sub_cfg.allowInsecure ~= "1" then
|
||||
sub_allowinsecure = nil
|
||||
@@ -800,7 +800,7 @@ local function processData(szType, content, add_mode, group, sub_cfg)
|
||||
local sub_vmess_type = DEFAULT_VMESS_TYPE
|
||||
local sub_vless_type = DEFAULT_VLESS_TYPE
|
||||
local sub_hysteria2_type = DEFAULT_HYSTERIA2_TYPE
|
||||
local sub_hy_up_mbps, sub_hy_down_mbps = 1000, 1000
|
||||
local sub_hy_up_mbps, sub_hy_down_mbps
|
||||
if sub_cfg then
|
||||
if sub_cfg.allowInsecure and sub_cfg.allowInsecure ~= "1" then
|
||||
sub_allowinsecure = nil
|
||||
@@ -1354,12 +1354,25 @@ local function processData(szType, content, add_mode, group, sub_cfg)
|
||||
|
||||
result.port = port
|
||||
|
||||
result.tls = '1'
|
||||
result.tls_serverName = params.peer or params.sni or ""
|
||||
result.tls_pinSHA256 = params.pcs
|
||||
result.tls_CertByName = params.vcn
|
||||
local insecure = params.allowinsecure or params.allowInsecure or params.insecure
|
||||
result.tls_allowInsecure = (insecure == "1" or insecure == "0") and insecure or (sub_allowinsecure and "1" or "0")
|
||||
params.security = params.security or "tls"
|
||||
if params.security == "tls" or params.security == "reality" then
|
||||
result.tls = '1'
|
||||
result.tls_serverName = params.peer or params.sni or ""
|
||||
result.alpn = params.alpn
|
||||
if params.fp and params.fp ~= "" then
|
||||
result.utls = "1"
|
||||
result.fingerprint = params.fp
|
||||
end
|
||||
if params.security == "reality" then
|
||||
result.reality = "1"
|
||||
result.reality_publicKey = params.pbk or nil
|
||||
result.reality_shortId = params.sid or nil
|
||||
end
|
||||
result.tls_pinSHA256 = params.pcs
|
||||
result.tls_CertByName = params.vcn
|
||||
local insecure = params.allowinsecure or params.allowInsecure or params.insecure
|
||||
result.tls_allowInsecure = (insecure == "1" or insecure == "0") and insecure or (sub_allowinsecure and "1" or "0")
|
||||
end
|
||||
|
||||
if not params.type then params.type = "tcp" end
|
||||
params.type = string.lower(params.type)
|
||||
@@ -1433,7 +1446,6 @@ local function processData(szType, content, add_mode, group, sub_cfg)
|
||||
result.httpupgrade_path = params.path
|
||||
end
|
||||
|
||||
result.alpn = params.alpn
|
||||
result.tcp_fast_open = params.tfo
|
||||
result.use_finalmask = (params.fm and params.fm ~= "") and "1" or nil
|
||||
result.finalmask = (params.fm and params.fm ~= "") and api.base64Encode(params.fm) or nil
|
||||
@@ -1586,6 +1598,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"
|
||||
@@ -1721,6 +1737,10 @@ local function processData(szType, content, add_mode, group, sub_cfg)
|
||||
result.hysteria2_obfs_type = params.obfs or "salamander"
|
||||
result.hysteria2_obfs_password = params["obfs-password"] or params["obfs_password"]
|
||||
end
|
||||
if params.obfs == "gecko" then
|
||||
result.hysteria2_obfs_MinPacketSize = params.minpacketsize or "512"
|
||||
result.hysteria2_obfs_MaxPacketSize = params.maxpacketsize or "1200"
|
||||
end
|
||||
|
||||
if (sub_hysteria2_type == "sing-box" and has_singbox) or (sub_hysteria2_type == "xray" and has_xray) then
|
||||
local is_singbox = sub_hysteria2_type == "sing-box" and has_singbox
|
||||
|
||||
Reference in new issue
Block a user