mirror of
https://github.com/2dust/v2rayN.git
synced 2025-10-13 20:09:12 +00:00
Compare commits
1 commit
e32dfc36b7
...
6c1ace9b35
Author | SHA1 | Date | |
---|---|---|---|
![]() |
6c1ace9b35 |
8 changed files with 5 additions and 33 deletions
9
v2rayN/ServiceLib/Resx/ResUI.Designer.cs
generated
9
v2rayN/ServiceLib/Resx/ResUI.Designer.cs
generated
|
@ -2094,15 +2094,6 @@ namespace ServiceLib.Resx {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 查找类似 Not support protocol '{0}'. 的本地化字符串。
|
|
||||||
/// </summary>
|
|
||||||
public static string NotSupportProtocol {
|
|
||||||
get {
|
|
||||||
return ResourceManager.GetString("NotSupportProtocol", resourceCulture);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 Scan completed, no valid QR code found 的本地化字符串。
|
/// 查找类似 Scan completed, no valid QR code found 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -1590,7 +1590,4 @@
|
||||||
<data name="GroupSelfReference" xml:space="preserve">
|
<data name="GroupSelfReference" xml:space="preserve">
|
||||||
<value>The group "{0}" cannot reference itself.</value>
|
<value>The group "{0}" cannot reference itself.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="NotSupportProtocol" xml:space="preserve">
|
|
||||||
<value>Not support protocol '{0}'.</value>
|
|
||||||
</data>
|
|
||||||
</root>
|
</root>
|
|
@ -1590,7 +1590,4 @@
|
||||||
<data name="GroupSelfReference" xml:space="preserve">
|
<data name="GroupSelfReference" xml:space="preserve">
|
||||||
<value>The group "{0}" cannot reference itself.</value>
|
<value>The group "{0}" cannot reference itself.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="NotSupportProtocol" xml:space="preserve">
|
|
||||||
<value>Not support protocol '{0}'.</value>
|
|
||||||
</data>
|
|
||||||
</root>
|
</root>
|
|
@ -1590,7 +1590,4 @@
|
||||||
<data name="GroupSelfReference" xml:space="preserve">
|
<data name="GroupSelfReference" xml:space="preserve">
|
||||||
<value>The group "{0}" cannot reference itself.</value>
|
<value>The group "{0}" cannot reference itself.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="NotSupportProtocol" xml:space="preserve">
|
|
||||||
<value>Not support protocol '{0}'.</value>
|
|
||||||
</data>
|
|
||||||
</root>
|
</root>
|
|
@ -1590,7 +1590,4 @@
|
||||||
<data name="GroupSelfReference" xml:space="preserve">
|
<data name="GroupSelfReference" xml:space="preserve">
|
||||||
<value>The group "{0}" cannot reference itself.</value>
|
<value>The group "{0}" cannot reference itself.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="NotSupportProtocol" xml:space="preserve">
|
|
||||||
<value>Not support protocol '{0}'.</value>
|
|
||||||
</data>
|
|
||||||
</root>
|
</root>
|
|
@ -1587,7 +1587,4 @@
|
||||||
<data name="GroupSelfReference" xml:space="preserve">
|
<data name="GroupSelfReference" xml:space="preserve">
|
||||||
<value>{0} 分组不能引用自身</value>
|
<value>{0} 分组不能引用自身</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="NotSupportProtocol" xml:space="preserve">
|
|
||||||
<value>不支持协议 '{0}'。</value>
|
|
||||||
</data>
|
|
||||||
</root>
|
</root>
|
|
@ -1587,7 +1587,4 @@
|
||||||
<data name="GroupSelfReference" xml:space="preserve">
|
<data name="GroupSelfReference" xml:space="preserve">
|
||||||
<value>The group "{0}" cannot reference itself.</value>
|
<value>The group "{0}" cannot reference itself.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="NotSupportProtocol" xml:space="preserve">
|
|
||||||
<value>Not support protocol '{0}'.</value>
|
|
||||||
</data>
|
|
||||||
</root>
|
</root>
|
|
@ -57,11 +57,13 @@ public class ActionPrecheckService(Config config)
|
||||||
{
|
{
|
||||||
var errors = new List<string>();
|
var errors = new List<string>();
|
||||||
|
|
||||||
|
// 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);
|
coreType ??= AppManager.Instance.GetCoreType(item, item.ConfigType);
|
||||||
|
|
||||||
if (item.ConfigType is EConfigType.Custom)
|
if (item.ConfigType is EConfigType.Custom)
|
||||||
{
|
{
|
||||||
errors.Add(string.Format(ResUI.NotSupportProtocol, item.ConfigType.ToString()));
|
errors.Add(string.Format(ResUI.CoreNotSupportProtocol, coreType.ToString(), item.ConfigType.ToString()));
|
||||||
return errors;
|
return errors;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -162,8 +164,6 @@ public class ActionPrecheckService(Config config)
|
||||||
|
|
||||||
if (coreType == ECoreType.sing_box)
|
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))
|
if (net is nameof(ETransport.kcp) or nameof(ETransport.xhttp))
|
||||||
{
|
{
|
||||||
errors.Add(string.Format(ResUI.CoreNotSupportNetwork, nameof(ECoreType.sing_box), net));
|
errors.Add(string.Format(ResUI.CoreNotSupportNetwork, nameof(ECoreType.sing_box), net));
|
||||||
|
@ -182,15 +182,14 @@ public class ActionPrecheckService(Config config)
|
||||||
else if (coreType is ECoreType.Xray)
|
else if (coreType is ECoreType.Xray)
|
||||||
{
|
{
|
||||||
// Xray core does not support these protocols
|
// Xray core does not support these protocols
|
||||||
if (!Global.XraySupportConfigType.Contains(item.ConfigType)
|
if (item.ConfigType is EConfigType.Hysteria2 or EConfigType.TUIC or EConfigType.Anytls)
|
||||||
&& !item.IsComplex())
|
|
||||||
{
|
{
|
||||||
errors.Add(string.Format(ResUI.CoreNotSupportProtocol, nameof(ECoreType.Xray), item.ConfigType.ToString()));
|
errors.Add(string.Format(ResUI.CoreNotSupportProtocol, nameof(ECoreType.Xray), item.ConfigType.ToString()));
|
||||||
return errors;
|
return errors;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return errors;
|
return errors.Select(s => $"{item.Remarks}: {s}").ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task<List<string>> ValidateRelatedNodesExistAndValid(ProfileItem? item)
|
private async Task<List<string>> ValidateRelatedNodesExistAndValid(ProfileItem? item)
|
||||||
|
|
Loading…
Reference in a new issue