内部代理池

手动录入 / 接口拉取 · 按序轮询 · 冷却管理 · SQLite 持久化(内部使用,接口无鉴权)

连接中…
代理总数
—
当前可用
—
冷却中
—
累计使用
—
累计冷却
—
轮询位置
—

接口获取 来源 = api

从提取接口拉取 ip:port:user:pass 文本,按 IP:端口 去重入库,已有记录只更新账号密码。

手动录入 来源 = manual

每行一条,支持 ip:port:user:pass 或 ip:port;重复 IP:端口 会更新而非新增。

代理列表

冷却中的代理不会被取用接口返回;到期自动恢复,也可随时手动结束冷却。

冷却时长
ID代理地址账号 / 密码来源 使用次数冷却次数状态冷却剩余最近使用操作

接口说明 无鉴权

按顺序轮询,每次只返回一条可用代理;每成功返回一次,该代理使用次数 +1。

取代理 / 查询

GET  /api/proxy/next             # JSON,按顺序取一条
GET  /api/proxy/next?format=txt # 纯文本 ip:port:user:pass
GET  /api/proxies               # 列表 + 统计
GET  /api/stats                 # 仅统计
GET  /api/settings              # 读取配置
GET  /api/health                # 健康检查

# 取代理返回示例
{
  "ok": true,
  "proxy": "101.227.54.66:18099:TKXE3CDM2C:64941572",
  "id": 1, "ip": "101.227.54.66", "port": "18099",
  "username": "TKXE3CDM2C", "password": "64941572",
  "use_count": 3, "cooldown_count": 1
}

录入 / 冷却 / 配置

POST /api/proxies/manual
  {"text": "ip:port:user:pass\nip:port:user:pass"}

POST /api/proxies/fetch
  {"url": "https://...", "save_url": true}
  # url 省略则使用已保存的默认地址

POST /api/proxies/cooldown      # 设置冷却状态
  {"id": 1, "cooling": true, "duration_seconds": 1800}
  {"target": "1.2.3.4:8080", "cooling": true}
  {"ip": "1.2.3.4", "port": "8080", "cooling": false}
  # cooling=false 结束冷却
  # duration_seconds 省略 → 用系统默认值
  # duration_seconds=0   → 永久冷却

POST /api/proxies/{id}/cooldown
  {"cooling": true, "duration_seconds": 600}

DELETE /api/proxies/{id}
POST /api/settings
  {"fetch_url": "https://...",
   "default_cooldown_seconds": 1800}