Remove allowInsecure from the Xray Core

https://github.com/2dust/v2rayN/issues/9893
This commit is contained in:
2dust
2026-08-05 18:48:39 +08:00
parent d381d429e4
commit e8cdd1cc02
2 changed files with 0 additions and 5 deletions
@@ -364,8 +364,6 @@ public class StreamSettings4Ray
public class TlsSettings4Ray public class TlsSettings4Ray
{ {
public bool? allowInsecure { get; set; }
public string? serverName { get; set; } public string? serverName { get; set; }
public List<string>? alpn { get; set; } public List<string>? alpn { get; set; }
@@ -410,7 +410,6 @@ public partial class CoreConfigV2rayService
TlsSettings4Ray tlsSettings = new() TlsSettings4Ray tlsSettings = new()
{ {
allowInsecure = _node.GetAllowInsecure(),
alpn = _node.GetAlpn(), alpn = _node.GetAlpn(),
fingerprint = _node.Fingerprint.IsNullOrEmpty() ? _config.CoreBasicItem.DefFingerprint : _node.Fingerprint, fingerprint = _node.Fingerprint.IsNullOrEmpty() ? _config.CoreBasicItem.DefFingerprint : _node.Fingerprint,
echConfigList = _node.EchConfigList.NullIfEmpty(), echConfigList = _node.EchConfigList.NullIfEmpty(),
@@ -444,12 +443,10 @@ public partial class CoreConfigV2rayService
} }
tlsSettings.certificates = certsettings; tlsSettings.certificates = certsettings;
tlsSettings.disableSystemRoot = true; tlsSettings.disableSystemRoot = true;
tlsSettings.allowInsecure = false;
} }
else if (!_node.CertSha.IsNullOrEmpty()) else if (!_node.CertSha.IsNullOrEmpty())
{ {
tlsSettings.pinnedPeerCertSha256 = _node.CertSha; tlsSettings.pinnedPeerCertSha256 = _node.CertSha;
tlsSettings.allowInsecure = false;
} }
streamSettings.tlsSettings = tlsSettings; streamSettings.tlsSettings = tlsSettings;
} }