Skip to content

Solution: Proxy configuration for LLM timeout and Telegram in restricted networks (China) #43629

@AbnerZhuZhu

Description

@AbnerZhuZhu

Solution: Proxy Configuration for LLM Timeout and Telegram in Restricted Networks (China)

Problem Description

Encountered the following issues when using OpenClaw:

  1. LLM Timeout Error - LLM request timed out
  2. Telegram Connection Failed - deleteWebhook failed: Network request failed

Environment

  • OpenClaw Version: 2026.3.8
  • Proxy Software: v2rayn (listening on 127.0.0.1:10809)
  • System Proxy: Enabled in Windows Registry
  • LLM: MiniMax-M2.5
  • Deployment Environment: Mainland China

Root Cause

  1. LLM Timeout: System proxy was enabled in Windows Registry (ProxyEnable=1). OpenClaw accessed MiniMax LLM through the proxy, but the proxy route caused timeout due to unnecessary detour.

  2. Telegram Connection Failed: Telegram API is blocked in Mainland China and requires a proxy to access. However, OpenClaw was not properly configured with a dedicated proxy for Telegram.

Solution

Config File Location

~/.openclaw/openclaw.json

Complete Configuration

{
  "env": {
    "vars": {
      "JINA_API_KEY": "your_jina_api_key",
      "HTTP_PROXY": "",
      "HTTPS_PROXY": "",
      "http_proxy": "",
      "https_proxy": "",
      "ALL_PROXY": "",
      "all_proxy": "",
      "NO_PROXY": "*"
    }
  },
  "channels": {
    "telegram": {
      "enabled": true,
      "dmPolicy": "pairing",
      "botToken": "your_telegram_bot_token",
      "groupPolicy": "open",
      "streaming": "partial",
      "timeoutSeconds": 60,
      "proxy": "http://127.0.0.1:10809"
    }
  }
}

Configuration Explanation

Config Item Purpose
HTTP_PROXY: "" etc. Disable global proxy, allow LLM to connect directly
NO_PROXY: "*" Exclude all domains from proxy
channels.telegram.proxy Dedicated proxy for Telegram
channels.telegram.timeoutSeconds: 60 Telegram timeout setting (fixes unstable proxy connections)

Core Strategy

  • LLM Requests: Disable proxy, connect directly to domestic API (fixes timeout)
  • Telegram: Configure dedicated proxy separately (fixes connection issue)

Steps

  1. Edit config file: ~/.openclaw/openclaw.json
  2. Add the configuration above
  3. Restart Gateway: openclaw gateway restart
  4. Verify both Telegram and LLM are working properly

Related References

Author

Abner
Date: 2026-03-12

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions