mirror of
https://github.com/2dust/v2rayN.git
synced 2026-11-07 21:15:01 +03:00
Fix (#9987)
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user