Skip to content

This document was written by AI and has been manually reviewed.

Yunhu (云湖)

The Yunhu driver receives messages via a webhook HTTP server and sends via the Yunhu open API.

Setup

  1. Go to the Yunhu developer portal and create a bot.
  2. Copy the bot token.
  3. Set the bot's webhook URL to http://<your-server>:<webhook_port><webhook_path> (e.g. http://1.2.3.4:8765/yunhu-webhook).
  4. Add the bot to your group.
  5. Note the group's chat ID (visible in the group settings or in an incoming webhook event's message.chatId field).

Config keys

Add under yunhu.<instance_id> in config.json:

KeyRequiredDefaultDescription
tokenYesBot token from the Yunhu developer portal
webhook_portNo8765Port for the incoming webhook HTTP server
webhook_pathNo"/yunhu-webhook"HTTP path for the webhook endpoint
proxy_hostNo"https://yh-proxy.siiway.top"Base URL of the cloudflare/yh-proxy.js Worker. Enables two sub-features: avatar URLs are rewritten to <host>/pfp?url=... (adds required Referer); Discord CDN attachment URLs are rewritten to <host>/media?url=... so Yunhu's servers can fetch them from within China Mainland.
proxyNoProxy URL for all Yunhu API requests (e.g., http://proxy.example.com:8080 or socks5://proxy.example.com:1080). Set to null to explicitly disable proxy for this instance (ignores global proxy setting).

Public endpoint available

https://yh-proxy.siiway.top is a hosted instance of cloudflare/yh-proxy.js that you can use directly without deploying your own Worker.

json
{
  "yunhu": {
    "yh_main": {
      "token": "your-yunhu-bot-token",
      "webhook_port": 8765,
      "webhook_path": "/yunhu-webhook",
      "proxy_host": "https://yh-proxy.siiway.top"
    }
  }
}

Rule channel keys

Use under channels or from/to in rules.json:

KeyDescription
chat_idYunhu group (or user) chat ID
chat_type"group" (default) or "user"
json
{
  "yh_main": { "chat_id": "your-group-chat-id", "chat_type": "group" }
}

Received message types

Yunhu content typeAttachment type
text / markdown— (plain text)
imageimage
videovideo
filefile

Sending

Each outgoing message is split into one or more Yunhu API calls:

Attachment typeYunhu content typeNotes
imageimageYunhu fetches the URL server-side and renders an inline image
videovideoRendered as an inline video player
voice / filefileRendered as a downloadable file link
(no URL)textA [Type: filename] text fallback is appended to the text message

The text portion (including any rich-header prefix) is sent first, then each attachment as a separate message.

Notes

  • Yunhu must be able to reach the webhook URL from the internet. When running behind NAT, use a reverse proxy or a tunnel such as ngrok / Cloudflare Tunnel.
  • Each NextBridge instance binds a single port. If you have multiple Yunhu instances, give each a different webhook_port.
  • The bot token is sent as a query parameter (?token=...) on every outgoing request — keep it secret.