openclaw - 💡(How to fix) Fix Add global provider request proxy/default SSRF policy for model providers [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

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#74835Fetched 2026-05-01 05:40:54
View on GitHub
Comments
1
Participants
2
Timeline
2
Reactions
2
Timeline (top)
commented ×1cross-referenced ×1

Error Message

[agent/embedded] ... provider=<redacted-provider> error=Blocked hostname or private/internal/special-use IP address

Root Cause

Many desktop/home-lab operators use proxy stacks such as Surge/Clash with fake-IP DNS ranges. In that setup, public hosts may resolve to 198.18.0.0/15 or other special ranges locally, while the proxy itself is the component that resolves and enforces the real upstream route.

The operator may intentionally trust this local proxy environment and want model/provider HTTP traffic to consistently use it.

Fix Action

Fix / Workaround

Current workaround

Repeat this block under every remote provider:

Code Example

"models": {
  "providers": {
    "google": {
      "request": {
        "proxy": {
          "mode": "explicit-proxy",
          "url": "http://127.0.0.1:6152"
        },
        "allowPrivateNetwork": true
      }
    }
  }
}

---

[security] blocked URL fetch (url-fetch) targetOrigin=https://<redacted-provider-host> reason=Blocked hostname or private/internal/special-use IP address
[agent/embedded] ... provider=<redacted-provider> error=Blocked hostname or private/internal/special-use IP address

---

"models": {
  "defaults": {
    "request": {
      "proxy": {
        "mode": "explicit-proxy",
        "url": "http://127.0.0.1:6152"
      },
      "allowPrivateNetwork": true
    }
  }
}

---

"proxy": {
  "enabled": true,
  "proxyUrl": "http://127.0.0.1:6152",
  "providerRequestDefaults": {
    "allowPrivateNetwork": true
  }
}

---

"providerRequest": {
  "proxy": {
    "mode": "explicit-proxy",
    "url": "http://127.0.0.1:6152"
  },
  "allowPrivateNetwork": true
}

---

"request": {
  "proxy": {
    "mode": "explicit-proxy",
    "url": "http://127.0.0.1:6152"
  },
  "allowPrivateNetwork": true
}
RAW_BUFFERClick to expand / collapse

Feature request

Add a global/default provider request policy for model providers, so operators can configure an explicit proxy and fake-IP/private-network allowance once instead of repeating it under every models.providers.<id>.request block.

Version / context

OpenClaw 2026.4.27 (cbc2ba0)

Problem

The documented top-level proxy feature is process-wide and useful in principle, but it currently is not a safe fit for our fleet because of #74809. The working setup is to use owner/provider-specific explicit proxies.

For model providers, the only schema-supported place I found for allowPrivateNetwork is per provider:

"models": {
  "providers": {
    "google": {
      "request": {
        "proxy": {
          "mode": "explicit-proxy",
          "url": "http://127.0.0.1:6152"
        },
        "allowPrivateNetwork": true
      }
    }
  }
}

That works, but it is difficult to maintain. Every remote provider needs the same repeated block. Examples include built-in providers such as:

  • google
  • openrouter
  • other configured remote providers
  • future remote providers added later

If one provider is missed, agent replies can fail in non-obvious ways. In our case, Discord messages were received, but a configured default remote model provider was still blocked by SSRF fake-IP handling:

[security] blocked URL fetch (url-fetch) targetOrigin=https://<redacted-provider-host> reason=Blocked hostname or private/internal/special-use IP address
[agent/embedded] ... provider=<redacted-provider> error=Blocked hostname or private/internal/special-use IP address

Adding allowPrivateNetwork: true to that provider's request block fixed replies. But this is easy to miss and hard to audit.

Why this matters

Many desktop/home-lab operators use proxy stacks such as Surge/Clash with fake-IP DNS ranges. In that setup, public hosts may resolve to 198.18.0.0/15 or other special ranges locally, while the proxy itself is the component that resolves and enforces the real upstream route.

The operator may intentionally trust this local proxy environment and want model/provider HTTP traffic to consistently use it.

Proposed config shape

One possible shape:

"models": {
  "defaults": {
    "request": {
      "proxy": {
        "mode": "explicit-proxy",
        "url": "http://127.0.0.1:6152"
      },
      "allowPrivateNetwork": true
    }
  }
}

Alternative shape under top-level proxy:

"proxy": {
  "enabled": true,
  "proxyUrl": "http://127.0.0.1:6152",
  "providerRequestDefaults": {
    "allowPrivateNetwork": true
  }
}

Or a dedicated top-level request policy:

"providerRequest": {
  "proxy": {
    "mode": "explicit-proxy",
    "url": "http://127.0.0.1:6152"
  },
  "allowPrivateNetwork": true
}

Desired behavior

  • Apply the global/default request policy to all model providers unless they override it.
  • Preserve per-provider override capability.
  • Local/self-hosted providers such as ollama should be able to opt out or be excluded by default if appropriate.
  • The policy should be visible via openclaw config get / effective config inspection so operators can audit what each provider receives.

Current workaround

Repeat this block under every remote provider:

"request": {
  "proxy": {
    "mode": "explicit-proxy",
    "url": "http://127.0.0.1:6152"
  },
  "allowPrivateNetwork": true
}

This works, but is brittle. It already caused a real outage where Discord bots were connected and receiving messages, but no replies were produced because model calls were blocked.

Related issues

  • #74809: top-level proxy breaks Discord TLS with a local HTTP proxy in our environment.
  • #74810: LLM-only model runs and inherited tool allowlists.

extent analysis

TL;DR

Implement a global/default provider request policy for model providers to simplify configuration and avoid repetition.

Guidance

  • Consider adding a defaults section under models to define a global request policy, as proposed in the issue.
  • Evaluate the alternative config shapes suggested, such as adding a providerRequestDefaults section under the top-level proxy or introducing a dedicated providerRequest policy.
  • Assess the need for per-provider overrides and opt-out capabilities, particularly for local/self-hosted providers like ollama.
  • Review the current workaround and its limitations to understand the benefits of implementing a global/default provider request policy.

Example

"models": {
  "defaults": {
    "request": {
      "proxy": {
        "mode": "explicit-proxy",
        "url": "http://127.0.0.1:6152"
      },
      "allowPrivateNetwork": true
    }
  }
}

Notes

The proposed solution aims to simplify configuration and reduce the risk of errors due to repeated blocks. However, the implementation details and potential interactions with other features, such as the top-level proxy and per-provider overrides, require careful consideration.

Recommendation

Apply a workaround by repeating the request block under every remote provider until a global/default provider request policy is implemented, as this is the current functional solution, albeit brittle.

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

openclaw - 💡(How to fix) Fix Add global provider request proxy/default SSRF policy for model providers [1 comments, 2 participants]