DSH-SmsWebhook
开发工具 活跃维护

DSH-SmsWebhook

huaxiren6/DSH-SmsWebhook

接收短信转发应用的推送内容,自动完成短信数据持久化存储,对外暴露sms_recent、sms_search两类工具接口,开发者可直接调用获取近期或指定短信内容,部署使用门槛低。

2
Stars 标星
0
Forks 分支
2
Watchers 关注
0
Open Issues
JavaScript
主要语言
MIT
开源协议
62 KB
仓库大小
28 天前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:huaxiren6/DSH-SmsWebhook
git clone https://github.com/huaxiren6/DSH-SmsWebhook.git
git clone git@github.com:huaxiren6/DSH-SmsWebhook.git
README.md main
# 📲 DSH-SmsWebhook ![banner](https://cdnimage-cache.doubi.ren/?url=https://raw.githubusercontent.com/huaxiren6/dsh-smswebhook/main/assets/banner.png) **DeepSeek Harness 短信转发 Webhook 插件** [![npm version](https://cdnimage-cache.doubi.ren/?url=https://img.shields.io/npm/v/dsh-sms-webhook?color=blue)](https://www.npmjs.com/package/dsh-sms-webhook) [![license](https://cdnimage-cache.doubi.ren/?url=https://img.shields.io/npm/l/dsh-sms-webhook)](https://github.com/huaxiren6/DSH-SmsWebhook/blob/main/LICENSE) [![GitHub stars](https://cdnimage-cache.doubi.ren/?url=https://img.shields.io/github/stars/huaxiren6/DSH-SmsWebhook?style=social)](https://github.com/huaxiren6/DSH-SmsWebhook) 接收手机短信转发 App 推来的消息,落盘存储,让模型可以读取手机短信(验证码场景开箱即用)。

简介

在电脑上起一个本地 HTTP 服务,手机上的短信转发 App(SMS Forwarder / Tasker / iOS 快捷指令)把新短信 POST 过来,插件落盘存储并暴露给模型查询。

功能特性

  • 📨 sms_recent — 最近短信(可选关键词过滤)
  • 🔍 sms_search — 全文搜索存储
  • 🔑 自动提取 otp 字段(第一个 4–8 位数字),验证码直接可用
  • 💾 JSONL 落盘,重启不丢(上限 5000 条自动裁剪)
  • 🔎 可选 keywords 白名单,只收含指定词的短信(如 ["验证码", "code"])

安装

dsh plugin --profile web add dsh-sms-webhook

手机端设置

用任意能「转发短信到 HTTP」的 App,例如:

  • SMS Forwarder(安卓,最常用)
  • Tasker / MacroDroid 的自定义 HTTP POST
  • iOS 的快捷指令(收到短信 → 获取 URL 内容)

转发目标填:

POST http://<电脑IP>:8899/
Content-Type: application/json

JSON 格式(字段名兼容常见别名):

{
  "from": "10086",
  "body": "您的验证码是 123456,5 分钟内有效。",
  "receivedAt": 1787180000000,
  "device": "Pixel 8"
}
  • from 也可写作 sender / number / phone
  • body 也可写作 text / message / content
  • 时间戳省略则用服务器当前时间

HTTP 接口

方法/路径 用途
POST / 接收短信(200=已存储,202=被关键词过滤)
GET /?limit=20&q=验证码 查询最近短信(q 可选过滤)
GET /health 存活探针

配置

键 默认 含义
host 0.0.0.0 监听地址(局域网转发保持默认)
port 8899 监听端口
store $DSH_HOME/data/dsh-sms-webhook/messages.jsonl 存储文件
keywords [] 非空时只收含这些词的消息(如 ["验证码", "code"])

⚠️ 0.0.0.0 意味着局域网内任何人都能 POST——建议在手机 App 里限制来源,或仅在可信网络使用。

License

MIT