first commit
This commit is contained in:
62
.env.example
Normal file
62
.env.example
Normal file
@@ -0,0 +1,62 @@
|
||||
# 代理池系统配置文件示例
|
||||
# 复制此文件为 .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
|
||||
Reference in New Issue
Block a user