Rename Manager

This commit is contained in:
2dust
2025-08-17 17:31:55 +08:00
parent 2060ac18fd
commit d5c50ef27c
74 changed files with 383 additions and 383 deletions
@@ -73,12 +73,12 @@ public class CoreConfigClashService
}
//mixed-port
fileContent["mixed-port"] = AppHandler.Instance.GetLocalPort(EInboundProtocol.socks);
fileContent["mixed-port"] = AppManager.Instance.GetLocalPort(EInboundProtocol.socks);
//log-level
fileContent["log-level"] = GetLogLevel(_config.CoreBasicItem.Loglevel);
//external-controller
fileContent["external-controller"] = $"{Global.Loopback}:{AppHandler.Instance.StatePort2}";
fileContent["external-controller"] = $"{Global.Loopback}:{AppManager.Instance.StatePort2}";
//allow-lan
if (_config.Inbound.First().AllowLANConn)
{
@@ -139,7 +139,7 @@ public class CoreConfigClashService
return ret;
}
ClashApiHandler.Instance.ProfileContent = fileContent;
ClashApiManager.Instance.ProfileContent = fileContent;
ret.Msg = string.Format(ResUI.SuccessfulConfiguration, $"{node.GetSummary()}");
ret.Success = true;
@@ -136,7 +136,7 @@ public class CoreConfigSingboxService
singboxConfig.inbounds.Clear();
singboxConfig.outbounds.RemoveAt(0);
var initPort = AppHandler.Instance.GetLocalPort(EInboundProtocol.speedtest);
var initPort = AppManager.Instance.GetLocalPort(EInboundProtocol.speedtest);
foreach (var it in selecteds)
{
@@ -148,7 +148,7 @@ public class CoreConfigSingboxService
{
continue;
}
var item = await AppHandler.Instance.GetProfileItem(it.IndexId);
var item = await AppManager.Instance.GetProfileItem(it.IndexId);
if (it.ConfigType is EConfigType.VMess or EConfigType.VLESS)
{
if (item is null || item.Id.IsNullOrEmpty() || !Utils.IsGuidByParse(item.Id))
@@ -242,7 +242,7 @@ public class CoreConfigSingboxService
singboxConfig.route.rules.Add(rule);
}
var rawDNSItem = await AppHandler.Instance.GetDNSItem(ECoreType.sing_box);
var rawDNSItem = await AppManager.Instance.GetDNSItem(ECoreType.sing_box);
if (rawDNSItem != null && rawDNSItem.Enabled == true)
{
await GenDnsDomainsCompatible(singboxConfig, rawDNSItem);
@@ -314,7 +314,7 @@ public class CoreConfigSingboxService
await GenOutbound(node, singboxConfig.outbounds.First());
}
await GenMoreOutbounds(node, singboxConfig);
var item = await AppHandler.Instance.GetDNSItem(ECoreType.sing_box);
var item = await AppManager.Instance.GetDNSItem(ECoreType.sing_box);
if (item != null && item.Enabled == true)
{
await GenDnsDomainsCompatible(singboxConfig, item);
@@ -396,7 +396,7 @@ public class CoreConfigSingboxService
{
continue;
}
var item = await AppHandler.Instance.GetProfileItem(it.IndexId);
var item = await AppManager.Instance.GetProfileItem(it.IndexId);
if (item is null)
{
continue;
@@ -583,7 +583,7 @@ public class CoreConfigSingboxService
};
singboxConfig.inbounds.Add(inbound);
inbound.listen_port = AppHandler.Instance.GetLocalPort(EInboundProtocol.socks);
inbound.listen_port = AppManager.Instance.GetLocalPort(EInboundProtocol.socks);
if (_config.Inbound.First().SecondLocalPortEnabled)
{
@@ -681,7 +681,7 @@ public class CoreConfigSingboxService
}
case EConfigType.Shadowsocks:
{
outbound.method = AppHandler.Instance.GetShadowsocksSecurities(node).Contains(node.Security) ? node.Security : Global.None;
outbound.method = AppManager.Instance.GetShadowsocksSecurities(node).Contains(node.Security) ? node.Security : Global.None;
outbound.password = node.Id;
await GenOutboundMux(node, outbound);
@@ -1007,7 +1007,7 @@ public class CoreConfigSingboxService
}
try
{
var subItem = await AppHandler.Instance.GetSubItem(node.Subid);
var subItem = await AppManager.Instance.GetSubItem(node.Subid);
if (subItem is null)
{
return 0;
@@ -1020,7 +1020,7 @@ public class CoreConfigSingboxService
var txtOutbound = EmbedUtils.GetEmbedText(Global.SingboxSampleOutbound);
//Previous proxy
var prevNode = await AppHandler.Instance.GetProfileItemViaRemarks(subItem.PrevProfile);
var prevNode = await AppManager.Instance.GetProfileItemViaRemarks(subItem.PrevProfile);
string? prevOutboundTag = null;
if (prevNode is not null
&& prevNode.ConfigType != EConfigType.Custom)
@@ -1098,7 +1098,7 @@ public class CoreConfigSingboxService
nextServer = JsonUtils.DeepCopy(nextServer);
}
var subItem = await AppHandler.Instance.GetSubItem(node.Subid);
var subItem = await AppManager.Instance.GetSubItem(node.Subid);
// current proxy
currentServer.tag = $"{Global.ProxyTag}-{index}";
@@ -1112,7 +1112,7 @@ public class CoreConfigSingboxService
}
else
{
var prevNode = await AppHandler.Instance.GetProfileItemViaRemarks(subItem.PrevProfile);
var prevNode = await AppManager.Instance.GetProfileItemViaRemarks(subItem.PrevProfile);
if (prevNode is not null
&& prevNode.ConfigType != EConfigType.Custom)
{
@@ -1219,7 +1219,7 @@ public class CoreConfigSingboxService
}
// Next proxy
var nextNode = await AppHandler.Instance.GetProfileItemViaRemarks(subItem.NextProfile);
var nextNode = await AppManager.Instance.GetProfileItemViaRemarks(subItem.NextProfile);
if (nextNode is not null
&& nextNode.ConfigType != EConfigType.Custom)
{
@@ -1248,7 +1248,7 @@ public class CoreConfigSingboxService
var defaultDomainResolverTag = Global.SingboxOutboundResolverTag;
var directDNSStrategy = item.SingboxStrategy4Direct.IsNullOrEmpty() ? Global.SingboxDomainStrategy4Out.FirstOrDefault() : item.SingboxStrategy4Direct;
var rawDNSItem = await AppHandler.Instance.GetDNSItem(ECoreType.sing_box);
var rawDNSItem = await AppManager.Instance.GetDNSItem(ECoreType.sing_box);
if (rawDNSItem != null && rawDNSItem.Enabled == true)
{
defaultDomainResolverTag = Global.SingboxFinalResolverTag;
@@ -1372,7 +1372,7 @@ public class CoreConfigSingboxService
var dnsExeSet = new HashSet<string>(StringComparer.OrdinalIgnoreCase);
var directExeSet = new HashSet<string>(StringComparer.OrdinalIgnoreCase);
var coreInfoResult = CoreInfoHandler.Instance.GetCoreInfo();
var coreInfoResult = CoreInfoManager.Instance.GetCoreInfo();
foreach (var coreConfig in coreInfoResult)
{
@@ -1572,7 +1572,7 @@ public class CoreConfigSingboxService
return outboundTag;
}
var node = await AppHandler.Instance.GetProfileItemViaRemarks(outboundTag);
var node = await AppManager.Instance.GetProfileItemViaRemarks(outboundTag);
if (node == null
|| node.ConfigType == EConfigType.Custom)
{
@@ -1603,7 +1603,7 @@ public class CoreConfigSingboxService
{
try
{
var item = await AppHandler.Instance.GetDNSItem(ECoreType.sing_box);
var item = await AppManager.Instance.GetDNSItem(ECoreType.sing_box);
if (item != null && item.Enabled == true)
{
return await GenDnsCompatible(singboxConfig);
@@ -1890,7 +1890,7 @@ public class CoreConfigSingboxService
{
try
{
var item = await AppHandler.Instance.GetDNSItem(ECoreType.sing_box);
var item = await AppManager.Instance.GetDNSItem(ECoreType.sing_box);
var strDNS = string.Empty;
if (_config.TunModeItem.EnableTun)
{
@@ -2084,7 +2084,7 @@ public class CoreConfigSingboxService
singboxConfig.experimental ??= new Experimental4Sbox();
singboxConfig.experimental.clash_api = new Clash_Api4Sbox()
{
external_controller = $"{Global.Loopback}:{AppHandler.Instance.StatePort2}",
external_controller = $"{Global.Loopback}:{AppManager.Instance.StatePort2}",
};
}
@@ -2219,7 +2219,7 @@ public class CoreConfigSingboxService
private async Task<string> ApplyFullConfigTemplate(SingboxConfig singboxConfig)
{
var fullConfigTemplate = await AppHandler.Instance.GetFullConfigTemplateItem(ECoreType.sing_box);
var fullConfigTemplate = await AppManager.Instance.GetFullConfigTemplateItem(ECoreType.sing_box);
if (fullConfigTemplate == null || !fullConfigTemplate.Enabled)
{
return JsonUtils.Serialize(singboxConfig);
@@ -130,7 +130,7 @@ public class CoreConfigV2rayService
{
continue;
}
var item = await AppHandler.Instance.GetProfileItem(it.IndexId);
var item = await AppManager.Instance.GetProfileItem(it.IndexId);
if (item is null)
{
continue;
@@ -254,7 +254,7 @@ public class CoreConfigV2rayService
v2rayConfig.outbounds.Clear();
v2rayConfig.routing.rules.Clear();
var initPort = AppHandler.Instance.GetLocalPort(EInboundProtocol.speedtest);
var initPort = AppManager.Instance.GetLocalPort(EInboundProtocol.speedtest);
foreach (var it in selecteds)
{
@@ -266,7 +266,7 @@ public class CoreConfigV2rayService
{
continue;
}
var item = await AppHandler.Instance.GetProfileItem(it.IndexId);
var item = await AppManager.Instance.GetProfileItem(it.IndexId);
if (it.ConfigType is EConfigType.VMess or EConfigType.VLESS)
{
if (item is null || item.Id.IsNullOrEmpty() || !Utils.IsGuidByParse(item.Id))
@@ -638,7 +638,7 @@ public class CoreConfigV2rayService
return outboundTag;
}
var node = await AppHandler.Instance.GetProfileItemViaRemarks(outboundTag);
var node = await AppManager.Instance.GetProfileItemViaRemarks(outboundTag);
if (node == null
|| node.ConfigType == EConfigType.Custom
|| node.ConfigType == EConfigType.Hysteria2
@@ -722,7 +722,7 @@ public class CoreConfigV2rayService
serversItem.address = node.Address;
serversItem.port = node.Port;
serversItem.password = node.Id;
serversItem.method = AppHandler.Instance.GetShadowsocksSecurities(node).Contains(node.Security) ? node.Security : "none";
serversItem.method = AppManager.Instance.GetShadowsocksSecurities(node).Contains(node.Security) ? node.Security : "none";
serversItem.ota = false;
serversItem.level = 1;
@@ -1139,7 +1139,7 @@ public class CoreConfigV2rayService
{
try
{
var item = await AppHandler.Instance.GetDNSItem(ECoreType.Xray);
var item = await AppManager.Instance.GetDNSItem(ECoreType.Xray);
if (item != null && item.Enabled == true)
{
var result = await GenDnsCompatible(node, v2rayConfig);
@@ -1310,12 +1310,12 @@ public class CoreConfigV2rayService
if (node?.Subid is not null)
{
var subItem = await AppHandler.Instance.GetSubItem(node.Subid);
var subItem = await AppManager.Instance.GetSubItem(node.Subid);
if (subItem is not null)
{
foreach (var profile in new[] { subItem.PrevProfile, subItem.NextProfile })
{
var profileNode = await AppHandler.Instance.GetProfileItemViaRemarks(profile);
var profileNode = await AppManager.Instance.GetProfileItemViaRemarks(profile);
if (profileNode is not null &&
profileNode.ConfigType is not (EConfigType.Custom or EConfigType.Hysteria2 or EConfigType.TUIC or EConfigType.Anytls) &&
Utils.IsDomain(profileNode.Address))
@@ -1426,7 +1426,7 @@ public class CoreConfigV2rayService
{
try
{
var item = await AppHandler.Instance.GetDNSItem(ECoreType.Xray);
var item = await AppManager.Instance.GetDNSItem(ECoreType.Xray);
var normalDNS = item?.NormalDNS;
var domainStrategy4Freedom = item?.DomainStrategy4Freedom;
if (normalDNS.IsNullOrEmpty())
@@ -1514,11 +1514,11 @@ public class CoreConfigV2rayService
{
domainList.Add(node.Address);
}
var subItem = await AppHandler.Instance.GetSubItem(node.Subid);
var subItem = await AppManager.Instance.GetSubItem(node.Subid);
if (subItem is not null)
{
// Previous proxy
var prevNode = await AppHandler.Instance.GetProfileItemViaRemarks(subItem.PrevProfile);
var prevNode = await AppManager.Instance.GetProfileItemViaRemarks(subItem.PrevProfile);
if (prevNode is not null
&& prevNode.ConfigType != EConfigType.Custom
&& prevNode.ConfigType != EConfigType.Hysteria2
@@ -1529,7 +1529,7 @@ public class CoreConfigV2rayService
}
// Next proxy
var nextNode = await AppHandler.Instance.GetProfileItemViaRemarks(subItem.NextProfile);
var nextNode = await AppManager.Instance.GetProfileItemViaRemarks(subItem.NextProfile);
if (nextNode is not null
&& nextNode.ConfigType != EConfigType.Custom
&& nextNode.ConfigType != EConfigType.Hysteria2
@@ -1578,7 +1578,7 @@ public class CoreConfigV2rayService
Inboundsettings4Ray apiInboundSettings = new();
apiInbound.tag = tag;
apiInbound.listen = Global.Loopback;
apiInbound.port = AppHandler.Instance.StatePort;
apiInbound.port = AppManager.Instance.StatePort;
apiInbound.protocol = Global.InboundAPIProtocol;
apiInboundSettings.address = Global.Loopback;
apiInbound.settings = apiInboundSettings;
@@ -1635,7 +1635,7 @@ public class CoreConfigV2rayService
}
try
{
var subItem = await AppHandler.Instance.GetSubItem(node.Subid);
var subItem = await AppManager.Instance.GetSubItem(node.Subid);
if (subItem is null)
{
return 0;
@@ -1646,7 +1646,7 @@ public class CoreConfigV2rayService
var txtOutbound = EmbedUtils.GetEmbedText(Global.V2raySampleOutbound);
//Previous proxy
var prevNode = await AppHandler.Instance.GetProfileItemViaRemarks(subItem.PrevProfile);
var prevNode = await AppManager.Instance.GetProfileItemViaRemarks(subItem.PrevProfile);
string? prevOutboundTag = null;
if (prevNode is not null
&& prevNode.ConfigType != EConfigType.Custom
@@ -1709,7 +1709,7 @@ public class CoreConfigV2rayService
nextOutbound = JsonUtils.DeepCopy(nextOutbound);
}
var subItem = await AppHandler.Instance.GetSubItem(node.Subid);
var subItem = await AppManager.Instance.GetSubItem(node.Subid);
// current proxy
await GenOutbound(node, currentOutbound);
@@ -1723,7 +1723,7 @@ public class CoreConfigV2rayService
}
else
{
var prevNode = await AppHandler.Instance.GetProfileItemViaRemarks(subItem.PrevProfile);
var prevNode = await AppManager.Instance.GetProfileItemViaRemarks(subItem.PrevProfile);
if (prevNode is not null
&& prevNode.ConfigType != EConfigType.Custom
&& prevNode.ConfigType != EConfigType.Hysteria2
@@ -1793,7 +1793,7 @@ public class CoreConfigV2rayService
}
// Next proxy
var nextNode = await AppHandler.Instance.GetProfileItemViaRemarks(subItem.NextProfile);
var nextNode = await AppManager.Instance.GetProfileItemViaRemarks(subItem.NextProfile);
if (nextNode is not null
&& nextNode.ConfigType != EConfigType.Custom
&& nextNode.ConfigType != EConfigType.Hysteria2
@@ -1829,7 +1829,7 @@ public class CoreConfigV2rayService
var observatory = new Observatory4Ray
{
subjectSelector = [Global.ProxyTag],
probeUrl = AppHandler.Instance.Config.SpeedTestItem.SpeedPingTestUrl,
probeUrl = AppManager.Instance.Config.SpeedTestItem.SpeedPingTestUrl,
probeInterval = "3m",
enableConcurrency = true,
};
@@ -1842,7 +1842,7 @@ public class CoreConfigV2rayService
subjectSelector = [Global.ProxyTag],
pingConfig = new()
{
destination = AppHandler.Instance.Config.SpeedTestItem.SpeedPingTestUrl,
destination = AppManager.Instance.Config.SpeedTestItem.SpeedPingTestUrl,
interval = "5m",
timeout = "30s",
sampling = 2,
@@ -1870,7 +1870,7 @@ public class CoreConfigV2rayService
private async Task<string> ApplyFullConfigTemplate(V2rayConfig v2rayConfig, bool handleBalancerAndRules = false)
{
var fullConfigTemplate = await AppHandler.Instance.GetFullConfigTemplateItem(ECoreType.Xray);
var fullConfigTemplate = await AppManager.Instance.GetFullConfigTemplateItem(ECoreType.Xray);
if (fullConfigTemplate == null || !fullConfigTemplate.Enabled || fullConfigTemplate.Config.IsNullOrEmpty())
{
return JsonUtils.Serialize(v2rayConfig);
@@ -20,7 +20,7 @@ public class DownloadService
{
try
{
SetSecurityProtocol(AppHandler.Instance.Config.GuiItem.EnableSecurityProtocolTls13);
SetSecurityProtocol(AppManager.Instance.Config.GuiItem.EnableSecurityProtocolTls13);
var progress = new Progress<string>();
progress.ProgressChanged += (sender, value) => updateFunc?.Invoke(false, $"{value}");
@@ -45,7 +45,7 @@ public class DownloadService
{
try
{
SetSecurityProtocol(AppHandler.Instance.Config.GuiItem.EnableSecurityProtocolTls13);
SetSecurityProtocol(AppManager.Instance.Config.GuiItem.EnableSecurityProtocolTls13);
UpdateCompleted?.Invoke(this, new RetResult(false, $"{ResUI.Downloading} {url}"));
var progress = new Progress<double>();
@@ -72,7 +72,7 @@ public class DownloadService
public async Task<string?> UrlRedirectAsync(string url, bool blProxy)
{
SetSecurityProtocol(AppHandler.Instance.Config.GuiItem.EnableSecurityProtocolTls13);
SetSecurityProtocol(AppManager.Instance.Config.GuiItem.EnableSecurityProtocolTls13);
var webRequestHandler = new SocketsHttpHandler
{
AllowAutoRedirect = false,
@@ -142,7 +142,7 @@ public class DownloadService
{
try
{
SetSecurityProtocol(AppHandler.Instance.Config.GuiItem.EnableSecurityProtocolTls13);
SetSecurityProtocol(AppManager.Instance.Config.GuiItem.EnableSecurityProtocolTls13);
var webProxy = await GetWebProxy(blProxy);
var client = new HttpClient(new SocketsHttpHandler()
{
@@ -187,7 +187,7 @@ public class DownloadService
{
try
{
SetSecurityProtocol(AppHandler.Instance.Config.GuiItem.EnableSecurityProtocolTls13);
SetSecurityProtocol(AppManager.Instance.Config.GuiItem.EnableSecurityProtocolTls13);
var webProxy = await GetWebProxy(blProxy);
@@ -216,7 +216,7 @@ public class DownloadService
try
{
webProxy ??= await GetWebProxy(true);
var config = AppHandler.Instance.Config;
var config = AppManager.Instance.Config;
for (var i = 0; i < 2; i++)
{
@@ -273,7 +273,7 @@ public class DownloadService
{
return null;
}
var port = AppHandler.Instance.GetLocalPort(EInboundProtocol.socks);
var port = AppManager.Instance.GetLocalPort(EInboundProtocol.socks);
if (await SocketCheck(Global.Loopback, port) == false)
{
return null;
+11 -11
View File
@@ -23,7 +23,7 @@ public class SpeedtestService
Task.Run(async () =>
{
await RunAsync(actionType, selecteds);
await ProfileExHandler.Instance.SaveTo();
await ProfileExManager.Instance.SaveTo();
UpdateFunc("", ResUI.SpeedtestingCompleted);
});
}
@@ -98,18 +98,18 @@ public class SpeedtestService
case ESpeedActionType.Tcping:
case ESpeedActionType.Realping:
UpdateFunc(it.IndexId, ResUI.Speedtesting, "");
ProfileExHandler.Instance.SetTestDelay(it.IndexId, 0);
ProfileExManager.Instance.SetTestDelay(it.IndexId, 0);
break;
case ESpeedActionType.Speedtest:
UpdateFunc(it.IndexId, "", ResUI.SpeedtestingWait);
ProfileExHandler.Instance.SetTestSpeed(it.IndexId, 0);
ProfileExManager.Instance.SetTestSpeed(it.IndexId, 0);
break;
case ESpeedActionType.Mixedtest:
UpdateFunc(it.IndexId, ResUI.Speedtesting, ResUI.SpeedtestingWait);
ProfileExHandler.Instance.SetTestDelay(it.IndexId, 0);
ProfileExHandler.Instance.SetTestSpeed(it.IndexId, 0);
ProfileExManager.Instance.SetTestDelay(it.IndexId, 0);
ProfileExManager.Instance.SetTestSpeed(it.IndexId, 0);
break;
}
}
@@ -132,7 +132,7 @@ public class SpeedtestService
{
var responseTime = await GetTcpingTime(it.Address, it.Port);
ProfileExHandler.Instance.SetTestDelay(it.IndexId, responseTime);
ProfileExManager.Instance.SetTestDelay(it.IndexId, responseTime);
UpdateFunc(it.IndexId, responseTime.ToString());
}
catch (Exception ex)
@@ -191,7 +191,7 @@ public class SpeedtestService
var pid = -1;
try
{
pid = await CoreHandler.Instance.LoadCoreConfigSpeedtest(selecteds);
pid = await CoreManager.Instance.LoadCoreConfigSpeedtest(selecteds);
if (pid < 0)
{
return false;
@@ -255,7 +255,7 @@ public class SpeedtestService
var pid = -1;
try
{
pid = await CoreHandler.Instance.LoadCoreConfigSpeedtest(it);
pid = await CoreManager.Instance.LoadCoreConfigSpeedtest(it);
if (pid < 0)
{
UpdateFunc(it.IndexId, "", ResUI.FailedToRunCore);
@@ -299,7 +299,7 @@ public class SpeedtestService
var webProxy = new WebProxy($"socks5://{Global.Loopback}:{it.Port}");
var responseTime = await downloadHandle.GetRealPingTime(_config.SpeedTestItem.SpeedPingTestUrl, webProxy, 10);
ProfileExHandler.Instance.SetTestDelay(it.IndexId, responseTime);
ProfileExManager.Instance.SetTestDelay(it.IndexId, responseTime);
UpdateFunc(it.IndexId, responseTime.ToString());
return responseTime;
}
@@ -316,7 +316,7 @@ public class SpeedtestService
decimal.TryParse(msg, out var dec);
if (dec > 0)
{
ProfileExHandler.Instance.SetTestSpeed(it.IndexId, dec);
ProfileExManager.Instance.SetTestSpeed(it.IndexId, dec);
}
UpdateFunc(it.IndexId, "", msg);
});
@@ -378,7 +378,7 @@ public class SpeedtestService
_updateFunc?.Invoke(new() { IndexId = indexId, Delay = delay, Speed = speed });
if (indexId.IsNotEmpty() && speed.IsNotEmpty())
{
ProfileExHandler.Instance.SetTestMessage(indexId, speed);
ProfileExManager.Instance.SetTestMessage(indexId, speed);
}
}
}
@@ -9,7 +9,7 @@ public class StatisticsSingboxService
private bool _exitFlag;
private ClientWebSocket? webSocket;
private Action<ServerSpeedItem>? _updateFunc;
private string Url => $"ws://{Global.Loopback}:{AppHandler.Instance.StatePort2}/traffic";
private string Url => $"ws://{Global.Loopback}:{AppManager.Instance.StatePort2}/traffic";
private static readonly string _tag = "StatisticsSingboxService";
public StatisticsSingboxService(Config config, Action<ServerSpeedItem> updateFunc)
@@ -7,7 +7,7 @@ public class StatisticsXrayService
private readonly Config _config;
private bool _exitFlag;
private Action<ServerSpeedItem>? _updateFunc;
private string Url => $"{Global.HttpProtocol}{Global.Loopback}:{AppHandler.Instance.StatePort}/debug/vars";
private string Url => $"{Global.HttpProtocol}{Global.Loopback}:{AppManager.Instance.StatePort}/debug/vars";
public StatisticsXrayService(Config config, Action<ServerSpeedItem> updateFunc)
{
+4 -4
View File
@@ -135,7 +135,7 @@ public class UpdateService
private async Task<RetResult> GetRemoteVersion(DownloadService downloadHandle, ECoreType type, bool preRelease)
{
var coreInfo = CoreInfoHandler.Instance.GetCoreInfo(type);
var coreInfo = CoreInfoManager.Instance.GetCoreInfo(type);
var tagName = string.Empty;
if (preRelease)
{
@@ -169,7 +169,7 @@ public class UpdateService
{
try
{
var coreInfo = CoreInfoHandler.Instance.GetCoreInfo(type);
var coreInfo = CoreInfoManager.Instance.GetCoreInfo(type);
string filePath = string.Empty;
foreach (var name in coreInfo.CoreExes)
{
@@ -221,7 +221,7 @@ public class UpdateService
{
try
{
var coreInfo = CoreInfoHandler.Instance.GetCoreInfo(type);
var coreInfo = CoreInfoManager.Instance.GetCoreInfo(type);
var coreUrl = await GetUrlFromCore(coreInfo) ?? string.Empty;
SemanticVersion curVersion;
string message;
@@ -379,7 +379,7 @@ public class UpdateService
var geoSiteFiles = new List<string>();
//Collect used files list
var routingItems = await AppHandler.Instance.RoutingItems();
var routingItems = await AppManager.Instance.RoutingItems();
foreach (var routing in routingItems)
{
var rules = JsonUtils.Deserialize<List<RulesItem>>(routing.RuleSet);