From dc0e0414636e558bce207fb2d1007ba22d840cd5 Mon Sep 17 00:00:00 2001 From: Xi Xu Date: Fri, 21 Nov 2025 20:11:56 +0800 Subject: [PATCH] Refactor Chinese Mainland location handling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Moved 'Chinese Mainland 🇨🇳' from a dedicated proxy group to the general locations array. Updated proxy group definitions to use the unified locations list, simplifying configuration and reducing redundancy. --- META.js | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/META.js b/META.js index 76f30ad..00aac42 100644 --- a/META.js +++ b/META.js @@ -49,6 +49,12 @@ const services = [ const LOCATION_ICON_SET_URL = "https://img.icons8.com/color/144/"; const locations = [ + { + name: "Chinese Mainland 🇨🇳", + icon: `${LOCATION_ICON_SET_URL}china`, + filter: + "(?i)\u5927\u9646|\u4e2d\u56fd|\u7535\u4fe1|\u79fb\u52a8|\u8054\u901a|Mainland|China|CN|mainland|china|cn|🇨🇳", + }, { name: "Argentina 🇦🇷", icon: `${LOCATION_ICON_SET_URL}argentina`, @@ -266,7 +272,6 @@ const serviceProxyGroupProxies = [ ...staticProxyNames, "AUTO", "DIRECT", - "Chinese Mainland 🇨🇳", ...locations.map(({ name }) => name), ]; @@ -385,7 +390,6 @@ const proxyGroups = [ proxies: [ ...staticProxyNames, "AUTO", - "Chinese Mainland 🇨🇳", ...locations.map(({ name }) => name), ], icon: `${BASE_ICON_SET_URL}Proxy.png`, @@ -406,11 +410,11 @@ const proxyGroups = [ name: "Domestic", type: "select", proxies: [ - "Chinese Mainland 🇨🇳", + "DIRECT", + ...locations.map(({ name }) => name), "PROXY", ...staticProxyNames, "AUTO", - ...locations.map(({ name }) => name), ], icon: `${BASE_ICON_SET_URL}Domestic.png`, }, @@ -428,16 +432,6 @@ const proxyGroups = [ proxies: ["REJECT", "DIRECT", ...staticProxyNames], icon: `${BASE_ICON_SET_URL}Advertising.png`, }, - { - ...locationPolicyProxyGroupDefaults, - name: "Chinese Mainland 🇨🇳", - type: "select", - icon: `${LOCATION_ICON_SET_URL}china`, - proxies: ["DIRECT"], - "include-all": true, - filter: - "(?i)\u5927\u9646|\u4e2d\u56fd|\u7535\u4fe1|\u79fb\u52a8|\u8054\u901a|Mainland|China|CN|mainland|china|cn|🇨🇳", - }, ...generateLocationPolicyProxyGroups( locations, locationPolicyProxyGroupDefaults,