Telegram 代理网络可执行修复:无账号级 proxy 时自动继承 HTTP(S)_PROXY
问题/场景:代理网络环境中 Telegram message send 报 sendMessage failed。前置条件:Telegram bot 已配置且系统代理可用。实施步骤:1) 不配置账号级 proxy;2) 导出 HTTP_PROXY/HTTPS_PROXY/ALL_PROXY;3) 发送 message 验证通路;4) 如需覆盖,改用 channels.telegram.accounts.<id>.proxy。关键命令:export HTTP_PROXY、openclaw message send。验证方法:CLI 返回 messageId 且目标群收到消息。风险与边界:坏代理会导致超时;该修复不覆盖其他渠道重试策略。来源归因:GitHub PR #28630。
GITHUBDiscovered 2026-03-10Author zwffff
Prerequisites
- Telegram account/bot token is already configured in OpenClaw.
- A reachable HTTP proxy endpoint is available in your runtime environment.
Steps
- Ensure channels.telegram.accounts.<id>.proxy is unset so env fallback can take effect.
- Export HTTP_PROXY / HTTPS_PROXY (or ALL_PROXY) in the same shell as OpenClaw runtime.
- Run openclaw message send --channel telegram with a test target and message.
- If delivery is unstable, set per-account proxy explicitly and re-test; per-account setting should override env proxy.
Commands
export HTTP_PROXY=http://127.0.0.1:7890export HTTPS_PROXY=http://127.0.0.1:7890openclaw message send --channel telegram --target <chat_id> --message "proxy test"Verify
Telegram chat receives the message and CLI output includes delivery metadata (messageId/chatId).
Caveats
- Broken proxy endpoints will fail this path just like other env-proxy-aware tools.
- This change only covers Telegram API sends; other channel transports still need separate verification.
Source attribution
This tip is aggregated from community/public sources and preserved with attribution.
Open original source ↗