Dew-OF-Aurora 3 minggu lalu
induk
melakukan
c9cd5fb520
1 mengubah file dengan 8 tambahan dan 0 penghapusan
  1. 8 0
      availability.js

+ 8 - 0
availability.js

@@ -37,6 +37,14 @@ async function operator() {
 
 async function operator(proxies = [], targetPlatform, env) {
   const $ = $substore
+
+  // 目标代理客户端执行列表,支持 SurgeMac 和 Loon,其他客户端默认跳过
+  const targetPlatforms = ['SurgeMac', 'Loon']
+  if (targetPlatform && !targetPlatforms.some(p => p.toLowerCase() === targetPlatform.toLowerCase())) {
+    $.info(`当前目标客户端为 ${targetPlatform},不在执行列表 [${targetPlatforms.join(', ')}] 中,跳过测活脚本并直接返回节点`)
+    return proxies
+  }
+
   const { isLoon, isSurge } = $.env
   if (!isLoon && !isSurge) throw new Error('仅支持 Loon 和 Surge(ability=http-client-policy)')
   const telegram_chat_id = $arguments.telegram_chat_id