Overview
Layer 0: Proxy routing
When configured. All outbound traffic fromclaude goes through your proxy.
HTTPS_PROXY,HTTP_PROXY,ALL_PROXYset to proxy URLNO_PROXYset tolocalhost,127.0.0.1- Auto-relay when TUN detected
ANTHROPIC_API_KEY preserved.
Layer 1: Device fingerprint spoofing
Every environment generates unique device identifiers:
Spoofed at two levels: shell shims (for command-line tools) and Node.js hooks (for programmatic access).
Layer 2: Telemetry environment variables
Layer 3: HOSTALIASES
Maps telemetry domains to0.0.0.0 via the HOSTALIASES environment variable:
gethostbyname() level — a backup for DNS guard.
Layer 4: DNS guard + fetch interception
cac-dns-guard.js is loaded via NODE_OPTIONS --require:
- Intercepts
dns.lookup()anddns.resolve()to block telemetry domains - Replaces
global.fetchto block/redirect telemetry requests - Manages
NO_PROXYfor health check bypass timing
Layer 5: Health check bypass
Claude Code pingsapi.anthropic.com/api/hello at startup. Through a proxy, Cloudflare returns 403 due to Node.js TLS fingerprint rejection (JA3/JA4).
cac’s dns-guard.js uses in-process Node.js interception: it patches https.request and fetch so that calls to this URL immediately return a fake HTTP 200 — no local server, no port binding, no root needed. The interception is entirely in-process and produces no network traffic.
Only active when proxy is configured.
Layer 6: mTLS certificates
Each environment has a client certificate signed by cac’s CA (~/.cac/ca/ca_cert.pem). Injected via:
CAC_MTLS_CERT/CAC_MTLS_KEY— cert pathsNODE_EXTRA_CA_CERTS— CA trust
Layer 7: Config isolation
CLAUDE_CONFIG_DIR points to ~/.cac/envs/<name>/.claude/ instead of ~/.claude/. This isolates:
- Auth tokens (OAuth / session)
- Settings (
settings.json) - Project memory
- Session history
- Statsig state