diff --git a/v2rayN/ServiceLib/Resx/ResUI.Designer.cs b/v2rayN/ServiceLib/Resx/ResUI.Designer.cs
index 10654ee6..e38d9306 100644
--- a/v2rayN/ServiceLib/Resx/ResUI.Designer.cs
+++ b/v2rayN/ServiceLib/Resx/ResUI.Designer.cs
@@ -2094,6 +2094,15 @@ namespace ServiceLib.Resx {
}
}
+ ///
+ /// 查找类似 Not support protocol '{0}'. 的本地化字符串。
+ ///
+ public static string NotSupportProtocol {
+ get {
+ return ResourceManager.GetString("NotSupportProtocol", resourceCulture);
+ }
+ }
+
///
/// 查找类似 Scan completed, no valid QR code found 的本地化字符串。
///
diff --git a/v2rayN/ServiceLib/Resx/ResUI.fa-Ir.resx b/v2rayN/ServiceLib/Resx/ResUI.fa-Ir.resx
index 10b84c10..b22e5ef0 100644
--- a/v2rayN/ServiceLib/Resx/ResUI.fa-Ir.resx
+++ b/v2rayN/ServiceLib/Resx/ResUI.fa-Ir.resx
@@ -1590,4 +1590,7 @@
The group "{0}" cannot reference itself.
+
+ Not support protocol '{0}'.
+
\ No newline at end of file
diff --git a/v2rayN/ServiceLib/Resx/ResUI.hu.resx b/v2rayN/ServiceLib/Resx/ResUI.hu.resx
index a0c07e2e..93a9cd2b 100644
--- a/v2rayN/ServiceLib/Resx/ResUI.hu.resx
+++ b/v2rayN/ServiceLib/Resx/ResUI.hu.resx
@@ -1590,4 +1590,7 @@
The group "{0}" cannot reference itself.
+
+ Not support protocol '{0}'.
+
\ No newline at end of file
diff --git a/v2rayN/ServiceLib/Resx/ResUI.resx b/v2rayN/ServiceLib/Resx/ResUI.resx
index d51042ec..cbac5835 100644
--- a/v2rayN/ServiceLib/Resx/ResUI.resx
+++ b/v2rayN/ServiceLib/Resx/ResUI.resx
@@ -1590,4 +1590,7 @@
The group "{0}" cannot reference itself.
+
+ Not support protocol '{0}'.
+
\ No newline at end of file
diff --git a/v2rayN/ServiceLib/Resx/ResUI.ru.resx b/v2rayN/ServiceLib/Resx/ResUI.ru.resx
index 6c4d6125..e33889d0 100644
--- a/v2rayN/ServiceLib/Resx/ResUI.ru.resx
+++ b/v2rayN/ServiceLib/Resx/ResUI.ru.resx
@@ -1590,4 +1590,7 @@
The group "{0}" cannot reference itself.
+
+ Not support protocol '{0}'.
+
\ No newline at end of file
diff --git a/v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx b/v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx
index 62b3f82b..39833705 100644
--- a/v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx
+++ b/v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx
@@ -1587,4 +1587,7 @@
{0} 分组不能引用自身
+
+ 不支持协议 '{0}'。
+
\ No newline at end of file
diff --git a/v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx b/v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx
index f4141391..6a8efa14 100644
--- a/v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx
+++ b/v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx
@@ -1587,4 +1587,7 @@
The group "{0}" cannot reference itself.
+
+ Not support protocol '{0}'.
+
\ No newline at end of file
diff --git a/v2rayN/ServiceLib/Services/ActionPrecheckService.cs b/v2rayN/ServiceLib/Services/ActionPrecheckService.cs
index d9f72455..d5380c69 100644
--- a/v2rayN/ServiceLib/Services/ActionPrecheckService.cs
+++ b/v2rayN/ServiceLib/Services/ActionPrecheckService.cs
@@ -57,13 +57,11 @@ public class ActionPrecheckService(Config config)
{
var errors = new List();
- // sing-box does not support xhttp / kcp
- // sing-box does not support transports like ws/http/httpupgrade/etc. when the node is not vmess/trojan/vless
coreType ??= AppManager.Instance.GetCoreType(item, item.ConfigType);
if (item.ConfigType is EConfigType.Custom)
{
- errors.Add(string.Format(ResUI.CoreNotSupportProtocol, coreType.ToString(), item.ConfigType.ToString()));
+ errors.Add(string.Format(ResUI.NotSupportProtocol, item.ConfigType.ToString()));
return errors;
}
@@ -164,6 +162,8 @@ public class ActionPrecheckService(Config config)
if (coreType == ECoreType.sing_box)
{
+ // sing-box does not support xhttp / kcp
+ // sing-box does not support transports like ws/http/httpupgrade/etc. when the node is not vmess/trojan/vless
if (net is nameof(ETransport.kcp) or nameof(ETransport.xhttp))
{
errors.Add(string.Format(ResUI.CoreNotSupportNetwork, nameof(ECoreType.sing_box), net));
@@ -182,14 +182,15 @@ public class ActionPrecheckService(Config config)
else if (coreType is ECoreType.Xray)
{
// Xray core does not support these protocols
- if (item.ConfigType is EConfigType.Hysteria2 or EConfigType.TUIC or EConfigType.Anytls)
+ if (!Global.XraySupportConfigType.Contains(item.ConfigType)
+ && !item.IsComplex())
{
errors.Add(string.Format(ResUI.CoreNotSupportProtocol, nameof(ECoreType.Xray), item.ConfigType.ToString()));
return errors;
}
}
- return errors.Select(s => $"{item.Remarks}: {s}").ToList();
+ return errors;
}
private async Task> ValidateRelatedNodesExistAndValid(ProfileItem? item)