SkillAgentSearch skills...

CloudProxyPool

使用 GO开发基于腾讯云 SCF 的IP 代理池,用于绕过 WAF IP限制,支持安全扫描工具调用。

Install / Use

/learn @25smoking/CloudProxyPool
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Cloud ProxyPool

基于腾讯云函数 (SCF) 的分布式 IP 代理池
A distributed IP proxy pool powered by Tencent Cloud Functions


✨ 特性 (Features)

  • 🌍 多区域 IP 轮换 - 支持广州/上海/北京/成都等多个云函数节点
  • 🔐 HTTPS 透明代理 - 内置 MITM 中间人攻击支持,一键生成自签 CA 证书
  • 🚀 双协议支持 - HTTP 代理 (10800) + SOCKS5 代理 (10801)
  • 🔒 身份认证 - 支持 HTTP Basic Auth 保护代理不被滥用
  • 💾 流量录制 - 开启 dump 模式可将所有请求/响应写入日志
  • 🛡️ 智能熔断 - 自动检测并暂时屏蔽失败节点,提升稳定性
  • 📊 Web 监控面板 - 实时查看 QPS、成功率、节点健康状态 (http://127.0.0.1:8081)
  • 一键部署 - 自动化脚本批量部署云函数到多个区域
  • 📸 运行截图 - 查看项目运行预览

📸 使用截图

CloudProxyPool Usage


📦 项目结构

CloudProxyPool/
├── client/                  # 客户端 (Go)
│   ├── config/             # 配置解析
│   ├── cloud/              # 云函数调用 + 熔断逻辑
│   ├── proxy/              # HTTP/SOCKS5 代理核心
│   ├── dashboard/          # Web 监控面板
│   ├── main.go             # 入口文件
│   ├── config.toml         # 配置文件
│   └── cloud-proxy.exe     # 编译后的可执行文件
├── server/                  # 云函数代码 (Python)
│   ├── index.py            # 云函数入口
│   └── requirements.txt    # Python 依赖
├── deploy/                  # 自动化部署工具
│   ├── deploy.py           # 部署脚本
│   ├── deploy.toml         # 部署配置
│   └── requirements.txt    # Python 依赖
└── README.md               # 本文档

🚀 快速开始

1. 部署云函数

cd deploy
pip install -r requirements.txt

# 编辑 deploy.toml,填入腾讯云密钥
python deploy.py

部署成功后会自动输出所有 Function URLs 并写入 ../client/config.toml

2. 启动客户端

cd ../client
./cloud-proxy.exe

首次启动会自动生成 CA 证书到 certs/ 目录。

3. 配置代理

HTTP 代理 (推荐):

# Windows PowerShell
$env:http_proxy="http://127.0.0.1:10800"
$env:https_proxy="http://127.0.0.1:10800"

# Linux/Mac
export http_proxy=http://127.0.0.1:10800
export https_proxy=http://127.0.0.1:10800

SOCKS5 代理:

curl -x socks5://127.0.0.1:10801 http://myip.ipip.net

4. 安装 CA 证书 (HTTPS 必需)

Windows:

  1. 双击 certs/ca-cert.pem
  2. 点击"安装证书"
  3. 选择"受信任的根证书颁发机构"

Linux/Mac:

# Ubuntu/Debian
sudo cp certs/ca-cert.pem /usr/local/share/ca-certificates/cloud-proxy-ca.crt
sudo update-ca-certificates

# Mac
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain certs/ca-cert.pem

⚙️ 配置文件

client/config.toml 示例:

[client]
listen_addr = "127.0.0.1:10800"  # HTTP 代理监听地址
socks_addr = ":10801"            # SOCKS5 监听地址 (可选)
dashboard_addr = ":8081"         # 监控面板地址 (可选)

# 认证 (可选)
# user = "admin"
# password = "supersecret"

# 流量录制 (可选)
# dump = true
# dump_file = "traffic.log"

debug = false

[cloud]
# 由 deploy.py 自动生成
function_urls = [
    "https://your-appid-xxxx.ap-shanghai.tencentscf.com",
    "https://your-appid-yyyy.ap-guangzhou.tencentscf.com"
]
region = "multi-region"

📊 Web 监控面板

启动客户端后访问 http://127.0.0.1:8081

  • 实时统计: 总请求数、成功数、失败数
  • 节点状态: 每个云函数 URL 的健康状态和失败计数
  • 熔断监控: 显示哪些节点正在冷却

🛡️ 智能熔断机制

当某个云函数节点连续失败 5 次时,会被自动标记为不健康并暂停使用 2 分钟

冷却期结束后自动恢复,无需手动干预。


📝 流量录制

开启流量录制后,所有请求/响应详情会写入 traffic.log

[client]
dump = true
dump_file = "traffic.log"

日志格式示例:

[2026-01-21 14:00:00] REQUEST: GET http://example.com/
> User-Agent: curl/7.68.0
> Host: example.com

--------------------------------------------------
[2026-01-21 14:00:01] RESPONSE: http://example.com/ -> 200 (Size: 1256 bytes)
==================================================

🔐 HTTP Basic Auth

编辑 config.toml 启用认证:

[client]
user = "admin"
password = "your_strong_password"

客户端使用:

curl -x http://admin:your_strong_password@127.0.0.1:10800 http://ipinfo.io

🌐 支持的场景

爬虫 IP 轮换
IP接口测试
绕过 IP 限制
HTTPS 流量抓包
Burp Suite / Proxifier 联动
端口扫描 (SOCKS5 模式)


🔧 故障排查

1. HTTPS 提示证书错误

➡️ 确保已安装 certs/ca-cert.pem 到系统受信任根证书

2. 云函数调用失败

➡️ 检查 config.toml 中的 function_urls 是否正确
➡️ 运行 deploy.py 重新部署并更新配置

3. SOCKS5 无法连接

➡️ 确认 config.toml 中已配置 socks_addr = ":10801"
➡️ 重启客户端

4. Web 面板打不开

➡️ 确认 dashboard_addr = ":8081" 已配置
➡️ 检查 8081 端口是否被占用


📄 许可证

MIT License


🙏 致谢

  • goproxy - HTTP 代理核心
  • go-socks5 - SOCKS5 协议实现
  • 腾讯云函数 (SCF) - 无服务器计算平台

⚠️ 免责声明: 本工具仅供学习和合法用途,请勿用于非法活动。使用者需遵守当地法律法规。

View on GitHub
GitHub Stars26
CategoryDevelopment
Updated5d ago
Forks6

Languages

Go

Security Score

75/100

Audited on Apr 1, 2026

No findings