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>:<port><webhook_path> (e.g. http://1.2.3.4:8000/yunhu-webhook). The port should match your shared HTTP server port.
  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_pathNo"/yunhu-webhook"HTTP path for the webhook endpoint
webhook_secretNoSecret string appended to the webhook URL as an extra path segment for security
max_file_sizeNo10485760 (10 MB)Maximum bytes per attachment when sending
media_proxyNoProxy URL used only when fetching media/attachments. Defaults to following proxy when unset.
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_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.
  • The bot token is sent as a query parameter (?token=...) on every outgoing request — keep it secret.