mirror of
https://github.com/2dust/v2rayN.git
synced 2026-08-19 21:52:04 +03:00
Fix (#9991)
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace ServiceLib.Handler.Builder;
|
||||
|
||||
public record CoreConfigContextBuilderResult(CoreConfigContext Context, NodeValidatorResult ValidatorResult)
|
||||
@@ -205,7 +203,7 @@ public class CoreConfigContextBuilder
|
||||
Context = preSocksResult.Context with
|
||||
{
|
||||
ProtectDomainList =
|
||||
[.. nodeContext.ProtectDomainList ?? [], .. preSocksResult.Context.ProtectDomainList ?? []],
|
||||
[.. nodeContext.ProtectDomainList, .. preSocksResult.Context.ProtectDomainList],
|
||||
ProtectCoreTypeList = protectCoreTypeList,
|
||||
},
|
||||
};
|
||||
@@ -386,7 +384,7 @@ public class CoreConfigContextBuilder
|
||||
{
|
||||
var echQuerySni = node.Sni;
|
||||
if (node.StreamSecurity == Global.StreamSecurity
|
||||
&& node.EchConfigList?.Contains("://") == true)
|
||||
&& node.EchConfigList.Contains("://"))
|
||||
{
|
||||
var idx = node.EchConfigList.IndexOf('+');
|
||||
echQuerySni = idx > 0 ? node.EchConfigList[..idx] : node.Sni;
|
||||
|
||||
@@ -115,10 +115,10 @@ public class NodeValidator
|
||||
|
||||
if (item.GetNetwork() is nameof(ETransport.ws)
|
||||
&& item.EchConfigList.IsNullOrEmpty()
|
||||
&& item.GetAlpn()?.FirstOrDefault() == "h3")
|
||||
&& item.GetAlpn()?.FirstOrDefault() is "h3" or "h2")
|
||||
{
|
||||
v.Warning(
|
||||
"WebSocket but ALPN is set to h3, the core may ignore the ALPN setting or cause unexpected issues.");
|
||||
$"WebSocket but ALPN is set to {item.Alpn}, the core may ignore the ALPN setting or cause unexpected issues.");
|
||||
}
|
||||
|
||||
// TLS & Security
|
||||
@@ -131,14 +131,6 @@ public class NodeValidator
|
||||
isCertProvided = false;
|
||||
}
|
||||
|
||||
// Check for deprecated allowInsecure property when TLS is enabled
|
||||
if (item.GetAllowInsecure()
|
||||
&& item.Cert.IsNullOrEmpty()
|
||||
&& item.CertSha.IsNullOrEmpty())
|
||||
{
|
||||
v.Warning(ResUI.MsgAllowInsecureDeprecated);
|
||||
}
|
||||
|
||||
if ((coreType == ECoreType.Xray
|
||||
&& item.GetAllowInsecure()
|
||||
&& !isCertProvided
|
||||
@@ -147,6 +139,10 @@ public class NodeValidator
|
||||
&& item.GetAllowInsecure()
|
||||
&& !isCertProvided))
|
||||
{
|
||||
if (coreType == ECoreType.Xray)
|
||||
{
|
||||
v.Warning(ResUI.MsgAllowInsecureDeprecated);
|
||||
}
|
||||
v.Warning(ResUI.MsgInsecureConfiguration);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user