Skip to content

AI-Net-Guard v5.9.8

Choose a tag to compare

@github-actions github-actions released this 27 Nov 08:52
· 11 commits to main since this release
3d13be2

AI-Net-Guard v5.9.8 发布说明 (Release Notes)

网络事件排队防丢与主力节点 Pin 常驻白名单版:解决快速切换代理节点时因事件丢失或物理拦截异步更新导致的短暂卡顿问题,在严格保持 0 MB 后台常驻内存 与 DefaultOutbound = Block 安全基线的前提下,支持将常用自建节点及多协议端口叠加锁定为常驻白名单。


一、主要更新

  1. 消除快切节点时的事件丢弃与 Foreign-Physical 同步竞态(07-mode.ps1)

    • 将计划任务 AI-Guard-Mode-Event 的 <MultipleInstancesPolicy> 由 IgnoreNew 改为 Queue:当快速切换节点或网卡抖动连续产生 Event 10001(旧 TUN 断开)与 Event 10000(新 TUN 拉起)时,后续触发会排队顺序执行,不再被 Windows 任务计划程序静默丢弃。
    • 抽出 Sync-ForeignPhysicalBlockIfNeeded,并在 +800 ms late-settle 执行完 Sync-NodeRuleFast 后紧接着刷新物理网卡出站阻断规则,避免 config.json 延迟落盘导致新节点 IP 仍被物理网卡规则拦截。
  2. 叠加式主力节点常驻白名单(10-sync-node-rule.ps1、07-mode.ps1、lib-guard-common.ps1、09-rollback.ps1)

    • 10-sync-node-rule.ps1 新增 -PinCurrentNode 与 -ClearPinnedNodes:将当前活跃节点公网 IP 与 TCP/UDP 端口叠加写入 backup\pinned-nodes.json,并通过共享辅助函数 Sync-AllowlistCoreRules 维护受 App= 与 RA[46]= 严格作用域限定的 AI-Guard-Allow-Pinned-<Core>-{TCP,UDP} 规则。
    • 在切去其他临时机场节点时仍保留对主力 VPS(及同一 VPS 上多端口如 VLESS TCP + Hysteria2 UDP)的放行与物理阻断豁免,切回主力节点即可秒连。
    • 07-mode.ps1 在 Get-FirewallRuleAnalysis 中强制校验 Pinned 规则的 App= / RA[46]= 作用域,并在 -Status 输出 pinned nodes 统计;lib-guard-common.ps1 将 candidate-nodes.json 与 pinned-nodes.json 纳入安装目录 ACL 审计;09-rollback.ps1 在完整回滚时自动清理 pinned-nodes.json。

二、验证范围

  • 全仓纯 ASCII & AST:所有 .ps1 脚本 100% 纯 ASCII、0 AST 解析错误;
  • 双引擎单元测试:tests/test-stun-ports.ps1 在 Windows PowerShell 5.1(75/75 PASS) 与 PowerShell 7.7(74/74 PASS) 下全部通过;
  • GUI 构建与附件脱敏扫描:gui\build.ps1 -RunSmokeTest 0 警告 0 错误、8/8 UI 冒烟 PASS;生成的 AI-Net-Guard.exe(含内嵌 payload.zip)与 AI-Net-Guard-portable.zip 经扫描 0 敏感命中;
  • 实机验证:已验证 Queue 触发器更新、多端口叠加 Pin(VLESS TCP + Hysteria2 UDP)、07-mode.ps1 -Status(rogue out-allow: 0)与 verify-leak-test.ps1 全项通过。

三、从本地仓库同步并更新任务/Pin(管理员 PowerShell 执行)

将 C:\path\to\AI-Net-Guard 替换为你的本地仓库目录后执行:

$ws = "C:\path\to\AI-Net-Guard"; $root = "C:\AI-Net-Guard"
powershell -ExecutionPolicy Bypass -File "$ws\scripts\13-harden-acl.ps1" -Root $root -SyncWorkspace -WorkspaceRoot $ws -SkipVerification
powershell -ExecutionPolicy Bypass -File "$root\scripts\07-mode.ps1" -Root $root -InstallTasks
powershell -ExecutionPolicy Bypass -File "$root\scripts\10-sync-node-rule.ps1" -Root $root -PinCurrentNode
powershell -ExecutionPolicy Bypass -File "$root\scripts\07-mode.ps1" -Root $root -Status