diff --git a/v2rayN/v2rayN/Handler/ConfigHandler.cs b/v2rayN/v2rayN/Handler/ConfigHandler.cs index ee8fc7dc..74b68a13 100644 --- a/v2rayN/v2rayN/Handler/ConfigHandler.cs +++ b/v2rayN/v2rayN/Handler/ConfigHandler.cs @@ -187,10 +187,7 @@ namespace v2rayN.Handler config.mux4SboxItem = new() { protocol = Global.SingboxMuxs[0], - max_connections = 4, - min_streams = 4, - max_streams = 0, - padding = true + max_connections = 4 }; } diff --git a/v2rayN/v2rayN/Handler/CoreConfigSingbox.cs b/v2rayN/v2rayN/Handler/CoreConfigSingbox.cs index a1505e2e..323c14bf 100644 --- a/v2rayN/v2rayN/Handler/CoreConfigSingbox.cs +++ b/v2rayN/v2rayN/Handler/CoreConfigSingbox.cs @@ -170,7 +170,7 @@ namespace v2rayN.Handler { if (_config.tunModeItem.mtu <= 0) { - _config.tunModeItem.mtu = Convert.ToInt32(Global.TunMtus[0]); + _config.tunModeItem.mtu = Utils.ToInt(Global.TunMtus[0]); } if (Utils.IsNullOrEmpty(_config.tunModeItem.stack)) { @@ -294,8 +294,6 @@ namespace v2rayN.Handler outbound.up_mbps = _config.hysteriaItem.up_mbps > 0 ? _config.hysteriaItem.up_mbps : null; outbound.down_mbps = _config.hysteriaItem.down_mbps > 0 ? _config.hysteriaItem.down_mbps : null; - - GenOutboundMux(node, outbound); } else if (node.configType == EConfigType.Tuic) { @@ -304,8 +302,6 @@ namespace v2rayN.Handler outbound.uuid = node.id; outbound.password = node.security; outbound.congestion_control = node.headerType; - - GenOutboundMux(node, outbound); } else if (node.configType == EConfigType.Wireguard) { @@ -316,7 +312,6 @@ namespace v2rayN.Handler outbound.reserved = Utils.String2List(node.path).Select(int.Parse).ToArray(); outbound.local_address = [.. Utils.String2List(node.requestHost)]; outbound.mtu = Utils.ToInt(node.shortId.IsNullOrEmpty() ? Global.TunMtus.FirstOrDefault() : node.shortId); - GenOutboundMux(node, outbound); } GenOutboundTls(node, outbound); @@ -339,11 +334,8 @@ namespace v2rayN.Handler // var mux = new Multiplex4Sbox() // { // enabled = true, - // protocol = _config.mux4Sbox.protocol, - // max_connections = _config.mux4Sbox.max_connections, - // min_streams = _config.mux4Sbox.min_streams, - // max_streams = _config.mux4Sbox.max_streams, - // padding = _config.mux4Sbox.padding + // protocol = _config.mux4SboxItem.protocol, + // max_connections = _config.mux4SboxItem.max_connections, // }; // outbound.multiplex = mux; //} diff --git a/v2rayN/v2rayN/Mode/ConfigItems.cs b/v2rayN/v2rayN/Mode/ConfigItems.cs index dbe062ca..3035e333 100644 --- a/v2rayN/v2rayN/Mode/ConfigItems.cs +++ b/v2rayN/v2rayN/Mode/ConfigItems.cs @@ -203,9 +203,6 @@ namespace v2rayN.Mode { public string protocol { get; set; } public int max_connections { get; set; } - public int min_streams { get; set; } - public int max_streams { get; set; } - public bool padding { get; set; } } [Serializable] diff --git a/v2rayN/v2rayN/Mode/SingboxConfig.cs b/v2rayN/v2rayN/Mode/SingboxConfig.cs index ecde1b68..07780808 100644 --- a/v2rayN/v2rayN/Mode/SingboxConfig.cs +++ b/v2rayN/v2rayN/Mode/SingboxConfig.cs @@ -139,9 +139,6 @@ public bool enabled { get; set; } public string protocol { get; set; } public int max_connections { get; set; } - public int min_streams { get; set; } - public int max_streams { get; set; } - public bool padding { get; set; } } public class Utls4Sbox diff --git a/v2rayN/v2rayN/Views/MainWindow.xaml.cs b/v2rayN/v2rayN/Views/MainWindow.xaml.cs index fa328075..4b069334 100644 --- a/v2rayN/v2rayN/Views/MainWindow.xaml.cs +++ b/v2rayN/v2rayN/Views/MainWindow.xaml.cs @@ -512,8 +512,8 @@ namespace v2rayN.Views private void StorageUI() { - _config.uiItem.mainWidth = this.Width; - _config.uiItem.mainHeight = this.Height; + _config.uiItem.mainWidth = Utils.ToInt(this.Width); + _config.uiItem.mainHeight = Utils.ToInt(this.Height); List lvColumnItem = new(); for (int k = 0; k < lstProfiles.Columns.Count; k++) @@ -522,7 +522,7 @@ namespace v2rayN.Views lvColumnItem.Add(new() { Name = item2.ExName, - Width = item2.Visibility == Visibility.Visible ? Convert.ToInt32(item2.ActualWidth) : -1, + Width = item2.Visibility == Visibility.Visible ? Utils.ToInt(item2.ActualWidth) : -1, Index = item2.DisplayIndex }); }