Skip to content

NekoBox for Harmony 2.6.0

Choose a tag to compare

@xiaoli8571 xiaoli8571 released this 30 Oct 12:53
· 3 commits to main since this release

修复

  • 修复 2.5.x 版本点击连接后无法启动的问题(VPN 连上约 0.3 秒即被回滚断开)

    根因:HarmonyOS 系统注入的 TUN fd 不允许 fstat(SELinux 返回 EPERM),而 gVisor 的 fdbased.IsSocketFD() 用它判断 fd 类型,探测失败导致整个 gVisor 栈创建失败,sing-box 报错:

    post-start inbound/tun[tun-in]: starting tun stack:
    unix.Fstat(61,...) failed: permission denied
    

    修复:fstat 探测失败时按「非 socket(TUN 设备)」继续,语义正确且不影响 Linux 路径;构建脚本在 go mod vendor 之后自动打补丁并 grep 校验,避免被 vendor 重新生成覆盖。

内核与版本

  • sing-box 1.15.0-alpha.13(OHOS c-shared,构建标签含 with_gvisor)
  • versionName 2.6.0 / versionCode 2600000

真机验证

  • 连接后 VPN 状态保持(state: 1),不再闪断
  • 内核日志出现 inbound/tun → outbound/vless 真实转发
  • Fstat 报错 0 次

安装

下载下方 NekoBox4Harmony-2.6.0-signed.hap 直接安装(发布证书签名)。