MCPcopy Create free account
hub / github.com/anyehttp/quantumult-x / operator

Function operator

SubStore_Script/Del_Node.js:1–14  ·  view source on GitHub ↗
(proxies = [], targetPlatform, context)

Source from the content-addressed store, hash-verified

1function operator(proxies = [], targetPlatform, context) {
2 // 过滤条件:1. 存在 obfs-opts 字段 2. obfs-opts 下存在 mode 字段
3 const filteredProxies = proxies.filter(proxy => {
4 // 先判断 obfs-opts 存在且不为 null,再判断其下的 mode 存在且不为 null/undefined
5 return proxy['obfs-opts'] !== undefined &&
6 proxy['obfs-opts'] !== null &&
7 proxy['obfs-opts'].mode !== undefined &&
8 proxy['obfs-opts'].mode !== null;
9 });
10
11 console.log(`原始节点数: ${proxies.length}, 过滤后节点数: ${filteredProxies.length}`);
12
13 return filteredProxies;
14}

Callers

nothing calls this directly

Calls 1

logMethod · 0.45

Tested by

no test coverage detected