Caricamento in corso...
Caricamento in corso...
Last synced: Today, 22:00
Technical reference for the OpenClaw framework. Real-time synchronization with the official documentation engine.
Use this file to discover all available pages before exploring further.
OpenClaw can route runtime HTTP and WebSocket traffic through an operator-managed forward proxy. This is optional defense in depth for deployments that want central egress control, stronger SSRF protection, and better network auditability.
OpenClaw does not ship, download, start, configure, or certify a proxy. You run the proxy technology that fits your environment, and OpenClaw routes normal process-local HTTP and WebSocket clients through it.
A proxy gives operators one network control point for outbound HTTP and WebSocket traffic. That can be useful even outside SSRF hardening:
fetchnode:httpnode:httpsProxy routing is a process-level guardrail for normal HTTP and WebSocket egress. It gives operators a fail-closed path for routing supported JavaScript HTTP clients through their own filtering proxy, but it is not an OS-level network sandbox and does not make OpenClaw certify the proxy's destination policy.
When
proxy.enabled=trueopenclaw gateway runopenclaw node runopenclaw agent --localtextOpenClaw process fetch -> operator-managed filtering proxy -> public internet node:http and https -> operator-managed filtering proxy -> public internet WebSocket clients -> operator-managed filtering proxy -> public internet
The public contract is the routing behavior, not the internal Node hooks used to implement it. OpenClaw Gateway control-plane WebSocket clients use a narrow direct path for local loopback Gateway RPC traffic when the Gateway URL uses
localhost127.0.0.1[::1]Internally, OpenClaw uses two process-level routing hooks for this feature:
fetchglobal-agentnode:httpnode:httpshttp.requesthttps.requesthttp.gethttps.getSome plugins own custom transports that need explicit proxy wiring even when process-level routing exists. For example, Telegram's Bot API transport uses its own HTTP/1 undici dispatcher and therefore honors process proxy env plus the managed
OPENCLAW_PROXY_URLThe proxy URL itself must use
http://CONNECThttp://127.0.0.1:3128While the proxy is active, OpenClaw clears
no_proxyNO_PROXYGLOBAL_AGENT_NO_PROXYlocalhost127.0.0.1On shutdown, OpenClaw restores the previous proxy environment and resets cached process routing state.
proxy.enabledproxy.proxyUrlgateway.auth.mode: "trusted-proxy"openclaw proxyyamlproxy: enabled: true proxyUrl: http://127.0.0.1:3128
You can also provide the URL through the environment, while keeping
proxy.enabled=truebashOPENCLAW_PROXY_URL=http://127.0.0.1:3128 openclaw gateway run
proxy.proxyUrlOPENCLAW_PROXY_URLIf
enabled=trueFor managed gateway services started with
openclaw gateway startbashopenclaw config set proxy.enabled true openclaw config set proxy.proxyUrl http://127.0.0.1:3128 openclaw gateway install --force openclaw gateway start
The environment fallback is best for foreground runs. If you use it with an installed service, put
OPENCLAW_PROXY_URL$OPENCLAW_STATE_DIR/.env~/.openclaw/.envFor
openclaw --container ...OPENCLAW_PROXY_URL127.0.0.1The proxy policy is the security boundary. OpenClaw cannot verify that the proxy blocks the right targets.
Configure the proxy to:
CONNECTUse this denylist as the starting point for any forward proxy, firewall, or egress policy.
OpenClaw application-level classifier logic lives in
src/infra/net/ssrf.tssrc/shared/net/ip.tsBLOCKED_HOSTNAMESBLOCKED_IPV4_SPECIAL_USE_RANGESBLOCKED_IPV6_SPECIAL_USE_RANGESRFC2544_BENCHMARK_PREFIX| Range or host | Why to block |
|---|---|
text 127.0.0.0/8text localhosttext localhost.localdomain | IPv4 loopback |
text ::1/128 | IPv6 loopback |
text 0.0.0.0/8text ::/128 | Unspecified and this-network addresses |
text 10.0.0.0/8text 172.16.0.0/12text 192.168.0.0/16 | RFC1918 private networks |
text 169.254.0.0/16text fe80::/10 | Link-local addresses and common cloud metadata paths |
text 169.254.169.254text metadata.google.internal | Cloud metadata services |
text 100.64.0.0/10 | Carrier-grade NAT shared address space |
text 198.18.0.0/15text 2001:2::/48 | Benchmarking ranges |
text 192.0.0.0/24text 192.0.2.0/24text 198.51.100.0/24text 203.0.113.0/24text 2001:db8::/32 | Special-use and documentation ranges |
text 224.0.0.0/4text ff00::/8 | Multicast |
text 240.0.0.0/4 | Reserved IPv4 |
text fc00::/7text fec0::/10 | IPv6 local/private ranges |
text 100::/64text 2001:20::/28 | IPv6 discard and ORCHIDv2 ranges |
text 64:ff9b::/96text 64:ff9b:1::/48 | NAT64 prefixes with embedded IPv4 |
text 2002::/16text 2001::/32 | 6to4 and Teredo with embedded IPv4 |
text ::/96text ::ffff:0:0/96 | IPv4-compatible and IPv4-mapped IPv6 |
If your cloud provider or network platform documents additional metadata hosts or reserved ranges, add those too.
Validate the proxy from the same host, container, or service account that runs OpenClaw:
bashopenclaw proxy validate --proxy-url http://127.0.0.1:3128
By default, when no custom destinations are provided, the command checks that
https://example.com/--proxy-url--allowed-url--denied-urlUse
--jsonjson{ "ok": true, "config": { "enabled": true, "proxyUrl": "http://127.0.0.1:3128/", "source": "override", "errors": [] }, "checks": [ { "kind": "allowed", "url": "https://example.com/", "ok": true, "status": 200 } ] }
You can also validate manually with
curlbashcurl -x http://127.0.0.1:3128 https://example.com/ curl -x http://127.0.0.1:3128 http://127.0.0.1/ curl -x http://127.0.0.1:3128 http://169.254.169.254/
The public request should succeed. The loopback and metadata requests should be blocked by the proxy. For
openclaw proxy validate--denied-urlThen enable OpenClaw proxy routing:
bashopenclaw config set proxy.enabled true openclaw config set proxy.proxyUrl http://127.0.0.1:3128 openclaw gateway run
or set:
yamlproxy: enabled: true proxyUrl: http://127.0.0.1:3128
nettlshttp2localhostws://127.0.0.1:18789ws://[::1]:18789ws://localhost:18789© 2024 TaskFlow Mirror
Powered by TaskFlow Sync Engine