This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Terry 终极批量版:ip-api.com 纯血探测 + 批量优先 + 智能重试 | |
| * 核心逻辑:只信赖物理路由,首选官方 Batch 接口,遇限流自动休眠重试。 | |
| */ | |
| async function operator(proxies) { | |
| const args = typeof $arguments !== 'undefined' ? $arguments : {}; | |
| const showFlag = args.flag !== '0'; | |
| const customName = args.custom || ""; | |
| const enableSort = args.sort !== '0'; | |
| const hideUnknown = true; // 强制隐藏未知节点 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| async function operator(proxies) { | |
| const uniqueHosts = [...new Set(proxies.map(p => p.server.split(':')[0]))].filter(Boolean); | |
| await Promise.allSettled(uniqueHosts.map(async (host) => { | |
| try { | |
| let targetIp = host; | |
| // 1. 判断是纯 IP 还是域名 | |
| const isIPv4 = /^(\d{1,3}\.){3}\d{1,3}$/.test(host); | |
| const isIPv6 = /^[0-9a-fA-F:]+$/.test(host) && host.includes(':'); |