openclaw - 💡(How to fix) Fix Telegram media download blocked by SSRF policy when using proxy [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#60468Fetched 2026-04-08 02:50:48
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Author
Participants

Root Cause

When channels.telegram.proxy is configured (e.g. http://127.0.0.1:7897), inbound media downloads fail with: [security] blocked URL fetch - reason=Blocked hostname (not in allowlist): 127.0.0.1. Root cause: buildTelegramMediaSsrfPolicy() does not set dangerouslyAllowPrivateNetwork when a proxy is configured. The SSRF guard sees the proxy IP (127.0.0.1) as the connection target and blocks it. Workaround: add dangerouslyAllowPrivateNetwork: true to the policy return value.

Fix Action

Fix / Workaround

When channels.telegram.proxy is configured (e.g. http://127.0.0.1:7897), inbound media downloads fail with: [security] blocked URL fetch - reason=Blocked hostname (not in allowlist): 127.0.0.1. Root cause: buildTelegramMediaSsrfPolicy() does not set dangerouslyAllowPrivateNetwork when a proxy is configured. The SSRF guard sees the proxy IP (127.0.0.1) as the connection target and blocks it. Workaround: add dangerouslyAllowPrivateNetwork: true to the policy return value.

RAW_BUFFERClick to expand / collapse

When channels.telegram.proxy is configured (e.g. http://127.0.0.1:7897), inbound media downloads fail with: [security] blocked URL fetch - reason=Blocked hostname (not in allowlist): 127.0.0.1. Root cause: buildTelegramMediaSsrfPolicy() does not set dangerouslyAllowPrivateNetwork when a proxy is configured. The SSRF guard sees the proxy IP (127.0.0.1) as the connection target and blocks it. Workaround: add dangerouslyAllowPrivateNetwork: true to the policy return value.

extent analysis

TL;DR

Setting dangerouslyAllowPrivateNetwork to true in the buildTelegramMediaSsrfPolicy() return value may resolve the inbound media download issue when a proxy is configured.

Guidance

  • The root cause is identified as the SSRF guard blocking the proxy IP (127.0.0.1) when a proxy is configured, due to dangerouslyAllowPrivateNetwork not being set.
  • To verify the issue, check the error message for "Blocked hostname (not in allowlist): 127.0.0.1" when attempting to download media with a proxy configured.
  • To mitigate the issue, add dangerouslyAllowPrivateNetwork: true to the policy return value in buildTelegramMediaSsrfPolicy().
  • This workaround may introduce security risks, so it's essential to understand the implications of allowing private network access.

Example

// Example of modified buildTelegramMediaSsrfPolicy() return value
return {
  // ... existing policy settings ...
  dangerouslyAllowPrivateNetwork: true
}

Notes

This workaround may not be suitable for all environments, especially those with strict security requirements. It's crucial to evaluate the security implications of allowing private network access.

Recommendation

Apply workaround: add dangerouslyAllowPrivateNetwork: true to the policy return value, as it directly addresses the identified root cause and provides a clear resolution to the issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING