diff --git a/v2rayN/ServiceLib/Models/CoreConfigs/SingboxConfig.cs b/v2rayN/ServiceLib/Models/CoreConfigs/SingboxConfig.cs index a835b15f05e..ccae7472487 100644 --- a/v2rayN/ServiceLib/Models/CoreConfigs/SingboxConfig.cs +++ b/v2rayN/ServiceLib/Models/CoreConfigs/SingboxConfig.cs @@ -184,6 +184,7 @@ public class Tls4Sbox public string? server_name { get; set; } public bool? insecure { get; set; } public List? alpn { get; set; } + public List? cipher_suites { get; set; } public Utls4Sbox? utls { get; set; } public Reality4Sbox? reality { get; set; } public bool? fragment { get; set; } diff --git a/v2rayN/ServiceLib/Services/CoreConfig/Singbox/SingboxOutboundService.cs b/v2rayN/ServiceLib/Services/CoreConfig/Singbox/SingboxOutboundService.cs index 81027a1f2e5..9be9be49350 100644 --- a/v2rayN/ServiceLib/Services/CoreConfig/Singbox/SingboxOutboundService.cs +++ b/v2rayN/ServiceLib/Services/CoreConfig/Singbox/SingboxOutboundService.cs @@ -433,6 +433,15 @@ private void FillOutboundTls(Outbound4Sbox outbound) } if (_node.StreamSecurity == Global.StreamSecurity) { + if (_node.CipherSuites.IsNotEmpty()) + { + // Xray stores cipher suites as a colon-separated string; sing-box wants a list of the same Go TLS names + tls.cipher_suites = _node.CipherSuites + .Split([':', ','], StringSplitOptions.RemoveEmptyEntries) + .Select(c => c.Trim()) + .Where(c => c.IsNotEmpty()) + .ToList(); + } var certs = CertPemManager.ParsePemChain(_node.Cert); if (certs.Count > 0) {