|
@@ -37,6 +37,14 @@ async function operator() {
|
|
|
|
|
|
|
|
async function operator(proxies = [], targetPlatform, env) {
|
|
async function operator(proxies = [], targetPlatform, env) {
|
|
|
const $ = $substore
|
|
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
|
|
const { isLoon, isSurge } = $.env
|
|
|
if (!isLoon && !isSurge) throw new Error('仅支持 Loon 和 Surge(ability=http-client-policy)')
|
|
if (!isLoon && !isSurge) throw new Error('仅支持 Loon 和 Surge(ability=http-client-policy)')
|
|
|
const telegram_chat_id = $arguments.telegram_chat_id
|
|
const telegram_chat_id = $arguments.telegram_chat_id
|