From 7870ae89cf1f089c0bb7f448e5213bf719cce032 Mon Sep 17 00:00:00 2001 From: DHR60 <192860629+DHR60@users.noreply.github.com> Date: Mon, 31 Aug 2026 10:00:44 +0000 Subject: [PATCH] Move "GLOBAL" to the end (#10064) --- .../ViewModels/ClashProxiesViewModel.cs | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/v2rayN/ServiceLib/ViewModels/ClashProxiesViewModel.cs b/v2rayN/ServiceLib/ViewModels/ClashProxiesViewModel.cs index 7d6b009f..e2716dd8 100644 --- a/v2rayN/ServiceLib/ViewModels/ClashProxiesViewModel.cs +++ b/v2rayN/ServiceLib/ViewModels/ClashProxiesViewModel.cs @@ -202,7 +202,11 @@ public partial class ClashProxiesViewModel : MyReactiveObject //from api foreach (var kv in _proxies) { - if (!Global.allowSelectType.Contains(kv.Value.type.ToLower())) + if (!Global.allowSelectType.Contains(kv.Value.type?.ToLower())) + { + continue; + } + if (kv.Key == "GLOBAL") { continue; } @@ -215,7 +219,16 @@ public partial class ClashProxiesViewModel : MyReactiveObject { Now = kv.Value.now, Name = kv.Key, - Type = kv.Value.type + Type = kv.Value.type, + }); + } + if (_proxies.TryGetValue("GLOBAL", out var globalProxy)) + { + lstProxyGroups.Add(new ClashProxyModel() + { + Now = globalProxy.now, + Name = "GLOBAL", + Type = globalProxy.type, }); }