The first letter of the guiconfig attribute must be capitalized.
This commit is contained in:
@@ -13,6 +13,6 @@
|
||||
|
||||
public string? delayName { get; set; }
|
||||
|
||||
public bool isActive { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -62,10 +62,10 @@
|
||||
[Serializable]
|
||||
public class GrpcItem
|
||||
{
|
||||
public int IdleTimeout { get; set; }
|
||||
public int HealthCheckTimeout { get; set; }
|
||||
public bool PermitWithoutStream { get; set; }
|
||||
public int InitialWindowsSize { get; set; }
|
||||
public int? IdleTimeout { get; set; }
|
||||
public int? HealthCheckTimeout { get; set; }
|
||||
public bool? PermitWithoutStream { get; set; }
|
||||
public int? InitialWindowsSize { get; set; }
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
|
||||
@@ -6,15 +6,15 @@ namespace ServiceLib.Models
|
||||
public class DNSItem
|
||||
{
|
||||
[PrimaryKey]
|
||||
public string id { get; set; }
|
||||
public string Id { get; set; }
|
||||
|
||||
public string remarks { get; set; }
|
||||
public bool enabled { get; set; } = true;
|
||||
public ECoreType coreType { get; set; }
|
||||
public bool useSystemHosts { get; set; }
|
||||
public string? normalDNS { get; set; }
|
||||
public string? tunDNS { get; set; }
|
||||
public string? domainStrategy4Freedom { get; set; }
|
||||
public string? domainDNSAddress { get; set; }
|
||||
public string Remarks { get; set; }
|
||||
public bool Enabled { get; set; } = true;
|
||||
public ECoreType CoreType { get; set; }
|
||||
public bool UseSystemHosts { get; set; }
|
||||
public string? NormalDNS { get; set; }
|
||||
public string? TunDNS { get; set; }
|
||||
public string? DomainStrategy4Freedom { get; set; }
|
||||
public string? DomainDNSAddress { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -6,10 +6,10 @@ namespace ServiceLib.Models
|
||||
public class ProfileExItem
|
||||
{
|
||||
[PrimaryKey]
|
||||
public string indexId { get; set; }
|
||||
public string IndexId { get; set; }
|
||||
|
||||
public int delay { get; set; }
|
||||
public decimal speed { get; set; }
|
||||
public int sort { get; set; }
|
||||
public int Delay { get; set; }
|
||||
public decimal Speed { get; set; }
|
||||
public int Sort { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -7,31 +7,31 @@ namespace ServiceLib.Models
|
||||
{
|
||||
public ProfileItem()
|
||||
{
|
||||
indexId = string.Empty;
|
||||
configType = EConfigType.VMess;
|
||||
configVersion = 2;
|
||||
address = string.Empty;
|
||||
port = 0;
|
||||
id = string.Empty;
|
||||
alterId = 0;
|
||||
security = string.Empty;
|
||||
network = string.Empty;
|
||||
remarks = string.Empty;
|
||||
headerType = string.Empty;
|
||||
requestHost = string.Empty;
|
||||
path = string.Empty;
|
||||
streamSecurity = string.Empty;
|
||||
allowInsecure = string.Empty;
|
||||
subid = string.Empty;
|
||||
flow = string.Empty;
|
||||
IndexId = string.Empty;
|
||||
ConfigType = EConfigType.VMess;
|
||||
ConfigVersion = 2;
|
||||
Address = string.Empty;
|
||||
Port = 0;
|
||||
Id = string.Empty;
|
||||
AlterId = 0;
|
||||
Security = string.Empty;
|
||||
Network = string.Empty;
|
||||
Remarks = string.Empty;
|
||||
HeaderType = string.Empty;
|
||||
RequestHost = string.Empty;
|
||||
Path = string.Empty;
|
||||
StreamSecurity = string.Empty;
|
||||
AllowInsecure = string.Empty;
|
||||
Subid = string.Empty;
|
||||
Flow = string.Empty;
|
||||
}
|
||||
|
||||
#region function
|
||||
|
||||
public string GetSummary()
|
||||
{
|
||||
string summary = string.Format("[{0}] ", (configType).ToString());
|
||||
string[] arrAddr = address.Split('.');
|
||||
string summary = string.Format("[{0}] ", (ConfigType).ToString());
|
||||
string[] arrAddr = Address.Split('.');
|
||||
string addr;
|
||||
if (arrAddr.Length > 2)
|
||||
{
|
||||
@@ -43,16 +43,16 @@ namespace ServiceLib.Models
|
||||
}
|
||||
else
|
||||
{
|
||||
addr = address;
|
||||
addr = Address;
|
||||
}
|
||||
switch (configType)
|
||||
switch (ConfigType)
|
||||
{
|
||||
case EConfigType.Custom:
|
||||
summary += string.Format("[{1}]{0}", remarks, coreType.ToString());
|
||||
summary += string.Format("[{1}]{0}", Remarks, CoreType.ToString());
|
||||
break;
|
||||
|
||||
default:
|
||||
summary += string.Format("{0}({1}:{2})", remarks, addr, port);
|
||||
summary += string.Format("{0}({1}:{2})", Remarks, addr, Port);
|
||||
break;
|
||||
}
|
||||
return summary;
|
||||
@@ -60,131 +60,55 @@ namespace ServiceLib.Models
|
||||
|
||||
public List<string>? GetAlpn()
|
||||
{
|
||||
if (Utils.IsNullOrEmpty(alpn))
|
||||
if (Utils.IsNullOrEmpty(Alpn))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
else
|
||||
{
|
||||
return Utils.String2List(alpn);
|
||||
return Utils.String2List(Alpn);
|
||||
}
|
||||
}
|
||||
|
||||
public string GetNetwork()
|
||||
{
|
||||
if (Utils.IsNullOrEmpty(network) || !Global.Networks.Contains(network))
|
||||
if (Utils.IsNullOrEmpty(Network) || !Global.Networks.Contains(Network))
|
||||
{
|
||||
return Global.DefaultNetwork;
|
||||
}
|
||||
return network.TrimEx();
|
||||
return Network.TrimEx();
|
||||
}
|
||||
|
||||
#endregion function
|
||||
|
||||
[PrimaryKey]
|
||||
public string indexId { get; set; }
|
||||
public string IndexId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// config type(1=normal,2=custom)
|
||||
/// </summary>
|
||||
public EConfigType configType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 版本(现在=2)
|
||||
/// </summary>
|
||||
public int configVersion { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 远程服务器地址
|
||||
/// </summary>
|
||||
public string address { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 远程服务器端口
|
||||
/// </summary>
|
||||
public int port { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 远程服务器ID
|
||||
/// </summary>
|
||||
public string id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 远程服务器额外ID
|
||||
/// </summary>
|
||||
public int alterId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 本地安全策略
|
||||
/// </summary>
|
||||
public string security { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// tcp,kcp,ws,h2,quic
|
||||
/// </summary>
|
||||
public string network { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string remarks { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 伪装类型
|
||||
/// </summary>
|
||||
public string headerType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 伪装的域名
|
||||
/// </summary>
|
||||
public string requestHost { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// ws h2 path
|
||||
/// </summary>
|
||||
public string path { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 传输层安全
|
||||
/// </summary>
|
||||
public string streamSecurity { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否允许不安全连接(用于客户端)
|
||||
/// </summary>
|
||||
public string allowInsecure { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// SubItem id
|
||||
/// </summary>
|
||||
public string subid { get; set; }
|
||||
|
||||
public bool isSub { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// VLESS flow
|
||||
/// </summary>
|
||||
public string flow { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// tls sni
|
||||
/// </summary>
|
||||
public string sni { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// tls alpn
|
||||
/// </summary>
|
||||
public string alpn { get; set; } = string.Empty;
|
||||
|
||||
public ECoreType? coreType { get; set; }
|
||||
|
||||
public int? preSocksPort { get; set; }
|
||||
|
||||
public string fingerprint { get; set; }
|
||||
|
||||
public bool displayLog { get; set; } = true;
|
||||
public string publicKey { get; set; }
|
||||
public string shortId { get; set; }
|
||||
public string spiderX { get; set; }
|
||||
public EConfigType ConfigType { get; set; }
|
||||
public int ConfigVersion { get; set; }
|
||||
public string Address { get; set; }
|
||||
public int Port { get; set; }
|
||||
public string Id { get; set; }
|
||||
public int AlterId { get; set; }
|
||||
public string Security { get; set; }
|
||||
public string Network { get; set; }
|
||||
public string Remarks { get; set; }
|
||||
public string HeaderType { get; set; }
|
||||
public string RequestHost { get; set; }
|
||||
public string Path { get; set; }
|
||||
public string StreamSecurity { get; set; }
|
||||
public string AllowInsecure { get; set; }
|
||||
public string Subid { get; set; }
|
||||
public bool IsSub { get; set; } = true;
|
||||
public string Flow { get; set; }
|
||||
public string Sni { get; set; }
|
||||
public string Alpn { get; set; } = string.Empty;
|
||||
public ECoreType? CoreType { get; set; }
|
||||
public int? PreSocksPort { get; set; }
|
||||
public string Fingerprint { get; set; }
|
||||
public bool DisplayLog { get; set; } = true;
|
||||
public string PublicKey { get; set; }
|
||||
public string ShortId { get; set; }
|
||||
public string SpiderX { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -3,16 +3,16 @@
|
||||
[Serializable]
|
||||
public class ProfileItemModel : ProfileItem
|
||||
{
|
||||
public bool isActive { get; set; }
|
||||
public string subRemarks { get; set; }
|
||||
public int delay { get; set; }
|
||||
public decimal speed { get; set; }
|
||||
public int sort { get; set; }
|
||||
public string delayVal { get; set; }
|
||||
public string speedVal { get; set; }
|
||||
public string todayUp { get; set; }
|
||||
public string todayDown { get; set; }
|
||||
public string totalUp { get; set; }
|
||||
public string totalDown { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
public string SubRemarks { get; set; }
|
||||
public int Delay { get; set; }
|
||||
public decimal Speed { get; set; }
|
||||
public int Sort { get; set; }
|
||||
public string DelayVal { get; set; }
|
||||
public string SpeedVal { get; set; }
|
||||
public string TodayUp { get; set; }
|
||||
public string TodayDown { get; set; }
|
||||
public string TotalUp { get; set; }
|
||||
public string TotalDown { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -6,18 +6,17 @@ namespace ServiceLib.Models
|
||||
public class RoutingItem
|
||||
{
|
||||
[PrimaryKey]
|
||||
public string id { get; set; }
|
||||
|
||||
public string remarks { get; set; }
|
||||
public string url { get; set; }
|
||||
public string ruleSet { get; set; }
|
||||
public int ruleNum { get; set; }
|
||||
public bool enabled { get; set; } = true;
|
||||
public bool locked { get; set; }
|
||||
public string customIcon { get; set; }
|
||||
public string customRulesetPath4Singbox { get; set; }
|
||||
public string domainStrategy { get; set; }
|
||||
public string domainStrategy4Singbox { get; set; }
|
||||
public int sort { get; set; }
|
||||
public string Id { get; set; }
|
||||
public string Remarks { get; set; }
|
||||
public string Url { get; set; }
|
||||
public string RuleSet { get; set; }
|
||||
public int RuleNum { get; set; }
|
||||
public bool Enabled { get; set; } = true;
|
||||
public bool Locked { get; set; }
|
||||
public string CustomIcon { get; set; }
|
||||
public string CustomRulesetPath4Singbox { get; set; }
|
||||
public string DomainStrategy { get; set; }
|
||||
public string DomainStrategy4Singbox { get; set; }
|
||||
public int Sort { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,6 @@
|
||||
[Serializable]
|
||||
public class RoutingItemModel : RoutingItem
|
||||
{
|
||||
public bool isActive { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,7 @@
|
||||
public List<string>? domain { get; set; }
|
||||
public List<string>? protocol { get; set; }
|
||||
public List<string>? process { get; set; }
|
||||
public bool enabled { get; set; } = true;
|
||||
public string? remarks { get; set; }
|
||||
public bool Enabled { get; set; } = true;
|
||||
public string? Remarks { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -3,9 +3,9 @@
|
||||
[Serializable]
|
||||
public class RulesItemModel : RulesItem
|
||||
{
|
||||
public string inboundTags { get; set; }
|
||||
public string ips { get; set; }
|
||||
public string domains { get; set; }
|
||||
public string protocols { get; set; }
|
||||
public string InboundTags { get; set; }
|
||||
public string Ips { get; set; }
|
||||
public string Domains { get; set; }
|
||||
public string Protocols { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -6,34 +6,16 @@ namespace ServiceLib.Models
|
||||
public class ServerStatItem
|
||||
{
|
||||
[PrimaryKey]
|
||||
public string indexId
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
public string IndexId { get; set; }
|
||||
|
||||
public long totalUp
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
public long TotalUp { get; set; }
|
||||
|
||||
public long totalDown
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
public long TotalDown { get; set; }
|
||||
|
||||
public long todayUp
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
public long TodayUp { get; set; }
|
||||
|
||||
public long todayDown
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
public long TodayDown { get; set; }
|
||||
|
||||
public long dateNow
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
public long DateNow { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -6,32 +6,32 @@ namespace ServiceLib.Models
|
||||
public class SubItem
|
||||
{
|
||||
[PrimaryKey]
|
||||
public string id { get; set; }
|
||||
public string Id { get; set; }
|
||||
|
||||
public string remarks { get; set; }
|
||||
public string Remarks { get; set; }
|
||||
|
||||
public string url { get; set; }
|
||||
public string Url { get; set; }
|
||||
|
||||
public string moreUrl { get; set; }
|
||||
public string MoreUrl { get; set; }
|
||||
|
||||
public bool enabled { get; set; } = true;
|
||||
public bool Enabled { get; set; } = true;
|
||||
|
||||
public string userAgent { get; set; } = string.Empty;
|
||||
public string UserAgent { get; set; } = string.Empty;
|
||||
|
||||
public int sort { get; set; }
|
||||
public int Sort { get; set; }
|
||||
|
||||
public string? filter { get; set; }
|
||||
public string? Filter { get; set; }
|
||||
|
||||
public int autoUpdateInterval { get; set; }
|
||||
public int AutoUpdateInterval { get; set; }
|
||||
|
||||
public long updateTime { get; set; }
|
||||
public long UpdateTime { get; set; }
|
||||
|
||||
public string? convertTarget { get; set; }
|
||||
public string? ConvertTarget { get; set; }
|
||||
|
||||
public string? prevProfile { get; set; }
|
||||
public string? PrevProfile { get; set; }
|
||||
|
||||
public string? nextProfile { get; set; }
|
||||
public string? NextProfile { get; set; }
|
||||
|
||||
public int? preSocksPort { get; set; }
|
||||
public int? PreSocksPort { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -678,10 +678,10 @@ namespace ServiceLib.Models
|
||||
public string? authority { get; set; }
|
||||
public string? serviceName { get; set; }
|
||||
public bool multiMode { get; set; }
|
||||
public int idle_timeout { get; set; }
|
||||
public int health_check_timeout { get; set; }
|
||||
public bool permit_without_stream { get; set; }
|
||||
public int initial_windows_size { get; set; }
|
||||
public int? idle_timeout { get; set; }
|
||||
public int? health_check_timeout { get; set; }
|
||||
public bool? permit_without_stream { get; set; }
|
||||
public int? initial_windows_size { get; set; }
|
||||
}
|
||||
|
||||
public class AccountsItem4Ray
|
||||
|
||||
Reference in New Issue
Block a user