Add more options to xray fragment

pull/6461/head
2dust 2025-01-08 13:52:21 +08:00
parent 98d4a47efb
commit d93c12b354
4 changed files with 18 additions and 3 deletions

View File

@ -156,6 +156,12 @@ namespace ServiceLib.Handler
config.SystemProxyItem ??= new(); config.SystemProxyItem ??= new();
config.WebDavItem ??= new(); config.WebDavItem ??= new();
config.CheckUpdateItem ??= new(); config.CheckUpdateItem ??= new();
config.Fragment4RayItem ??= new()
{
Packets = "tlshello",
Length = "100-200",
Interval = "10-20"
};
if (Utils.IsNotEmpty(config.ConstItem.DefIEProxyExceptions)) if (Utils.IsNotEmpty(config.ConstItem.DefIEProxyExceptions))
{ {

View File

@ -47,6 +47,7 @@
public SystemProxyItem SystemProxyItem { get; set; } public SystemProxyItem SystemProxyItem { get; set; }
public WebDavItem WebDavItem { get; set; } public WebDavItem WebDavItem { get; set; }
public CheckUpdateItem CheckUpdateItem { get; set; } public CheckUpdateItem CheckUpdateItem { get; set; }
public Fragment4RayItem? Fragment4RayItem { get; set; }
public List<InItem> Inbound { get; set; } public List<InItem> Inbound { get; set; }
public List<KeyEventItem> GlobalHotkeys { get; set; } public List<KeyEventItem> GlobalHotkeys { get; set; }
public List<CoreTypeItem> CoreTypeItem { get; set; } public List<CoreTypeItem> CoreTypeItem { get; set; }

View File

@ -246,4 +246,12 @@
public bool CheckPreReleaseUpdate { get; set; } public bool CheckPreReleaseUpdate { get; set; }
public List<string>? SelectedCoreTypes { get; set; } public List<string>? SelectedCoreTypes { get; set; }
} }
[Serializable]
public class Fragment4RayItem
{
public string? Packets { get; set; }
public string? Length { get; set; }
public string? Interval { get; set; }
}
} }

View File

@ -1167,9 +1167,9 @@ namespace ServiceLib.Services.CoreConfig
{ {
fragment = new() fragment = new()
{ {
packets = "tlshello", packets = _config.Fragment4RayItem?.Packets,
length = "100-200", length = _config.Fragment4RayItem?.Length,
interval = "10-20" interval = _config.Fragment4RayItem?.Interval
} }
} }
}; };