add xray core leastPing support (#7023)

* add xray core leastPing support

* Refactor multi-server configuration UI logic

* Remove unused functions
This commit is contained in:
DHR60
2025-03-29 16:44:42 +08:00
committed by GitHub
parent 6ad0762731
commit e3580b05f7
17 changed files with 891 additions and 656 deletions
@@ -1,3 +1,7 @@
using DynamicData;
using ServiceLib.Enums;
using ServiceLib.Models;
namespace ServiceLib.Handler
{
/// <summary>
@@ -133,16 +137,16 @@ namespace ServiceLib.Handler
return result;
}
public static async Task<RetResult> GenerateClientMultipleLoadConfig(Config config, string fileName, List<ProfileItem> selecteds, ECoreType coreType)
public static async Task<RetResult> GenerateClientMultipleLoadConfig(Config config, string fileName, List<ProfileItem> selecteds, ECoreType coreType, EMultipleLoad multipleLoad)
{
var result = new RetResult();
if (coreType == ECoreType.sing_box)
{
result = await new CoreConfigSingboxService(config).GenerateClientMultipleLoadConfig(selecteds);
}
else if (coreType == ECoreType.Xray)
else
{
result = await new CoreConfigV2rayService(config).GenerateClientMultipleLoadConfig(selecteds);
result = await new CoreConfigV2rayService(config).GenerateClientMultipleLoadConfig(selecteds, multipleLoad);
}
if (result.Success != true)