From caa3aa49f2094f2cb12d5a5a26d35d04097f2445 Mon Sep 17 00:00:00 2001 From: riglen Date: Tue, 31 Mar 2026 18:38:45 +0800 Subject: [PATCH] rule opt --- app/services/profiles.py | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/app/services/profiles.py b/app/services/profiles.py index 22b92c2..67acc3b 100644 --- a/app/services/profiles.py +++ b/app/services/profiles.py @@ -268,14 +268,6 @@ def _build_thin_groups(client_type: str, app_config: AppConfig, client: ClientCo } ) groups.append(manual) - groups.extend( - _build_custom_policy_groups( - app_config=app_config, - client=client, - source_auto_names=source_auto_names, - selector_names=selector_names, - ) - ) groups.append( { "name": client.main_policy, @@ -289,6 +281,14 @@ def _build_thin_groups(client_type: str, app_config: AppConfig, client: ClientCo ], } ) + groups.extend( + _build_custom_policy_groups( + app_config=app_config, + client=client, + source_auto_names=source_auto_names, + selector_names=selector_names, + ) + ) for region in app_config.regions.values(): group = { "name": region.name, @@ -380,14 +380,6 @@ def _build_bundle_groups( "proxies": [*all_proxy_names, client.direct_policy] if all_proxy_names else [client.direct_policy], } ) - groups.extend( - _build_custom_policy_groups( - app_config=app_config, - client=client, - source_auto_names=source_auto_names, - selector_names=selector_names, - ) - ) groups.append( { "name": client.main_policy, @@ -401,6 +393,14 @@ def _build_bundle_groups( ], } ) + groups.extend( + _build_custom_policy_groups( + app_config=app_config, + client=client, + source_auto_names=source_auto_names, + selector_names=selector_names, + ) + ) for region in app_config.regions.values(): matched = [name for name in all_proxy_names if re.search(region.filter, name)] groups.append(