数据统计
总安装量
0
今日新增
+0
用户评分
5.0
描述
版本1
评分1
权限说明
拦截盒子IM的已读回执请求,保护阅读隐私
# 盒子IM - 防已读回执
[](https://www.gnu.org/licenses/agpl-3.0)
[](https://www.tampermonkey.net/)
[](https://violentmonkey.github.io/)
## 📖 简介
一个轻量级的 Tampermonkey/Violentmonkey 用户脚本,用于**拦截盒子IM(BoxIM)的已读回执**。当您阅读好友或群聊消息时,脚本会自动拦截并阻止客户端向服务器发送“已读”状态,从而实现“阅后即焚”般的隐私保护效果。
## ✨ 功能特性
- 🚫 **拦截私聊已读回执**:阻止 `/api/message/private/readed` 请求,阅读私聊消息后对方不会看到“已读”状态
- 🚫 **拦截群聊已读回执**:阻止 `/api/message/group/readed` 请求,群聊中阅读消息后不会暴露您的阅读状态
- 🔒 **双重拦截机制**:同时拦截 `fetch` 和 `XMLHttpRequest` 两种网络请求方式,兼容性更强
- ✅ **模拟成功响应**:拦截后返回模拟的成功响应,避免前端报错或出现异常提示
- 🪶 **轻量无侵入**:仅拦截特定API,不影响其他功能正常使用
## 🛠️ 安装方法
### 前提条件
1. 安装浏览器用户脚本管理器:
- [Tampermonkey](https://www.tampermonkey.net/)(推荐)
- 或 [Violentmonkey](https://violentmonkey.github.io/)
### 安装步骤
1. 点击下方按钮或链接安装脚本:
**[👉 点击安装脚本](https://raw.githubusercontent.com/yourusername/boxim-anti-readed/main/boxim-anti-readed.user.js)**
2. 或者手动创建脚本:
- 打开 Tampermonkey 仪表盘 → 点击“+”号创建新脚本
- 将本脚本的完整代码粘贴进去
- 按 `Ctrl+S` 保存
3. 访问 [https://www.boximchat.com/](https://www.boximchat.com/) 并登录,脚本会自动生效
## 📋 使用方法
1. 安装脚本后,打开盒子IM网页版并登录
2. 脚本会自动运行,无需任何手动操作
3. 在浏览器控制台(F12 → Console)中可以看到拦截日志:
[盒子IM防已读] 脚本已启动,已拦截以下API:
- /api/message/private/readed
- /api/message/group/readed
[盒子IM防已读] 已拦截 fetch 请求: https://www.boximchat.com/api/message/private/readed?...
## ⚙️ 工作原理
该脚本通过替换浏览器原生的 `window.fetch` 和 `XMLHttpRequest` 方法,在请求发出前进行URL匹配:
1. 当客户端准备发送已读回执时,会调用 `fetch` 或 `XMLHttpRequest`
2. 脚本检查请求URL是否包含 `/api/message/private/readed` 或 `/api/message/group/readed`
3. 如果匹配,脚本拦截请求,不向服务器发送真实数据
4. 同时返回一个模拟的成功响应(`{ code: 0, data: null }`),确保前端逻辑正常运行
5. 您阅读消息的行为不会被记录,对方不会看到“已读”状态
## ⚠️ 注意事项
- 本脚本仅适用于 **盒子IM网页版**(`https://www.boximchat.com/*`)
- 拦截已读回执后,对方仍能看到您是否“在线”,但这不影响脚本的核心功能
- 如果您发送消息,该行为本身会暴露您的活跃状态,与已读回执无关
- 部分浏览器或扩展可能会干扰脚本运行,如遇问题请尝试禁用其他扩展
## ❓ 常见问题
### Q: 对方会看到我“已读”吗?
A: 不会。脚本会拦截所有已读回执的上报请求,对方不会看到“已读”标记。
### Q: 会影响我正常收发消息吗?
A: 不会。脚本仅拦截特定的已读回执API,不影响消息收发、图片上传、文件传输等其他功能。
### Q: 为什么不拦截 `/api/message/private/maxReadedId` 了?
A: 经过分析,`/api/message/private/readed` 才是实际上报单条消息已读状态的接口。`maxReadedId` 主要用于拉取消息历史时的状态同步,不影响实时已读回执。
### Q: 脚本更新后我需要重新安装吗?
A: 如果使用 Tampermonkey,脚本会自动检查更新(如果作者配置了 `@updateURL`)。手动安装的用户需要定期关注版本更新。
## 📄 开源协议
本项目采用 **AGPL-3.0** 协议开源。您可以自由使用、修改和分发,但任何修改后的版本也必须以 AGPL-3.0 协议开源。
Copyright (C) 2026 归鸿
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
## 🤝 贡献与反馈
- 🐛 发现问题?请提交 [Issue](https://github.com/yourusername/boxim-anti-readed/issues)
- 💡 有好的建议?欢迎提交 [Pull Request](https://github.com/yourusername/boxim-anti-readed/pulls)
- ⭐ 如果觉得有用,不妨给项目点个 Star!
## 🔗 相关链接
- [盒子IM官网](https://www.boximchat.com/)
- [Tampermonkey 官方文档](https://www.tampermonkey.net/documentation.php)
- [GNU AGPL-3.0 协议全文](https://www.gnu.org/licenses/agpl-3.0.html)
---
**免责声明**:本脚本仅供学习交流使用,请勿用于违反盒子IM用户协议的行为。使用本脚本产生的一切后果由使用者自行承担。