From b6cc3913ac2f7807048fc531ad52c9b658aade48 Mon Sep 17 00:00:00 2001 From: DHR60 <192860629+DHR60@users.noreply.github.com> Date: Fri, 14 Aug 2026 02:22:10 +0000 Subject: [PATCH] Perf hy2 fmt (#9953) --- v2rayN/ServiceLib/Handler/Fmt/Hysteria2Fmt.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/v2rayN/ServiceLib/Handler/Fmt/Hysteria2Fmt.cs b/v2rayN/ServiceLib/Handler/Fmt/Hysteria2Fmt.cs index 83172117..3ba5973d 100644 --- a/v2rayN/ServiceLib/Handler/Fmt/Hysteria2Fmt.cs +++ b/v2rayN/ServiceLib/Handler/Fmt/Hysteria2Fmt.cs @@ -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 {