pull/4729/head
2dust 10 months ago
parent a9c59693ee
commit 4af148f480

@ -187,10 +187,7 @@ namespace v2rayN.Handler
config.mux4SboxItem = new() config.mux4SboxItem = new()
{ {
protocol = Global.SingboxMuxs[0], protocol = Global.SingboxMuxs[0],
max_connections = 4, max_connections = 4
min_streams = 4,
max_streams = 0,
padding = true
}; };
} }

@ -170,7 +170,7 @@ namespace v2rayN.Handler
{ {
if (_config.tunModeItem.mtu <= 0) 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)) 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.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; outbound.down_mbps = _config.hysteriaItem.down_mbps > 0 ? _config.hysteriaItem.down_mbps : null;
GenOutboundMux(node, outbound);
} }
else if (node.configType == EConfigType.Tuic) else if (node.configType == EConfigType.Tuic)
{ {
@ -304,8 +302,6 @@ namespace v2rayN.Handler
outbound.uuid = node.id; outbound.uuid = node.id;
outbound.password = node.security; outbound.password = node.security;
outbound.congestion_control = node.headerType; outbound.congestion_control = node.headerType;
GenOutboundMux(node, outbound);
} }
else if (node.configType == EConfigType.Wireguard) else if (node.configType == EConfigType.Wireguard)
{ {
@ -316,7 +312,6 @@ namespace v2rayN.Handler
outbound.reserved = Utils.String2List(node.path).Select(int.Parse).ToArray(); outbound.reserved = Utils.String2List(node.path).Select(int.Parse).ToArray();
outbound.local_address = [.. Utils.String2List(node.requestHost)]; outbound.local_address = [.. Utils.String2List(node.requestHost)];
outbound.mtu = Utils.ToInt(node.shortId.IsNullOrEmpty() ? Global.TunMtus.FirstOrDefault() : node.shortId); outbound.mtu = Utils.ToInt(node.shortId.IsNullOrEmpty() ? Global.TunMtus.FirstOrDefault() : node.shortId);
GenOutboundMux(node, outbound);
} }
GenOutboundTls(node, outbound); GenOutboundTls(node, outbound);
@ -339,11 +334,8 @@ namespace v2rayN.Handler
// var mux = new Multiplex4Sbox() // var mux = new Multiplex4Sbox()
// { // {
// enabled = true, // enabled = true,
// protocol = _config.mux4Sbox.protocol, // protocol = _config.mux4SboxItem.protocol,
// max_connections = _config.mux4Sbox.max_connections, // max_connections = _config.mux4SboxItem.max_connections,
// min_streams = _config.mux4Sbox.min_streams,
// max_streams = _config.mux4Sbox.max_streams,
// padding = _config.mux4Sbox.padding
// }; // };
// outbound.multiplex = mux; // outbound.multiplex = mux;
//} //}

@ -203,9 +203,6 @@ namespace v2rayN.Mode
{ {
public string protocol { get; set; } public string protocol { get; set; }
public int max_connections { 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] [Serializable]

@ -139,9 +139,6 @@
public bool enabled { get; set; } public bool enabled { get; set; }
public string protocol { get; set; } public string protocol { get; set; }
public int max_connections { 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 public class Utls4Sbox

@ -512,8 +512,8 @@ namespace v2rayN.Views
private void StorageUI() private void StorageUI()
{ {
_config.uiItem.mainWidth = this.Width; _config.uiItem.mainWidth = Utils.ToInt(this.Width);
_config.uiItem.mainHeight = this.Height; _config.uiItem.mainHeight = Utils.ToInt(this.Height);
List<ColumnItem> lvColumnItem = new(); List<ColumnItem> lvColumnItem = new();
for (int k = 0; k < lstProfiles.Columns.Count; k++) for (int k = 0; k < lstProfiles.Columns.Count; k++)
@ -522,7 +522,7 @@ namespace v2rayN.Views
lvColumnItem.Add(new() lvColumnItem.Add(new()
{ {
Name = item2.ExName, 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 Index = item2.DisplayIndex
}); });
} }

Loading…
Cancel
Save