Repository navigation
feat(jev): 封禁到期自动解封、误判豁免与观察模式 - #37
Merged
Merged
Conversation
- 新增 JevBanService 与 jev_ban 表:首次封禁默认 24 小时,再犯翻倍,上限默认 720 小时;0 为永久 - 后台每分钟对账「Jev 自动封禁」分组与 jev_ban:到期移出分组;在黑白名单页手动移出的视为解封; 分组内未登记的 IP(含旧版合并过来的)登记并开始计时;不受 Jev 开关影响 - 手动解封后进入豁免期(默认 7 天),期间不再交给 Jev 判断,避免同一误判反复封禁 - 观察模式:只记录判断结果不封禁,批次新增 high_risk_ips/shadow 统计,访客页显示上次判断摘要 - 设置页新增观察模式、首次封禁时长、封禁时长上限、解封豁免天数 - 批次计数写入合并为单一 WriteBatch,SELECT 列表抽为常量 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
变更内容
在 #36(统一「Jev 自动封禁」分组)的基础上,补齐 Jev 封禁的生命周期管理。
封禁 TTL 与递增时长
JevBanService与统计库jev_ban表,记录每个 IP 的违规次数、封禁/到期时间、解封原因与豁免期。后台对账(每分钟,不受 Jev 开关影响)
jev-*分组合并过来的、或手动加入的)登记为一次封禁并开始计时。误判豁免
观察模式
high_risk_ips/shadow字段。设置
其他
WriteBatch,批次 SELECT 列表抽为常量。ConfigurationService新增批量移除方法RemoveIpsFromBlacklistGroups。AddColumnIfMissing按列存在性迁移。验证
dotnet build FastGateway.sln通过(0 个错误)npm run build(tsc + vite)通过npm run lint:仓库原有 128 个问题,本 PR 改动的文件前后一致,未新增🤖 Generated with Claude Code