Files
ProxyPool/.env.example
2026-01-27 21:17:36 +08:00

63 lines
1.8 KiB
Plaintext
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.

# 代理池系统配置文件示例
# 复制此文件为 .env 并根据实际情况修改配置
# ==================== 数据库配置 ====================
DB_PATH=db/proxies.sqlite
# ==================== API服务配置 ====================
HOST=0.0.0.0
PORT=3000
# ==================== 验证器配置 ====================
VALIDATOR_TIMEOUT=5
VALIDATOR_MAX_CONCURRENCY=200
VALIDATOR_CONNECT_TIMEOUT=3
# ==================== 爬虫配置 ====================
CRAWLER_NUM_VALIDATORS=50
CRAWLER_MAX_QUEUE_SIZE=500
# ==================== 定时任务配置 ====================
SCHEDULER_INTERVAL_MINUTES=60
SCHEDULER_ENABLED=false
# ==================== 日志配置 ====================
LOG_LEVEL=INFO
LOG_DIR=logs
# ==================== 导出配置 ====================
EXPORT_MAX_RECORDS=10000
# ==================== 代理评分配置 ====================
SCORE_VALID=10
SCORE_INVALID=-5
SCORE_MIN=0
SCORE_MAX=100
# ==================== WebSocket配置 ====================
WS_PING_INTERVAL=20
WS_PING_TIMEOUT=20
# ==================== 插件配置 ====================
PLUGINS_DIR=plugins
# ==================== CORS配置 ====================
# 允许的来源域名,用逗号分隔
# 开发环境示例: http://localhost:8080,http://localhost:5173
# 生产环境示例: https://yourdomain.com,https://api.yourdomain.com
CORS_ORIGINS=http://localhost:8080,http://localhost:5173
# ==================== API Key配置 ====================
# 普通用户API Key只读权限
# 请修改为强随机字符串,例如: openssl rand -hex 32
API_KEY=your-api-key-here
# 管理员API Key读写权限
# 请修改为强随机字符串
ADMIN_API_KEY=your-admin-api-key-here
# ==================== 认证开关 ====================
# 是否启用API认证
# 开发环境可设为 false生产环境务必设为 true
REQUIRE_AUTH=false