Warn on deprecated allowInsecure usage

https://github.com/2dust/v2rayN/issues/9435
This commit is contained in:
2dust
2026-06-02 16:42:04 +08:00
parent f2e0bd4eba
commit ef4dda0996
6 changed files with 25 additions and 1 deletions

View File

@@ -134,6 +134,12 @@ public class NodeValidator
{
v.Error(string.Format(ResUI.MsgInvalidProperty, "TLS Certificate"));
}
// Check for deprecated allowInsecure property when TLS is enabled
if (item.AllowInsecure == "true")
{
v.Warning(ResUI.MsgAllowInsecureDeprecated);
}
}
if (item.StreamSecurity == Global.StreamSecurityReality)

View File

@@ -1914,6 +1914,15 @@ namespace ServiceLib.Resx {
}
}
/// <summary>
/// 查找类似 Warning: &quot;allowInsecure&quot; has been removed from Xray. Please use &quot;pinnedPeerCertSha256&quot; certificate instead. 的本地化字符串。
/// </summary>
public static string MsgAllowInsecureDeprecated {
get {
return ResourceManager.GetString("MsgAllowInsecureDeprecated", resourceCulture);
}
}
/// <summary>
/// 查找类似 {0} has a new version available: {1} 的本地化字符串。
/// </summary>

View File

@@ -1743,4 +1743,4 @@ The "Get Certificate" action may fail if a self-signed certificate is used or if
<data name="menuNewUpdate" xml:space="preserve">
<value>Nouvelle MAJ</value>
</data>
</root>
</root>

View File

@@ -1746,4 +1746,7 @@ The "Get Certificate" action may fail if a self-signed certificate is used or if
<data name="menuNewUpdate" xml:space="preserve">
<value>New Update</value>
</data>
<data name="MsgAllowInsecureDeprecated" xml:space="preserve">
<value>Warning: "allowInsecure" has been removed from Xray. Please use "pinnedPeerCertSha256" certificate instead.</value>
</data>
</root>

View File

@@ -1743,4 +1743,7 @@
<data name="menuNewUpdate" xml:space="preserve">
<value>有更新</value>
</data>
<data name="MsgAllowInsecureDeprecated" xml:space="preserve">
<value>警告Xray 中已移除 "allowInsecure" 。请改用证书固定 "pinnedPeerCertSha256" </value>
</data>
</root>

View File

@@ -1743,4 +1743,7 @@
<data name="menuNewUpdate" xml:space="preserve">
<value>有更新</value>
</data>
<data name="MsgAllowInsecureDeprecated" xml:space="preserve">
<value>警告Xray 中已移除 "allowInsecure" 。請改用憑證固定 "pinnedPeerCertSha256"</value>
</data>
</root>