This commit is contained in:
DHR60
2026-08-19 01:56:38 +00:00
committed by GitHub
parent 3b3fe8def3
commit 11bd52b6a5
+13 -9
View File
@@ -166,15 +166,19 @@ public class Hysteria2Fmt : BaseFmt
} }
if (item.CertSha.IsNullOrEmpty()) if (item.CertSha.IsNullOrEmpty())
{ {
item.CertSha = GetQueryDecoded(query, "pinSHA256"); var pinSHA256 = GetQueryDecoded(query, "pinSHA256");
// NOTE: item.CertSha = pinSHA256;
// To accommodate Xray changes, if (!pinSHA256.IsNullOrEmpty())
// 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. // NOTE:
// Since this won't compromise the overall security model, // To accommodate Xray changes,
// `insecure = true` is automatically set when a fingerprint is detected, // some providers issue self-signed cert links with `insecure = false` and a certificate fingerprint,
// and the value is restored when generating configurations. // breaking interoperability between Xray, official Hysteria 2 client, and sing-box.
item.AllowInsecure = Global.StringTrue; // 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.EchConfigList = GetQueryDecoded(query, "ech"); item.EchConfigList = GetQueryDecoded(query, "ech");
item.SetProtocolExtra(item.GetProtocolExtra() with item.SetProtocolExtra(item.GetProtocolExtra() with