Skip to content

v1.4.3

Choose a tag to compare

@cn0xroot cn0xroot released this 16 Sep 14:50
· 87 commits to master since this release

新增

  • 发布编译好的 Linux x64 二进制:GitHub Release 现在附带打包好的
    CC-Monitor-*.AppImage,配一个 cc-monitor-start.sh 启动包装脚本——AppImage
    是单个可执行文件,双击/直接运行时不经过任何 npm 脚本,v1.4.2 里给 npm run electron 用的 node launcher 在这种运行方式下用不上(那个 launcher 依赖的是
    npm 脚本这一层,AppImage 根本不经过它)。这个脚本按运行身份决定要不要给
    AppImage 加 --no-sandbox --disable-gpu-sandbox,是 root 才加,其它身份原样
    启动,沙箱保护不受影响。已实测验证:直接双击/裸跑 AppImage 在 root 下依旧会
    FATAL 退出,必须用这个包装脚本或者手动加这两个参数启动。

修复

  • electron-main.js 里遗留的 root 沙箱兜底代码其实完全不起作用:v1.4.2 里
    留了一段"就算 launcher 没生效,这里再兜底加一次 --no-sandbox"的代码,实测
    验证发现这段 JS 根本没有机会在 Chromium 的原生 FATAL 检查前执行到——这个检查
    发生在 Electron 启动的原生阶段,比 electron-main.js 里任何一行 JS(包括文件
    最开头)都早,连"在最开头用 Node 自己重新拉起带参数的自己"这种自愈写法都测过,
    同样来不及。删掉了这段无效代码,改为纯注释说明:这个开关只能从外部、在真正
    spawn 出 electron 进程之前带入 argv,npm run electron 走
    scripts/electron-start.js,打包后的二进制走上面新增的 cc-monitor-start.sh。

English

Added

  • Published a compiled Linux x64 binary: the GitHub Release now ships a built
    CC-Monitor-*.AppImage alongside a cc-monitor-start.sh launcher wrapper.
    An AppImage is a single self-contained executable — double-clicking or running
    it directly bypasses any npm script, so the Node launcher added in v1.4.2 for
    npm run electron (which relies on that npm-script layer) never gets a chance
    to run for the packaged binary. This wrapper checks the caller's uid and only
    appends --no-sandbox --disable-gpu-sandbox when actually running as root,
    leaving the sandbox untouched for everyone else. Verified: running the raw
    AppImage directly as root still FATAL-exits — the wrapper (or passing those
    flags manually) is required.

Fixed

  • Leftover root-sandbox fallback code in electron-main.js did nothing:
    v1.4.2 kept a "just in case the launcher didn't apply it, add --no-sandbox
    here too" block. Testing showed this JS never gets a chance to run before
    Chromium's native FATAL check fires — that check happens at Electron's native
    startup stage, earlier than any JS in electron-main.js, even the very first
    line of the file; even a self-re-exec pattern placed at the top of the file
    was too late. Removed the dead code and replaced it with a comment explaining
    that this flag can only be supplied from outside, before the electron process
    is spawned — npm run electron goes through scripts/electron-start.js, and
    the packaged binary goes through the new cc-monitor-start.sh above.

完整更新日志见 CHANGELOG.md (English)。