// 允许非特权 pangolin 用户管理【仅】sing-box.service —— pangolin-agent 渲染完 // sing-box 配置后会 `systemctl restart sing-box`,非 root 需 polkit 放行。 // 不授予对其它单元/系统的任何权限。 polkit.addRule(function(action, subject) { if (action.id == "org.freedesktop.systemd1.manage-units" && action.lookup("unit") == "sing-box.service" && subject.user == "pangolin") { return polkit.Result.YES; } });