{"id":26418801,"url":"https://github.com/karinjs/karinjs-webhook-qqbot","last_synced_at":"2025-09-13T08:51:55.234Z","repository":{"id":267743143,"uuid":"901415382","full_name":"KarinJS/karinjs-webhook-qqbot","owner":"KarinJS","description":null,"archived":false,"fork":false,"pushed_at":"2025-05-10T04:36:26.000Z","size":16,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-06T12:45:08.672Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KarinJS.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-12-10T16:05:43.000Z","updated_at":"2025-05-10T04:36:21.000Z","dependencies_parsed_at":"2024-12-12T07:21:34.022Z","dependency_job_id":"d4b9813d-f956-4d56-82a2-328fd2e11a0d","html_url":"https://github.com/KarinJS/karinjs-webhook-qqbot","commit_stats":null,"previous_names":["karinjs/karinjs-webhook-qqbot"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/KarinJS/karinjs-webhook-qqbot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KarinJS%2Fkarinjs-webhook-qqbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KarinJS%2Fkarinjs-webhook-qqbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KarinJS%2Fkarinjs-webhook-qqbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KarinJS%2Fkarinjs-webhook-qqbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KarinJS","download_url":"https://codeload.github.com/KarinJS/karinjs-webhook-qqbot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KarinJS%2Fkarinjs-webhook-qqbot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274942247,"owners_count":25378208,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-13T02:00:10.085Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-18T01:54:40.944Z","updated_at":"2025-09-13T08:51:55.213Z","avatar_url":"https://github.com/KarinJS.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @karinjs/plugin-webhook-qqbot\n\nkarin plugin qqbot webhook\n\n## 快速开始\n\n```bash\nnpx @karinjs/plugin-webhook-qqbot\n```\n\n### 创建新项目\n\n执行以下命令，按照提示操作即可快速创建一个新项目：\n\n```bash\nnpx @karinjs/plugin-webhook-qqbot\n```\n\n- 你会被询问项目目录名称\n- 工具会自动检查目录是否存在\n- 自动初始化 package.json\n- 自动复制必要文件\n- 可选择是否安装额外依赖\n- 最后会提示如何启动项目\n\n## 启动项目\n\n创建完成后，进入项目目录并启动：\n\n```bash\ncd 你的项目目录\nnode .\n```\n\n# test\n\n`op: 0`:\n\n```json\n{\n  \"host\": \"tx.com\",\n  \"x-real-ip\": \"127.0.0.1\",\n  \"x-real-port\": \"123\",\n  \"x-forwarded-for\": \"127.0.0.1\",\n  \"remote-host\": \"127.0.0.1\",\n  \"connection\": \"close\",\n  \"content-length\": \"623\",\n  \"x-tps-trace-id\": \"123\",\n  \"content-type\": \"application/json\",\n  \"user-agent\": \"QQBot-Callback\",\n  \"x-signature-timestamp\": \"1733384468\",\n  \"x-bot-appid\": \"100000000\",\n  \"x-signature-method\": \"Ed25519\",\n  \"x-signature-ed25519\": \"1d4a066fdefa1378857cd2f2646c06a1f34ea1f48cfd375239e21364779f35bf83e9911c1f7f7a25bada7640799416c956deab779cbce70f082e979f44545a0f\"\n}\n\n```\n\n这是请求头:\n\n| 字段名                | 描述                             |\n| --------------------- | -------------------------------- |\n| host                  | 请求的目标主机名。               |\n| x-real-ip             | 客户端的真实IP地址。             |\n| x-real-port           | 客户端的真实端口号。             |\n| x-forwarded-for       | 代理服务器转发的客户端IP地址。   |\n| remote-host           | 客户端的远程主机地址。           |\n| connection            | 表示是否需要保持连接。           |\n| content-length        | 请求体的长度。                   |\n| x-tps-trace-id        | 用于跟踪请求的唯一标识符。       |\n| content-type          | 请求体的媒体类型。               |\n| user-agent            | 发起请求的客户端信息。           |\n| x-signature-timestamp | 签名的时间戳，用于防止重放攻击。 |\n| x-bot-appid           | 机器人的应用ID。                 |\n| x-signature-method    | 签名方法，用于验证请求的真实性。 |\n| x-signature-ed25519   | 使用Ed25519算法生成的请求签名。  |\n\n## ws推送\n\n\u003e 有两种父类型\n\n### sign 签名计算回调\n\n```json\n{\n \"echo\": \"唯一标识符 返回时原样返回\",\n \"type\": \"sign\",\n \"data\": {\n   \"appid\": \"机器人id\",\n   \"eventTs\": \"事件发生时间戳\",\n   \"plainToken\": \"明文token\"\n }\n}\n```\n\n返回格式:\n\n```json\n{\n \"echo\": \"唯一标识符 返回收到的\",\n \"data\": {\n   \"signature\": \"签名\"\n }\n}\n```\n\n### event 事件推送\n  \n```json\n{\n  \"type\": \"event\",\n  \"data\": {\n    \"headers\": {\n      \"host\": \"tx.com\",\n      \"x-real-ip\": \"127.0.0.1\",\n      \"x-real-port\": \"123\",\n      \"x-forwarded-for\": \"127.0.0.1\",\n      \"remote-host\": \"127.0.0.1\",\n      \"connection\": \"close\",\n      \"content-length\": \"623\",\n      \"x-tps-trace-id\": \"123\",\n      \"content-type\": \"application/json\",\n      \"user-agent\": \"QQBot-Callback\",\n      \"x-signature-timestamp\": \"1733384468\",\n      \"x-bot-appid\": \"100000000\",\n      \"x-signature-method\": \"Ed25519\",\n      \"x-signature-ed25519\": \"1d4a066fdefa1378857cd2f2646c06a1f34ea1f48cfd375239e21364779f35bf83e9911c1f7f7a25bada7640799416c956deab779cbce70f082e979f44545a0f\"\n    },\n    \"event\": \"事件JSON字符串 如果需要计算签名请不要反序列化，直接使用原始字符串进行计算\"\n  }\n}\n```\n\n**此事件不需要回复**\n\n## http推送\n\nhttp推送与qqbot官方的http`除请求头外`推送一致，请求头中会多了一个`authorization`字段，用于bot端验证请求的合法性。\n\n**请返回200状态码**","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarinjs%2Fkarinjs-webhook-qqbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkarinjs%2Fkarinjs-webhook-qqbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarinjs%2Fkarinjs-webhook-qqbot/lists"}