Skip to content

Bug: SSRF guard blocks ALL external URLs when using local proxy (affects Telegram media/WeChat/web_fetch) #62560

Description

@Augusta-waveryu

Bug: SSRF guard blocks ALL external URLs when using local proxy (Clash/Tunnel)

Issue Description

When OpenClaw is configured with a local proxy (e.g., Clash on port 7890), the SSRF guard blocks nearly ALL external URL fetches, making core functionality unusable.

Root cause: Clash's fake-IP DNS returns private IP addresses (198.18.x.x or 127.0.0.1) for ALL hostnames. OpenClaw's SSRF security check rejects these as "Blocked hostname: private/internal/special-use IP address".

Affected Channels & Tools

  1. Telegram media downloads — Users cannot send screenshots

  2. WeChat connectivity — WeChat channel cannot poll for updates

    • Error: [openclaw-weixin] weixin getUpdates error: fetch failed
  3. web_fetch / url-fetch tool — BROKEN

    • 1,600+ blocked fetches in a single day
    • Affects ALL web research, content extraction, knowledge base building
    • Blocked: zhihu.com, xiaohongshu.com, youtube.com, github.com, etc.
  4. wechat-search skill — Cannot search WeChat articles

  5. agent-reach skill — Cannot fetch external platform content

Environment

  • OpenClaw: 2026.4.5
  • Proxy: Clash (ClashX/ClashMac) on localhost:7890
  • Proxy mode: enhanced-mode: fake-ip (default Clash DNS)

Attempted Fixes (All Failed)

  1. channels.telegram.network.dangerouslyAllowPrivateNetwork: true — No effect
  2. channels.telegram.network.allowedHostnames: ["*.telegram.org"] — No effect
  3. channels.telegram.network.hostnameAllowlist: ["*.telegram.org"] — No effect
  4. Adding 127.0.0.1 to hostnameAllowlist — No effect
  5. Clash fake-ip-filter: +.telegram.org — No effect

Why This Affects ALL Proxy Users

Any user running a VPN/proxy with fake-IP DNS (Clash, Surge, Stash, etc.) will hit this. This is extremely common in China where direct international connections are unavailable.

Suggested Fixes

Option 1 (simplest): Trust loopback proxy for all requests
When a request is explicitly routed through a configured proxy, the SSRF guard should not apply. The proxy is already a trusted gateway.

Option 2: Add safe hostnames to default allowlist
api.telegram.org, cdn.telegram.org, mp.weixin.qq.com, etc.

Option 3: Bypass SSRF for proxied HTTPS requests
Trust the proxy to handle DNS correctly for explicitly proxied requests.

Impact

Feature Severity
Web research (web_fetch) CRITICAL
Night learning mode CRITICAL
WeChat connectivity HIGH
Telegram screenshots HIGH

This makes OpenClaw effectively unusable for its core knowledge-work automation use case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions