Skip to content

Instantly share code, notes, and snippets.

@178991907
178991907 / geoipbl.js
Last active May 14, 2026 20:46
geoipbl.js
/**
* 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; // 强制隐藏未知节点
@178991907
178991907 / geoip.js
Last active May 14, 2026 18:39
geoip_rename.js
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(':');