Perf hy2 fmt (#9953)

This commit is contained in:
DHR60
2026-08-14 02:22:10 +00:00
committed by GitHub
parent bc06a5dc21
commit b6cc3913ac

View File

@@ -169,6 +169,14 @@ public class Hysteria2Fmt : BaseFmt
if (item.CertSha.IsNullOrEmpty())
{
item.CertSha = GetQueryDecoded(query, "pinSHA256");
// NOTE:
// To accommodate Xray changes,
// some providers issue self-signed cert links with `insecure = false` and a certificate fingerprint,
// breaking interoperability between Xray, official Hysteria 2 client, and sing-box.
// Since this won't compromise the overall security model,
// `insecure = true` is automatically set when a fingerprint is detected,
// and the value is restored when generating configurations.
item.AllowInsecure = Global.StringTrue;
}
item.SetProtocolExtra(item.GetProtocolExtra() with
{