Skip to content

AI-Net-Guard v5.9.7

Choose a tag to compare

@github-actions github-actions released this 27 Nov 05:17
· 13 commits to main since this release
430f7a9

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

临时 IPv6 按需开关、Hysteria2 端口跳跃与 PS 7 兼容修复版:新增 -TemporaryIpv6 On|Off 临时 IPv6 放行开关(微软推荐 DisabledComponents=0x20)、IPv6 节点/候选白名单与 /128 物理路由同步,修复 PowerShell 7 下策略提交闭包作用域报错与 singbox_tun 物理网卡误判,并合入 v2rayN 7.x ProtoExtra.Ports Hysteria2 端口跳跃解析及 PS 5.1 JSON 数组兼容修复。


一、主要更新

  1. 临时 IPv6 按需开关与 IPv6 节点同步(14-apply-policy.ps1、07-mode.ps1、10-sync-node-rule.ps1、lib-guard-common.ps1)
    • 14-apply-policy.ps1 新增 -TemporaryIpv6 On|Off:On 时恢复物理网卡 ms_tcpip6 绑定、创建仅限链路本地的 AI-Guard-Allow-DHCPv6(fe80::/10, ff02::1:2 UDP 546->547)与 AI-Guard-Allow-NDP(ICMPv6 133-136)引导规则并写入微软推荐 DisabledComponents=0x20(保留 IPv6 同时优先 IPv4);Off 时一键恢复 DisablePhysicalIpv6=true 与物理 IPv6 全阻断基线。
    • 新增 Test-GuardPublicNodeIpv6(仅接受 2000::/3 公网单播 IPv6),扩展 Get-V2rayNCandidateNodes、Write/Read-GuardCandidateNodes、07-mode.ps1(RA[46]= 规则解析)及 ActiveStore /128 物理直连路由同步(永不写 PersistentStore)。
  2. PowerShell 7 闭包与 singbox_tun 误报修复(lib-guard-common.ps1、verify-leak-test.ps1、12-regression.ps1、03-verify.ps1)
    • 修复 PowerShell 7.x 下 & 14-apply-policy.ps1(带 [CmdletBinding()])触发 .GetNewClosure() 找不到 Save-GuardPolicyLastGood 的事务提交失败问题。
    • 修复 verify-leak-test.ps1、12-regression.ps1、03-verify.ps1 未排除 sing-tun 描述及 tun 网卡名、导致把 singbox_tun 误判为物理网卡出网泄露的问题。
  3. 提取 v2rayN 7.x ProtoExtra.Ports 跳跃端口与 PS 5.1 兼容(10-sync-node-rule.ps1、lib-guard-common.ps1)
    • Get-V2rayNCandidateNodes 通过 PRAGMA table_info(ProfileItem) 动态适配表结构,提取 ProtoExtra.Ports 中的 Hysteria2 跳跃端口范围(如 35000-39000、60000-63000),通过新增 Merge-GuardPortSpecs 标准化合并去重,并修复 Windows PowerShell 5.1 顶层 JSON 数组未展开导致的 [int] 类型转换异常。

二、验证范围

  • 全仓纯 ASCII & AST:27 个 .ps1 脚本 100% 纯 ASCII、0 AST 解析错误;
  • 双引擎单元测试:tests/test-stun-ports.ps1 在 Windows PowerShell 5.1(72/72 PASS) 与 PowerShell 7.7(72/72 PASS) 下全部通过;
  • GUI 构建与附件脱敏扫描:gui\build.ps1 -RunSmokeTest 0 警告 0 错误、8/8 UI 冒烟 PASS;生成的 AI-Net-Guard.exe(含内嵌 payload.zip)与 AI-Net-Guard-portable.zip 经二进制及压缩条目逐项扫描 0 敏感命中;
  • 实机验证:-TemporaryIpv6 On / Off 切换、原生 IPv6 节点测通、关回后 12-regression.ps1 回归(PASS=30 FAIL=0)与 verify-leak-test.ps1(退出码 0)均实测通过。

三、从本地仓库同步到 C:\AI-Net-Guard(管理员 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; & "$root\scripts\10-sync-node-rule.ps1" -IncludeAllNodes; & "$root\scripts\07-mode.ps1"; & "$root\scripts\12-regression.ps1"