返回顶部
l

lulu-monitorLuLu防火墙助手

AI-powered LuLu Firewall companion for macOS. Monitors firewall alerts, analyzes connections with AI, sends Telegram notifications with Allow/Block buttons. Use when setting up LuLu integration, handling firewall callbacks, or troubleshooting LuLu Monitor issues.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 2.0.0
安全检测
已通过
1,485
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

lulu-monitor

技能名称: lulu-monitor
详细描述:

LuLu Monitor

macOS 上 LuLu 防火墙 的 AI 驱动伴侣。

LuLu Monitor 截图

功能说明

  1. 1. 监控 LuLu 防火墙的弹窗警报
  2. 提取连接信息(进程、IP、端口、DNS)
  3. 调用快速 AI(haiku)分析连接
  4. 通过 Telegram 发送风险评估通知
  5. 提供 4 个操作按钮:始终允许、允许一次、始终阻止、阻止一次
  6. 用户点击按钮后,在 LuLu 上执行相应操作

自动执行模式(可选)

为减少干扰,可启用自动执行模式。当 AI 有高置信度(如 curl、brew、node、git 等已知安全程序连接正常目标)时,将:

  1. 1. 自动执行允许操作
  2. 仍发送 Telegram 通知,说明自动允许的内容

启用方法:
bash

在安装目录创建 config.json


cat > ~/.openclaw/lulu-monitor/config.json << EOF
{
telegramId: 你的TELEGRAMID,
autoExecute: true,
autoExecuteAction: allow-once
}
EOF

选项说明:

  • - autoExecute:false(默认)- 所有警报需手动点击按钮
  • autoExecuteAction:allow-once(默认,保守)或 allow(永久规则)

安装

前置条件

先运行检查脚本:
bash
bash scripts/check-prerequisites.sh

所需条件:

  • - LuLu 防火墙:brew install --cask lulu
  • Node.js:brew install node
  • OpenClaw 网关:已运行并配置 Telegram 频道
  • 辅助功能权限:系统设置 > 隐私与安全性 > 辅助功能 > 启用终端/osascript

网关配置(必需)

监控器通过 OpenClaw 的 /tools/invoke HTTP API 调用 sessions_spawn。此工具默认被阻止。需将其添加到 ~/.openclaw/openclaw.json 的白名单中:

json5
{
gateway: {
tools: {
allow: [sessions_spawn]
}
}
}

未配置时,警报会被检测到但无法转发(日志中显示 404)。

安装

bash
bash scripts/install.sh

此操作将:

  1. 1. 将仓库克隆到 ~/.openclaw/lulu-monitor/
  2. 安装 npm 依赖
  3. 配置 launchd 实现自动启动
  4. 启动服务

验证

bash
curl http://127.0.0.1:4441/status

应返回 {running:true,...}

发送带内联按钮的警报

⚠️ message 工具的 buttons/components 参数不适用于 Telegram 内联按钮。 必须通过 exec 使用 CLI:

bash
openclaw message send --channel telegram --target <聊天ID> \
--message 🔔 LuLu 警报:<摘要> \
--buttons [[{text:✅ 始终允许,callbackdata:lulu:allow},{text:✅ 允许一次,callbackdata:lulu:allow-once}],[{text:❌ 始终阻止,callbackdata:lulu:block},{text:❌ 阻止一次,callbackdata:lulu:block-once}]]

通过 CLI 发送后,回复 NO_REPLY 以避免重复消息。

处理回调

用户点击 Telegram 按钮时,OpenClaw 会收到如下回调:

callback_data: lulu:allow
callback_data: lulu:allow-once
callback_data: lulu:block
callback_data: lulu:block-once

处理方式:调用本地端点:
bash
curl -X POST http://127.0.0.1:4441/callback \
-H Content-Type: application/json \
-d {action:allow} # 或 block、allow-once、block-once

此操作将:

  1. 1. 点击 LuLu 警报上的相应按钮
  2. 将规则范围设为 endpoint
  3. 将规则持续时间设为 始终 或 进程生命周期
  4. 编辑 Telegram 消息以显示结果

故障排除

服务未运行

bash

检查状态

launchctl list | grep lulu-monitor

查看日志

tail -f ~/.openclaw/lulu-monitor/logs/stdout.log

重启

launchctl unload ~/Library/LaunchAgents/com.openclaw.lulu-monitor.plist launchctl load ~/Library/LaunchAgents/com.openclaw.lulu-monitor.plist

辅助功能权限问题

AppleScript 需要权限才能控制 LuLu。前往: 系统设置 > 隐私与安全性 > 辅助功能 启用:终端、iTerm 或你使用的任何终端

未检测到警报

  • - 确保 LuLu 正在运行:pgrep -x LuLu
  • 检查警报窗口是否存在:osascript -e tell application System Events to tell process LuLu to get every window

卸载

bash
bash ~/.openclaw/lulu-monitor/skill/scripts/uninstall.sh

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 lulu-monitor-1776345422 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 lulu-monitor-1776345422 技能

通过命令行安装

skillhub install lulu-monitor-1776345422

下载

⬇ 下载 lulu-monitor v2.0.0(免费)

文件大小: 6.6 KB | 发布时间: 2026-4-17 14:29

v2.0.0 最新 2026-4-17 14:29
Multi-user push, action logging, actor display

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部