Skip to content

Commit 75b399b

Browse files
authored
Updates profile remark based on core type (#7076)
1 parent 24ccfb8 commit 75b399b

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

v2rayN/ServiceLib/Handler/ConfigHandler.cs

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,14 +1023,21 @@ public static async Task<RetResult> AddCustomServer4Multiple(Config config, List
10231023

10241024
var profileItem = await AppHandler.Instance.GetProfileItem(indexId) ?? new();
10251025
profileItem.IndexId = indexId;
1026-
profileItem.Remarks = multipleLoad switch
1026+
if (coreType == ECoreType.Xray)
10271027
{
1028-
EMultipleLoad.Random => ResUI.menuSetDefaultMultipleServerXrayRandom,
1029-
EMultipleLoad.RoundRobin => ResUI.menuSetDefaultMultipleServerXrayRoundRobin,
1030-
EMultipleLoad.LeastPing => ResUI.menuSetDefaultMultipleServerXrayLeastPing,
1031-
EMultipleLoad.LeastLoad => ResUI.menuSetDefaultMultipleServerXrayLeastLoad,
1032-
_ => ResUI.menuSetDefaultMultipleServerXrayRoundRobin,
1033-
};
1028+
profileItem.Remarks = multipleLoad switch
1029+
{
1030+
EMultipleLoad.Random => ResUI.menuSetDefaultMultipleServerXrayRandom,
1031+
EMultipleLoad.RoundRobin => ResUI.menuSetDefaultMultipleServerXrayRoundRobin,
1032+
EMultipleLoad.LeastPing => ResUI.menuSetDefaultMultipleServerXrayLeastPing,
1033+
EMultipleLoad.LeastLoad => ResUI.menuSetDefaultMultipleServerXrayLeastLoad,
1034+
_ => ResUI.menuSetDefaultMultipleServerXrayRoundRobin,
1035+
};
1036+
}
1037+
else if (coreType == ECoreType.sing_box)
1038+
{
1039+
profileItem.Remarks = ResUI.menuSetDefaultMultipleServerSingBoxLeastPing;
1040+
}
10341041
profileItem.Address = Global.CoreMultipleLoadConfigFileName;
10351042
profileItem.ConfigType = EConfigType.Custom;
10361043
profileItem.CoreType = coreType;

0 commit comments

Comments
 (0)