mirror of
https://github.com/chenhg5/cc-connect.git
synced 2026-07-03 12:28:10 +08:00
docs: document telegram proxy config (#389)
* docs: document telegram proxy config * docs(telegram): include enable reactions option * docs(telegram): rebase config example onto latest layout * docs(telegram): move proxy block after reactions * docs(telegram): move proxy block before group replies
This commit is contained in:
@@ -189,7 +189,6 @@ level = "info" # debug, info, warn, error
|
||||
# # profile. Secrets belong in the target user's ~/.claude/settings.json
|
||||
# # env block, NOT here.
|
||||
# run_as_env = ["PGSSLROOTCERT", "PGSSLMODE"]
|
||||
|
||||
# =============================================================================
|
||||
# Streaming Preview / 流式预览
|
||||
# =============================================================================
|
||||
@@ -1038,6 +1037,9 @@ app_secret = "your-feishu-app-secret"
|
||||
# token = "123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11"
|
||||
# allow_from = "*" # Allowed Telegram user IDs, e.g. "123456789,987654321"; "*" = all
|
||||
# # 允许的 Telegram 用户 ID,如 "123456789,987654321";"*" 表示所有
|
||||
# proxy = "http://127.0.0.1:7890" # Optional HTTP/SOCKS5 proxy for Telegram Bot API / 可选 HTTP/SOCKS5 代理
|
||||
# proxy_username = "" # Optional proxy auth username / 代理用户名
|
||||
# proxy_password = "" # Optional proxy auth password / 代理密码
|
||||
# group_reply_all = false # If true, respond to ALL group messages without @mention / 设为 true 群聊无需 @ 也响应
|
||||
# share_session_in_channel = false # If true, all users in a group share one agent session / 群聊共享会话
|
||||
# enable_reactions = false # If true, add ⚡ reaction to incoming messages / 设为 true 收到消息时添加 ⚡ 表情
|
||||
|
||||
@@ -87,12 +87,41 @@ token = "1234567890:ABCdefGHIjklMNOpqrsTUVwxyz-123456"
|
||||
# "*" → same as not set, but explicit (no WARN).
|
||||
# "id1,id2" → only these Telegram user IDs can interact with the bot.
|
||||
# allow_from = "123456789"
|
||||
|
||||
# Optional proxy for Telegram Bot API access.
|
||||
# Supports URLs like:
|
||||
# http://127.0.0.1:7890
|
||||
# socks5://127.0.0.1:1080
|
||||
# proxy = "http://127.0.0.1:7890"
|
||||
# proxy_username = ""
|
||||
# proxy_password = ""
|
||||
```
|
||||
|
||||
> **Common mistake:** `admin_from` goes under `[[projects]]` (project level), NOT inside `[projects.platforms.options]`. If placed in the wrong section, it will be silently ignored.
|
||||
>
|
||||
> To find your Telegram user ID, send any message to **@userinfobot**.
|
||||
|
||||
### 2.1 Optional: Use a Proxy
|
||||
|
||||
If your machine cannot reach the Telegram Bot API directly, set a forward proxy in the Telegram platform options:
|
||||
|
||||
```toml
|
||||
[[projects.platforms]]
|
||||
type = "telegram"
|
||||
|
||||
[projects.platforms.options]
|
||||
token = "1234567890:ABCdefGHIjklMNOpqrsTUVwxyz-123456"
|
||||
proxy = "socks5://127.0.0.1:1080"
|
||||
proxy_username = ""
|
||||
proxy_password = ""
|
||||
```
|
||||
|
||||
Notes:
|
||||
|
||||
- `proxy` accepts HTTP or SOCKS5 proxy URLs.
|
||||
- Leave `proxy_username` and `proxy_password` empty when the proxy does not require authentication.
|
||||
- The proxy only affects Telegram Bot API requests for this Telegram platform instance.
|
||||
|
||||
---
|
||||
|
||||
## Step 3: Get Chat ID (Optional)
|
||||
|
||||
Reference in New Issue
Block a user