xray mux add more option

https://github.com/2dust/v2rayN/issues/5565
pull/5636/head
2dust 2024-08-31 10:12:21 +08:00
parent 2879fddfd9
commit d6ca317b20
5 changed files with 22 additions and 9 deletions

View File

@ -173,6 +173,13 @@ namespace ServiceLib.Handler
config.speedTestItem.speedPingTestUrl = Global.SpeedPingTestUrl;
}
config.mux4RayItem ??= new()
{
concurrency = 8,
xudpConcurrency = 16,
xudpProxyUDP443 = "reject"
};
if (config.mux4SboxItem == null)
{
config.mux4SboxItem = new()

View File

@ -770,7 +770,9 @@ namespace ServiceLib.Handler.CoreConfig
if (enabled)
{
outbound.mux.enabled = true;
outbound.mux.concurrency = 8;
outbound.mux.concurrency = _config.mux4RayItem.concurrency;
outbound.mux.xudpConcurrency = _config.mux4RayItem.xudpConcurrency;
outbound.mux.xudpProxyUDP443 = _config.mux4RayItem.xudpProxyUDP443;
}
else
{

View File

@ -41,6 +41,7 @@
public UIItem uiItem { get; set; }
public ConstItem constItem { get; set; }
public SpeedTestItem speedTestItem { get; set; }
public Mux4RayItem mux4RayItem { get; set; }
public Mux4SboxItem mux4SboxItem { get; set; }
public HysteriaItem hysteriaItem { get; set; }
public ClashUIItem clashUIItem { get; set; }

View File

@ -197,6 +197,14 @@
public int Index { get; set; }
}
[Serializable]
public class Mux4RayItem
{
public int? concurrency { get; set; }
public int? xudpConcurrency { get; set; }
public string? xudpProxyUDP443 { get; set; }
}
[Serializable]
public class Mux4SboxItem
{

View File

@ -343,15 +343,10 @@ namespace ServiceLib.Models
public class Mux4Ray
{
/// <summary>
///
/// </summary>
public bool enabled { get; set; }
/// <summary>
///
/// </summary>
public int concurrency { get; set; }
public int? concurrency { get; set; }
public int? xudpConcurrency { get; set; }
public string? xudpProxyUDP443 { get; set; }
}
public class Response4Ray