mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-11-03 18:13:56 +08:00
update 2026-09-26 07:00:56
This commit is contained in:
1 parent
8971d1aa5c
commit
7b88b273d0
66 files changed
+20572
-10
No files matched your search
@@ -8,6 +8,7 @@ local ech_domain = {}
|
||||
|
||||
local local_version = api.get_app_version("sing-box"):match("[^v]+")
|
||||
local version_ge_1_14_0 = api.compare_versions(local_version, ">=", "1.14.0")
|
||||
local version_ge_1_15_0 = api.compare_versions(local_version, ">=", "1.15.0")
|
||||
|
||||
local GLOBAL = {
|
||||
DNS_SERVER = {},
|
||||
@@ -242,7 +243,7 @@ function gen_outbound(flag, node, tag, proxy_table)
|
||||
enabled = true,
|
||||
disable_sni = (node.tls_disable_sni == "1") and true or false, --不要在 ClientHello 中发送服务器名称.
|
||||
server_name = node.tls_serverName, --用于验证返回证书上的主机名,除非设置不安全。它还包含在 ClientHello 中以支持虚拟主机,除非它是 IP 地址。
|
||||
insecure = node.tls_allowInsecure == "1" or (node.tls_pinSHA256 and node.tls_pinSHA256 ~= ""), --接受任何服务器证书。(兼顾 xray 的 pinnedPeerCertSha256 )
|
||||
insecure = node.tls_allowInsecure == "1", --接受任何服务器证书。
|
||||
alpn = alpn, --支持的应用层协议协商列表,按优先顺序排列。如果两个对等点都支持 ALPN,则选择的协议将是此列表中的一个,如果没有相互支持的协议则连接将失败。
|
||||
--min_version = "1.2",
|
||||
--max_version = "1.3",
|
||||
@@ -289,6 +290,13 @@ function gen_outbound(flag, node, tag, proxy_table)
|
||||
short_id = node.reality_shortId
|
||||
} or nil
|
||||
}
|
||||
if version_ge_1_15_0 then
|
||||
if node.tls_pinSHA256 and node.tls_pinSHA256 ~= "" then
|
||||
tls.certificate_sha256 = { api.sha256_xray_sb(node.tls_pinSHA256) }
|
||||
end
|
||||
else
|
||||
tls.insecure = node.tls_allowInsecure == "1" or (node.tls_pinSHA256 and node.tls_pinSHA256 ~= "")
|
||||
end
|
||||
end
|
||||
|
||||
local mux = nil
|
||||
|
||||
Reference in new issue
Block a user