Repository navigation
AI-Net-Guard v5.9.8
AI-Net-Guard v5.9.8 发布说明 (Release Notes)
网络事件排队防丢与主力节点 Pin 常驻白名单版:解决快速切换代理节点时因事件丢失或物理拦截异步更新导致的短暂卡顿问题,在严格保持 0 MB 后台常驻内存 与 DefaultOutbound = Block 安全基线的前提下,支持将常用自建节点及多协议端口叠加锁定为常驻白名单。
一、主要更新
-
消除快切节点时的事件丢弃与
Foreign-Physical同步竞态(07-mode.ps1)- 将计划任务
AI-Guard-Mode-Event的<MultipleInstancesPolicy>由IgnoreNew改为Queue:当快速切换节点或网卡抖动连续产生Event 10001(旧 TUN 断开)与Event 10000(新 TUN 拉起)时,后续触发会排队顺序执行,不再被 Windows 任务计划程序静默丢弃。 - 抽出
Sync-ForeignPhysicalBlockIfNeeded,并在+800 mslate-settle 执行完Sync-NodeRuleFast后紧接着刷新物理网卡出站阻断规则,避免config.json延迟落盘导致新节点 IP 仍被物理网卡规则拦截。
- 将计划任务
-
叠加式主力节点常驻白名单(
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 -RunSmokeTest0 警告 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