# Agent behind a corporate proxy: configure it or nothing leaves

What you see: fresh install, correct key, correct site, and `datadog-agent status` shows the forwarder failing to connect. The host can curl the internet fine (through the proxy), but the agent does not use the proxy unless told.

## Fix

Set the proxy in `datadog.yaml` (host) or the equivalent env vars (containers):

- `proxy.http` / `proxy.https`: the proxy URL.
- `proxy.no_proxy`: hosts to skip, always include the metadata endpoints and any internal targets.

Restart the agent. The forwarder should start accepting payloads.

## Checklist when it still fails

1. **Proxy auth.** If the proxy needs credentials, they go in the proxy URL or the config, and special characters need encoding.
2. **no_proxy gaps.** APM and DogStatsD traffic to the local agent must not go through the proxy; metadata endpoints too.
3. **Egress allowlist.** The firewall must allow the proxy to reach the Datadog intake endpoints for your site. The site docs list the domains; give the list to whoever runs the proxy.
4. **Tracer proxy.** App tracers ship to the agent locally, so they usually do not need proxy config, but serverless/extension paths might.

## Trap

Setting `HTTP_PROXY` on the host and assuming the agent picks it up. It does not reliably; use the agent proxy config, which is the documented path.