Files
links/patches/puppeteer-api/.env.example
T

39 lines
1.4 KiB
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# puppeteer-api 环境配置示例
# 复制为 .env 后按实际环境修改;pm2 restart server --update-env
# ========== CapSolver(仅 A2C 等 Managed 过盾时 Node 调用 AntiCloudflareTask==========
CAPTCHA_PROVIDER=capsolver
CAPTCHA_API_KEY=
# 静态住宅代理 ip:port:user:passCapSolver 过盾必填
# Chrome 仅在「检测到 CF 挑战」时才会使用同一代理(见 server.js ensureCaptchaProxyBrowserIfNeeded
CAPTCHA_PROXY=
CAPTCHA_MAX_WAIT_MS=120000
# ========== Standard 槽位(未走 antiBot / profile=standard 的蜘蛛)==========
MAX_CONCURRENT_BROWSERS=4
# ========== Real Browser 槽位(whatshub / chatknow / huojian / a2c 共用)==========
# 20~30 工单后台批量:建议 2~3(非 A2C 不走代理,可与 A2C 并行)
MAX_CONCURRENT_BROWSERS_REAL=2
# ========== 排队(cron 一轮多工单时避免 503==========
QUEUE_TIMEOUT_MS=300000
# ========== 温池(后台批量强烈建议开启,按 sessionKey 复用 Browser==========
POOL_ENABLED=1
MAX_POOLED_BROWSERS=8
POOL_IDLE_MS=300000
# ========== 超时 ==========
NAVIGATION_TIMEOUT_MS=90000
API_INTERCEPT_TIMEOUT_MS=60000
# Real Browser + A2C 过盾(CapSolver + SPA)建议 180s
API_INTERCEPT_TIMEOUT_REAL_MS=180000
# ========== 会话复用(减少 A2C 重复过盾)==========
SESSION_TTL_MS=7200000
PERSIST_BROWSER_PROFILE=1
# ========== 服务端口 ==========
PORT=3001