This commit is contained in:
2025-08-31 14:18:31 +08:00
parent 30ace3faa2
commit 4be4d6b6da
19 changed files with 3472 additions and 7 deletions

View File

@@ -92,3 +92,26 @@ Tianyuanapi:
Timeout: 60
VerifyConfig:
TwoFactor: true
Security:
RateLimit:
Enabled: true
WindowSize: 30
MaxRequests: 50
TriggerThreshold: 3 # 触发5次频率限制后加入黑名单
TriggerWindow: 24 # 24小时内统计触发次数
IPBlacklist:
Enabled: true
UserBlacklist:
Enabled: true
AnomalyDetection:
Enabled: true
BurstAttack:
Enabled: true # 启用短时并发攻击检测
TimeWindow: 1 # 1秒内检测
MaxConcurrent: 15 # 最大20个并发请求
Logging:
UserOperationLogDir: "./logs/user_operations"
MaxFileSize: 104857600 # 100MB
LogLevel: "info"
EnableConsole: true
EnableFile: true