MCPcopy Create free account
hub / github.com/Moli-X/Resources / FilterScript

Function FilterScript

Script/Parser.js:1882–1899  ·  view source on GitHub ↗
(servers, script)

Source from the content-addressed store, hash-verified

1880}
1881
1882function FilterScript(servers, script) {
1883 $notify("🤖 启用脚本进行筛选", "", script);
1884 try {
1885 const $ = Tools();
1886 eval(script);
1887 // extract server tags
1888 const nodes = Tools().getNodeInfo(servers);
1889 const IN = filter(nodes);
1890 const res = servers.filter((_, i) => IN[i]);
1891 if (res.length === 0) {
1892 $notify("‼️ ⟦" + subtag + "⟧" + "筛选后节点数为0️⃣", "⚠️ 请自行检查原始链接以及筛选参数", link0, sub_link);
1893 }
1894 return res;
1895 } catch (err) {
1896 $notify("❌ 脚本筛选出现错误", "", err);
1897 return servers;
1898 }
1899}
1900
1901//a.c.com:0031:origin:aes-256-gcm:plain:pwdpwd/?obfsparam=&remarks=xxxx
1902//SSR 类型 URI 转换 quanx 格式

Callers 1

ResourceParseFunction · 0.85

Calls 3

ToolsFunction · 0.85
filterFunction · 0.85
$notifyFunction · 0.70

Tested by

no test coverage detected