mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-11-03 18:13:56 +08:00
update 2026-08-19 20:34:50
This commit is contained in:
1 parent
ef8926d781
commit
b20f5dc6b6
16 files changed
+39
-38
No files matched your search
@@ -1471,8 +1471,6 @@ local function processData(szType, content, add_mode, group, sub_cfg)
|
||||
result.tls_serverName = params.sni
|
||||
result.tls_pinSHA256 = params.pcs or params.pinsha256
|
||||
result.tls_CertByName = params.vcn
|
||||
local insecure = params.allowinsecure or params.insecure
|
||||
result.tls_allowInsecure = (insecure == "1" or insecure == "0") and insecure or (sub_allowinsecure and "1" or "0")
|
||||
result.hysteria2_up_mbps = params.upmbps or (sub_cfg and sub_hy_up_mbps or nil)
|
||||
result.hysteria2_down_mbps = params.downmbps or (sub_cfg and sub_hy_down_mbps or nil)
|
||||
result.hysteria2_hop = params.mport
|
||||
@@ -1484,19 +1482,26 @@ local function processData(szType, content, add_mode, group, sub_cfg)
|
||||
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
|
||||
result.type = is_singbox and 'sing-box' or 'Xray'
|
||||
result.protocol = "hysteria2"
|
||||
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
|
||||
if is_singbox and (params.pcs or params.pinsha256) then
|
||||
params.allowinsecure = "1"
|
||||
end
|
||||
elseif has_hysteria2 then
|
||||
result.type = "Hysteria2"
|
||||
if params.pcs or params.pinsha256 then
|
||||
params.allowinsecure = "0"
|
||||
end
|
||||
else
|
||||
log("跳过 Hysteria2 节点,因未适配到 Hysteria2 核心程序,或未正确设置节点使用类型。")
|
||||
return nil
|
||||
end
|
||||
local insecure = params.allowinsecure or params.insecure
|
||||
result.tls_allowInsecure = (insecure == "1" or insecure == "0") and insecure or (sub_allowinsecure and "1" or "0")
|
||||
elseif szType == 'tuic' then
|
||||
if has_singbox then
|
||||
result.type = 'sing-box'
|
||||
|
||||
Reference in new issue
Block a user