From 75b399b48b91e329428612db84354e0e3a7bf5f2 Mon Sep 17 00:00:00 2001 From: DHR60 Date: Mon, 7 Apr 2025 09:58:16 +0800 Subject: [PATCH] Updates profile remark based on core type (#7076) --- v2rayN/ServiceLib/Handler/ConfigHandler.cs | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/v2rayN/ServiceLib/Handler/ConfigHandler.cs b/v2rayN/ServiceLib/Handler/ConfigHandler.cs index 03a0d9a5..81d9d2bc 100644 --- a/v2rayN/ServiceLib/Handler/ConfigHandler.cs +++ b/v2rayN/ServiceLib/Handler/ConfigHandler.cs @@ -1023,14 +1023,21 @@ public class ConfigHandler var profileItem = await AppHandler.Instance.GetProfileItem(indexId) ?? new(); profileItem.IndexId = indexId; - profileItem.Remarks = multipleLoad switch + if (coreType == ECoreType.Xray) { - EMultipleLoad.Random => ResUI.menuSetDefaultMultipleServerXrayRandom, - EMultipleLoad.RoundRobin => ResUI.menuSetDefaultMultipleServerXrayRoundRobin, - EMultipleLoad.LeastPing => ResUI.menuSetDefaultMultipleServerXrayLeastPing, - EMultipleLoad.LeastLoad => ResUI.menuSetDefaultMultipleServerXrayLeastLoad, - _ => ResUI.menuSetDefaultMultipleServerXrayRoundRobin, - }; + profileItem.Remarks = multipleLoad switch + { + EMultipleLoad.Random => ResUI.menuSetDefaultMultipleServerXrayRandom, + EMultipleLoad.RoundRobin => ResUI.menuSetDefaultMultipleServerXrayRoundRobin, + EMultipleLoad.LeastPing => ResUI.menuSetDefaultMultipleServerXrayLeastPing, + EMultipleLoad.LeastLoad => ResUI.menuSetDefaultMultipleServerXrayLeastLoad, + _ => ResUI.menuSetDefaultMultipleServerXrayRoundRobin, + }; + } + else if (coreType == ECoreType.sing_box) + { + profileItem.Remarks = ResUI.menuSetDefaultMultipleServerSingBoxLeastPing; + } profileItem.Address = Global.CoreMultipleLoadConfigFileName; profileItem.ConfigType = EConfigType.Custom; profileItem.CoreType = coreType;