2024-08-19 10:15:54 +00:00
|
|
|
|
namespace ServiceLib.Models
|
2019-10-11 06:15:20 +00:00
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 本软件配置文件实体类
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Serializable]
|
|
|
|
|
public class Config
|
|
|
|
|
{
|
2022-02-26 04:27:59 +00:00
|
|
|
|
#region property
|
2023-02-11 11:34:15 +00:00
|
|
|
|
|
2024-10-23 02:42:35 +00:00
|
|
|
|
public string IndexId { get; set; }
|
|
|
|
|
public string SubIndexId { get; set; }
|
2022-10-14 12:43:54 +00:00
|
|
|
|
|
2024-10-23 02:42:35 +00:00
|
|
|
|
public ECoreType RunningCoreType { get; set; }
|
2024-03-30 08:00:19 +00:00
|
|
|
|
|
2024-07-19 02:51:14 +00:00
|
|
|
|
public bool IsRunningCore(ECoreType type)
|
|
|
|
|
{
|
2024-11-04 06:15:59 +00:00
|
|
|
|
switch (type)
|
2024-07-19 02:51:14 +00:00
|
|
|
|
{
|
2024-11-04 06:15:59 +00:00
|
|
|
|
case ECoreType.Xray when RunningCoreType is ECoreType.Xray or ECoreType.v2fly or ECoreType.v2fly_v5:
|
|
|
|
|
case ECoreType.sing_box when RunningCoreType is ECoreType.sing_box or ECoreType.mihomo:
|
|
|
|
|
return true;
|
|
|
|
|
default:
|
|
|
|
|
return false;
|
2024-07-19 02:51:14 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-04-14 12:49:36 +00:00
|
|
|
|
#endregion property
|
2019-10-11 06:15:20 +00:00
|
|
|
|
|
2023-01-01 11:42:01 +00:00
|
|
|
|
#region other entities
|
2019-10-11 06:15:20 +00:00
|
|
|
|
|
2024-10-23 02:42:35 +00:00
|
|
|
|
public CoreBasicItem CoreBasicItem { get; set; }
|
|
|
|
|
public TunModeItem TunModeItem { get; set; }
|
|
|
|
|
public KcpItem KcpItem { get; set; }
|
|
|
|
|
public GrpcItem GrpcItem { get; set; }
|
|
|
|
|
public RoutingBasicItem RoutingBasicItem { get; set; }
|
|
|
|
|
public GUIItem GuiItem { get; set; }
|
|
|
|
|
public MsgUIItem MsgUIItem { get; set; }
|
|
|
|
|
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; }
|
|
|
|
|
public SystemProxyItem SystemProxyItem { get; set; }
|
|
|
|
|
public WebDavItem WebDavItem { get; set; }
|
2024-11-04 06:15:59 +00:00
|
|
|
|
public CheckUpdateItem CheckUpdateItem { get; set; }
|
2024-10-23 02:42:35 +00:00
|
|
|
|
public List<InItem> Inbound { get; set; }
|
|
|
|
|
public List<KeyEventItem> GlobalHotkeys { get; set; }
|
|
|
|
|
public List<CoreTypeItem> CoreTypeItem { get; set; }
|
2019-11-25 05:22:35 +00:00
|
|
|
|
|
2023-04-14 12:49:36 +00:00
|
|
|
|
#endregion other entities
|
2022-03-18 10:52:06 +00:00
|
|
|
|
}
|
2023-04-14 12:49:36 +00:00
|
|
|
|
}
|