mirror of
https://github.com/2dust/v2rayN.git
synced 2026-04-16 04:25:45 +00:00
Merge 993feb4b07 into 2ea9c5a2ff
This commit is contained in:
commit
d36565626b
4 changed files with 10 additions and 14 deletions
|
|
@ -77,10 +77,11 @@ public static class ConfigHandler
|
||||||
Tti = 50,
|
Tti = 50,
|
||||||
UplinkCapacity = 12,
|
UplinkCapacity = 12,
|
||||||
DownlinkCapacity = 100,
|
DownlinkCapacity = 100,
|
||||||
ReadBufferSize = 2,
|
CwndMultiplier = 1,
|
||||||
WriteBufferSize = 2,
|
MaxSendingWindow = 2 * 1024 * 1024,
|
||||||
Congestion = false
|
|
||||||
};
|
};
|
||||||
|
config.KcpItem.CwndMultiplier = config.KcpItem.CwndMultiplier <= 0 ? 1 : config.KcpItem.CwndMultiplier;
|
||||||
|
config.KcpItem.MaxSendingWindow = config.KcpItem.MaxSendingWindow <= 0 ? (2 * 1024 * 1024) : config.KcpItem.MaxSendingWindow;
|
||||||
config.GrpcItem ??= new GrpcItem
|
config.GrpcItem ??= new GrpcItem
|
||||||
{
|
{
|
||||||
IdleTimeout = 60,
|
IdleTimeout = 60,
|
||||||
|
|
|
||||||
|
|
@ -49,11 +49,9 @@ public class KcpItem
|
||||||
|
|
||||||
public int DownlinkCapacity { get; set; }
|
public int DownlinkCapacity { get; set; }
|
||||||
|
|
||||||
public bool Congestion { get; set; }
|
public int CwndMultiplier { get; set; }
|
||||||
|
|
||||||
public int ReadBufferSize { get; set; }
|
public int MaxSendingWindow { get; set; }
|
||||||
|
|
||||||
public int WriteBufferSize { get; set; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
|
|
|
||||||
|
|
@ -397,11 +397,9 @@ public class KcpSettings4Ray
|
||||||
|
|
||||||
public int downlinkCapacity { get; set; }
|
public int downlinkCapacity { get; set; }
|
||||||
|
|
||||||
public bool congestion { get; set; }
|
public int cwndMultiplier { get; set; }
|
||||||
|
|
||||||
public int readBufferSize { get; set; }
|
public int maxSendingWindow { get; set; }
|
||||||
|
|
||||||
public int writeBufferSize { get; set; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class WsSettings4Ray
|
public class WsSettings4Ray
|
||||||
|
|
|
||||||
|
|
@ -432,9 +432,8 @@ public partial class CoreConfigV2rayService
|
||||||
kcpSettings.uplinkCapacity = _config.KcpItem.UplinkCapacity;
|
kcpSettings.uplinkCapacity = _config.KcpItem.UplinkCapacity;
|
||||||
kcpSettings.downlinkCapacity = _config.KcpItem.DownlinkCapacity;
|
kcpSettings.downlinkCapacity = _config.KcpItem.DownlinkCapacity;
|
||||||
|
|
||||||
kcpSettings.congestion = _config.KcpItem.Congestion;
|
kcpSettings.cwndMultiplier = _config.KcpItem.CwndMultiplier;
|
||||||
kcpSettings.readBufferSize = _config.KcpItem.ReadBufferSize;
|
kcpSettings.maxSendingWindow = _config.KcpItem.MaxSendingWindow;
|
||||||
kcpSettings.writeBufferSize = _config.KcpItem.WriteBufferSize;
|
|
||||||
var kcpFinalmask = new Finalmask4Ray();
|
var kcpFinalmask = new Finalmask4Ray();
|
||||||
if (Global.KcpHeaderMaskMap.TryGetValue(_node.HeaderType, out var header))
|
if (Global.KcpHeaderMaskMap.TryGetValue(_node.HeaderType, out var header))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue