2026-05-14 OpenClaw outbound HTTP/HTTPS proxy on a rented ProxyMac Mac mini: why SSH exports lie and how launchd should inherit them
If you operate OpenClaw on a rented Apple Silicon Mac mini in Hong Kong, Japan, Korea, Singapore, or the United States, your laptop may already exit the internet through a corporate HTTP(S) proxy—while the mini itself does not magically inherit that path. Operators routinely export HTTP_PROXY=... inside SSH, watch model calls succeed, then ship a launchd LaunchAgent that inherits none of those variables and blame “OpenClaw latency.” This article gives (1) a crisp audience filter, (2) symptom patterns that mimic AI outages, (3) a four-mode proxy matrix, (4) a nine-step launchd encoding runbook, (5) a scenario table for PAC, split tunnel, and TLS inspection, plus (6) NO_PROXY footguns for stdio MCP. Pair it with MCP environment vs launchd, headless SSH checklist, split tunnel VPN routing, and gateway token JSON. For break-glass UI prompts use VNC; for SKU math use pricing; for path diagnostics use help.
Who must wire outbound HTTP(S) proxy explicitly for OpenClaw
Start with teams where the mini’s default route reaches the public internet without the same inspection chain as developer laptops. That includes regulated banks, OEM vendors with global ZTNA clients, and hybrid shops that only proxy 443 to approved SaaS domains. If your security baseline mandates explicit proxy credentials for non-browser daemons, assume OpenClaw’s gateway process needs the same contract. Conversely, if the mini already receives a transparent forward proxy via router policy, you may only need NO_PROXY tuning—but you still prove it with packet captures or curl -v evidence, not folklore.
- Quantitative gate: if
curl -I https://api.openai.comfrom SSH returns 407 without--proxybut succeeds with it, you are in the explicit-proxy bucket. - Latency gate: add 180–320 ms to model round-trips when traffic hairpins through a central proxy on another continent—budget MCP timeouts accordingly.
- Parallel gate: corporate proxies often cap concurrent CONNECT tunnels at 30–80; size OpenClaw parallelism below that ceiling before declaring instability.
Symptoms that masquerade as model outages or “bad regions”
HTTP-layer failures rarely surface as a polite Proxy Authentication Required banner inside JSONL. You more often see TLS handshake timeouts, abrupt connection resets after exactly 60 or 120 seconds, or partial streaming where the first tokens arrive then the socket dies when the proxy rekeys. Another mimic is DNS success with TCP hang—common when split DNS sends api.* to internal resolvers that only exist on the VPN interface your mini forgot to bring up. Before you move workloads from JP to SG, prove whether the failure reproduces on loopback curl with identical proxy flags.
HTTPS_PROXY alone fixes TLS endpoints, (3) whether stdio MCP still works—if yes, your regression is almost certainly outbound-only.
Decision matrix: static proxy vs PAC vs transparent vs none
| Mode | How OpenClaw sees it | launchd implication | Primary risk |
|---|---|---|---|
Static http://host:port |
Libraries read HTTP_PROXY/HTTPS_PROXY |
Must copy into plist EnvironmentVariables |
Secrets in world-readable plist if chmod wrong |
| PAC / WPAD URL | Runtime may ignore unless app resolves PAC | Often need wrapper exporting resolved proxy | PAC JS changes without notice—pin versions in Git |
| Transparent intercept | No env vars; MITM presents corporate CA | Trust store must include CA in system keychain | Custom CA rotation breaks TLS until renewed |
| None (direct) | Public egress from mini region | Still set NO_PROXY for localhost MCP |
Accidental exfil if future policy adds proxy |
Nine-step runbook: from SSH proof to launchd parity
- Inventory variables: collect
HTTP_PROXY,HTTPS_PROXY,ALL_PROXY,NO_PROXY, and any vendor-specific keys your IT names. - Prove curl parity: run
curl -v --proxy http://proxy:8080 https://api.anthropic.comon the mini and archive the verbose log. - Encode plist env: mirror the winning values into
EnvironmentVariables; avoid referencing shell-only~/.zshrcexports per MCP env guide. - Split secrets: keep embedded basic-auth out of tickets—use launchd-friendly secret files referenced from plist as in token JSON article.
- NO_PROXY hygiene: include
127.0.0.1,localhost,*.localplus RFC1918 ranges your MCP uses. - VPN alignment: if laptops rely on full tunnel, confirm mini routes with split vs full tunnel guide before chasing provider SLAs.
- launchctl smoke:
launchctl kickstartthe agent and diff JSONL outbound lines against SSH foreground. - Soak test: run 500 sequential model calls at 3 concurrent workers to surface proxy connection caps.
- Rollback: keep previous plist revision in Git;
bootoutand restore within 2 minutes if error rates spike.
sudo -E in production LaunchAgents—it widens the attack surface and still drops variables children do not propagate to MCP forks consistently.
Corporate egress scenario table (pick your row before tuning timeouts)
| Scenario | Observable signal | OpenClaw tuning lever |
|---|---|---|
| Central EU proxy, mini in US | RTT adds > 220 ms vs direct | Raise HTTP client timeouts; lower parallel in-flight |
| Zscaler with SSL inspection | TLS alert unknown CA | Install corporate root in System keychain + reboot trust cache |
| Split tunnel omitting mini subnet | DNS resolves, SYN never completes | Fix VPN client route table; mirror laptop policy on mini |
| Proxy auth rotation every 12h | 407 bursts at shift change | Use managed credential helper or short-lived tokens |
Pitfalls: NO_PROXY mistakes that break stdio MCP while models look “fine”
stdio MCP servers bind to 127.0.0.1 high ports. If NO_PROXY is empty, some HTTP stacks still try to tunnel loopback through the proxy—resulting in bizarre half-working toolchains where the model answers but every filesystem tool times out. Conversely, an overly broad NO_PROXY=* disables the proxy entirely and can violate compliance. Prefer explicit comma lists and test with curl --noproxy '*' http://127.0.0.1:8765/health versus proxied calls. Document the final string beside your plist in the same repo that tracks headless checklist outputs so auditors see intent.
export HTTP_PROXY=http://proxy.corp.local:8080 HTTPS_PROXY=http://proxy.corp.local:8080 NO_PROXY=127.0.0.1,localhost,169.254.169.254
FAQ
Does OpenClaw honor lowercase vs uppercase env vars? Many libraries accept both; pick one convention per fleet and stick to it—mixed case doubles confusion during incidents.
Should SOCKS proxies use ALL_PROXY? Often yes for tools that are not HTTP-aware; verify with the same curl matrix you used for HTTPS.
What if IT forbids storing proxy passwords on disk? Use short-lived PAC or negotiate header injection via sidecar helper; still avoid interactive prompts on headless fleets—see VNC only for one-time trust prompts.
Why ProxyMac Mac mini is the right place to harden OpenClaw egress
Rented Mac mini M4 nodes give you native macOS trust stores, predictable single-tenant CPU for TLS-heavy proxy hops, and region choice across HK / JP / KR / SG / US so inference control planes sit closer to provider endpoints than a lone EU bastion. You keep SSH for receipts, help articles for cross-region playbooks, and pricing transparent when you need another mini to isolate prod vs staging egress policies—without buying five closets of hardware.
Stabilize OpenClaw behind corporate egress
launchd · HTTP_PROXY · HK / JP / KR / SG / US