Yunhu (云湖)
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#
Go to the Yunhu developer portal and create a bot.
Copy the bot token.
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.
Add the bot to your group.
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:
| token | Yes | — | Bot token from the Yunhu developer portal |
| webhook_path | No | "/yunhu-webhook" | HTTP path for the webhook endpoint |
| webhook_secret | No | — | Secret string appended to the webhook URL as an extra path segment for security |
| max_file_size | No | 10485760 (10 MB) | Maximum bytes per attachment when sending |
| media_proxy | No | — | Proxy URL used only when fetching media/attachments. Defaults to following proxy when unset. |
| proxy_host | No | "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. |
| proxy | No | — | Proxy 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). |
https://yh-proxy.siiway.top is a hosted instance of cloudflare/yh-proxy.js that you can use directly without deploying your own Worker.
{
"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:
| chat_id | Yunhu group (or user) chat ID |
| chat_type | "group" (default) or "user" |
{
"yh_main": { "chat_id": "your-group-chat-id", "chat_type": "group" }
}Received message types#
| text / markdown | — (plain text) |
| image | image |
| video | video |
| file | file |
Sending#
Each outgoing message is split into one or more Yunhu API calls:
| image | image | Yunhu fetches the URL server-side and renders an inline image |
| video | video | Rendered as an inline video player |
| voice / file | file | Rendered as a downloadable file link |
| (no URL) | text | A [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.