mirror of
https://github.com/2dust/v2rayN.git
synced 2026-04-18 13:35:47 +00:00
Support kcp cwndMultiplier (#9113)
Some checks are pending
release Linux / build (push) Waiting to run
release Linux / release-zip (push) Blocked by required conditions
release Linux / build and release deb x64 & arm64 (push) Waiting to run
release Linux / build and release rpm x64 & arm64 (push) Waiting to run
release Linux / build and release rpm riscv64 (push) Waiting to run
release macOS / build (push) Waiting to run
release macOS / release-zip (push) Blocked by required conditions
release macOS / package and release macOS dmg (push) Blocked by required conditions
release Windows desktop (Avalonia UI) / build (push) Waiting to run
release Windows desktop (Avalonia UI) / release-zip (push) Blocked by required conditions
release Windows / build (push) Waiting to run
release Windows / release-zip (push) Blocked by required conditions
Some checks are pending
release Linux / build (push) Waiting to run
release Linux / release-zip (push) Blocked by required conditions
release Linux / build and release deb x64 & arm64 (push) Waiting to run
release Linux / build and release rpm x64 & arm64 (push) Waiting to run
release Linux / build and release rpm riscv64 (push) Waiting to run
release macOS / build (push) Waiting to run
release macOS / release-zip (push) Blocked by required conditions
release macOS / package and release macOS dmg (push) Blocked by required conditions
release Windows desktop (Avalonia UI) / build (push) Waiting to run
release Windows desktop (Avalonia UI) / release-zip (push) Blocked by required conditions
release Windows / build (push) Waiting to run
release Windows / release-zip (push) Blocked by required conditions
This commit is contained in:
parent
eeecef4db9
commit
cabd0df282
4 changed files with 10 additions and 14 deletions
|
|
@ -77,10 +77,11 @@ public static class ConfigHandler
|
|||
Tti = 50,
|
||||
UplinkCapacity = 12,
|
||||
DownlinkCapacity = 100,
|
||||
ReadBufferSize = 2,
|
||||
WriteBufferSize = 2,
|
||||
Congestion = false
|
||||
CwndMultiplier = 1,
|
||||
MaxSendingWindow = 2 * 1024 * 1024,
|
||||
};
|
||||
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
|
||||
{
|
||||
IdleTimeout = 60,
|
||||
|
|
|
|||
|
|
@ -49,11 +49,9 @@ public class KcpItem
|
|||
|
||||
public int DownlinkCapacity { get; set; }
|
||||
|
||||
public bool Congestion { get; set; }
|
||||
public int CwndMultiplier { get; set; }
|
||||
|
||||
public int ReadBufferSize { get; set; }
|
||||
|
||||
public int WriteBufferSize { get; set; }
|
||||
public int MaxSendingWindow { get; set; }
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
|
|
|
|||
|
|
@ -409,11 +409,9 @@ public class KcpSettings4Ray
|
|||
|
||||
public int downlinkCapacity { get; set; }
|
||||
|
||||
public bool congestion { get; set; }
|
||||
public int cwndMultiplier { get; set; }
|
||||
|
||||
public int readBufferSize { get; set; }
|
||||
|
||||
public int writeBufferSize { get; set; }
|
||||
public int maxSendingWindow { get; set; }
|
||||
}
|
||||
|
||||
public class WsSettings4Ray
|
||||
|
|
|
|||
|
|
@ -477,9 +477,8 @@ public partial class CoreConfigV2rayService
|
|||
kcpSettings.uplinkCapacity = _config.KcpItem.UplinkCapacity;
|
||||
kcpSettings.downlinkCapacity = _config.KcpItem.DownlinkCapacity;
|
||||
|
||||
kcpSettings.congestion = _config.KcpItem.Congestion;
|
||||
kcpSettings.readBufferSize = _config.KcpItem.ReadBufferSize;
|
||||
kcpSettings.writeBufferSize = _config.KcpItem.WriteBufferSize;
|
||||
kcpSettings.cwndMultiplier = _config.KcpItem.CwndMultiplier;
|
||||
kcpSettings.maxSendingWindow = _config.KcpItem.MaxSendingWindow;
|
||||
var kcpFinalmask = new Finalmask4Ray();
|
||||
if (Global.KcpHeaderMaskMap.TryGetValue(headerType, out var header))
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue