From 9c73e8b1076bf64c7b77575417e30e772ba6c41e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9F=A5=E5=BE=AE?= Date: Tue, 23 Jun 2026 21:24:20 +0800 Subject: [PATCH] docs: architecture design doc + gitignore update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 架构文档记录方案一(GDB Hook)的技术路线和关键信息源。 .gitignore 新增 *.AppImage / *.exe / *.dll 规则 --- .gitignore | 5 ++++ gateway/linux/docs/architecture.md | 41 ++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 gateway/linux/docs/architecture.md diff --git a/.gitignore b/.gitignore index 2a9f44d..14a2f1e 100644 --- a/.gitignore +++ b/.gitignore @@ -38,3 +38,8 @@ node_modules/ # OS .DS_Store Thumbs.db + +# Large binaries +*.AppImage +*.exe +*.dll diff --git a/gateway/linux/docs/architecture.md b/gateway/linux/docs/architecture.md new file mode 100644 index 0000000..5dbee5b --- /dev/null +++ b/gateway/linux/docs/architecture.md @@ -0,0 +1,41 @@ +# MoWeChat — 莫荷微信 Bot (Linux GDB Hook 版) + +## 架构设计 + +``` +┌─────────────────────────────────────────────────────────────┐ +│ Linux 服务器 │ +│ │ +│ ┌──────────────────────┐ ┌────────────────────────┐ │ +│ │ 微信 Linux AppImage │ │ wechat_agent_gdb.py │ │ +│ │ (官方原生, 最新版) │ │ (主控脚本) │ │ +│ │ │ │ │ │ +│ │ 正常扫码登录 │◄───►│ GDB Python API 附加 │ │ +│ │ 消息接收 → GDB断点 │ │ 断点触发 → 提取消息 │ │ +│ │ 消息发送 → GDB call │ │ 处理 → Hermes :8642 │ │ +│ └──────────────────────┘ └─────────┬──────────────┘ │ +│ │ │ +│ ▼ │ +│ ┌────────────────────┐ │ +│ │ Hermes Gateway │ │ +│ │ :8642 → Agent处理 │ │ +│ └────────────────────┘ │ +└─────────────────────────────────────────────────────────────┘ +``` + +## 关键信息源 + +| 来源 | 链接 | 内容 | +|------|------|------| +| Ajax's Blog (2026-03) | https://aajax.top/2026/03/11/GettingLinuxWechatMessages/ | **GDB + Python 方案核心参考**。用 GDB 调试 Linux 微信 AppImage 4.1.0.16,拦截消息接收函数,Python 脚本提取消息内容。包含 Docker 封装。 | +| 看雪论坛 | https://bbs.kanxue.com/thread-282965.htm | 原始思路:GDB 分析 Linux 微信消息内存地址,Hook 打印明文消息 | +| lmclmc/linux-wechat-hook | https://github.com/lmclmc/linux-wechat-hook | LD_PRELOAD 注入 libX.so 方案(旧版 wechat-beta,2年前) | +| 52pojie 教程 | https://www.52pojie.cn/thread-1955523-1-1.html | lmclmc 方案的讲解教程 | +| Hermes Weixin 文档 | https://hermes-agent.nousresearch.com/docs/zh-Hans/user-guide/messaging/weixin | Hermes 内置 iLink 平台说明(ClawBot 方案,已排除) | +| weixin-bot-sdk | https://github.com/epiral/weixin-bot | 官方 iLink API(ClawBot 方案,已排除) | + +## 版本管理 + +代码在 `AgentsMeeting/gateway/linux/` 目录下,git 仓库为 `AgentsMeeting` 项目。 + +原始 Windows 版在 `AgentsMeeting/gateway/scripts/wechat_agent.py`(保留不动)。