共计 1422 个字符,预计需要花费 4 分钟才能阅读完成。
Aggregator – 免费代理池构建工具
项目地址: https://github.com/wzdnzd/aggregator
🎯 项目简介
一个强大的免费代理池构建工具,通过爬取多个平台/网页的代理资源,自动验证、聚合并转换为各种客户端所需格式。
✨ 核心特性
- 🕷️ 多源爬取 – Telegram、GitHub、Google、Yandex、Twitter 等
- 🔍 智能验证 – 自动检测代理活性和质量
- 🔄 格式转换 – 支持 Clash、V2Ray、SingBox 等格式
- 💾 灵活存储 – GitHub Gist、PasteGG、Imperial 等多种后端
- 🔌 插件系统 – 可扩展的自定义爬取架构
- ⚡ 高效处理 – 多线程并发,批量处理
🌐 支持协议
VMess | Trojan | SS | SSR | Snell | Hysteria2 | VLESS | Hysteria | TUIC | AnyTLS | HTTP | SOCKS
🚀 两种使用方式
方式一:process.py(推荐)
完整功能版本 – 支持复杂配置、多源爬取、自定义规则
# 1. 准备配置文件 cp subscribe/config/config.default.json my-config.json # 2. 设置环境变量 export PUSH_TOKEN=your_github_token # 3. 运行处理 python subscribe/process.py -s my-config.json
适用场景:
- 需要精细控制爬取规则
- 多分组输出管理
- 自定义存储后端
- 定时自动化运行
方式二:collect.py
简化版本 – 快速收集机场订阅
# 直接运行,自动收集并上传到 Gist
python subscribe/collect.py \
-g username/gist-id \
-k your-github-token \
-t clash v2ray singbox适用场景:
- 快速获取免费代理
- 个人日常使用
- 不需要复杂配置
⚡ 快速配置
最小配置示例
process.py 配置:
{
"domains": [
{
"name": "example-airport",
"domain": "example.com",
"push_to": ["free"]
}
],
"crawl": {
"enable": true,
"telegram": {
"enable": true,
"users": {
"proxy_channel": {
"push_to": ["free"]
}
}
}
},
"groups": {
"free": {
"targets": {"clash": "free-clash"}
}
},
"storage": {
"engine": "gist",
"items": {
"free-clash": {
"username": "your-username",
"gistid": "your-gist-id",
"filename": "clash.yaml"
}
}
}
}环境变量:
export PUSH_TOKEN=your_github_token常用命令
# 快速收集(推荐新手)
python subscribe/collect.py -g username/gist-id -k token
# 完整处理(推荐进阶)
python subscribe/process.py -s config.json
# 仅检查代理活性
python subscribe/process.py -s config.json --check
# 高性能模式
python subscribe/process.py -s config.json -n 128正文完