Answer: Claude Code supports two methods for routing sampling requests through a proxy: setting ANTHROPIC_BASE_URL (simple but only for sampling API requests) or setting HTTP_PROXY / HTTPS_PROXY (system-wide). Status: Confirmed Entry: tool/claude-code/permissions-and-security/configure-proxy-for-credentials Revision: 3 Digest: sha256:ae77b2924dce7263 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:02:55Z Last changed: 2026-11-18T12:12:55Z (Option 2 example: export HTTP_PROXY="http://localhost:8080" → http://localhost:8080) Last verified: 2026-11-20T12:17:08Z Next check: 2026-11-21T12:17:08Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of Option 1 variable | ANTHROPIC_BASE_URL | [1] | 2026-11-20 Option 1 example | http://localhost:8080 | [1] | 2026-11-20 Option 2 example | http://localhost:8080 | [1] | 2026-11-20 Sources: [1] Anthropic. "Securely deploying AI agents". https://code.claude.com/docs/en/agent-sdk/secure-deployment.md Role: primary. Accessed: 2026-11-20T12:17:08Z Quote: "**Option 1: ANTHROPIC\_BASE\_URL (simple but only for sampling API requests)** ```bash theme={null} export ANTHROPIC_BASE_URL" (Supports: Option 1 variable) Quote: "export ANTHROPIC_BASE_URL="http://localhost:8080"" (Supports: Option 1 example) Quote: "export HTTP_PROXY="http://localhost:8080"" (Supports: Option 2 example) Published: 2026-11-20T02:56:32Z Snapshot SHA-256: 1d1ad468499aa0fe108ba85c10f0be7697958d9287cb77d67d439f2ca880fa02 (captured 2026-11-17T12:21:16Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-17T12:21:16Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T12:17:08Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:17:08Z Last attempt: 2026-11-20T12:17:08Z Notes and limitations: Extracted automatically from a single official source (section "Configuring Claude Code to use a proxy"). Related: https://latestn.com/tool/claude-code/permissions-and-security/configure-security-policies What security policies should organizations configure for Claude Code? https://latestn.com/tool/claude-code/permissions-and-security/control-custom-tool-access How do I control which custom tools Claude Code can access or require approval for? https://latestn.com/tool/claude-code/permissions-and-security/control-permissions How do I control what Claude Code is allowed to do? https://latestn.com/tool/claude-code/permissions-and-security/choose-sandbox-for-threat-model How do I choose the right sandbox environment for my threat model in Claude Code? https://latestn.com/tool/claude-code/permissions-and-security/cloud-network-access-levels What network access levels can I choose for a Claude Code cloud environment and how do I allow specific domains? https://latestn.com/tool/claude-code/permissions-and-security/compare-sandbox-approaches Which sandbox environment options does Claude Code offer and how do they compare? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-18T12:12:55Z | changed | Option 2 example: export HTTP_PROXY="http://localhost:8080" → http://localhost:8080 | [1] 2026-11-18T12:12:55Z | changed | Option 1 example: export ANTHROPIC_BASE_URL="http://localhost:8080" → http://localhost:8080 | [1] 2026-11-15T12:16:37Z | changed | Option 1 variable: — → ANTHROPIC_BASE_URL | [1] 2026-11-15T12:16:37Z | changed | Option 1: ANTHROPIC_BASE_URL → — | [1] 2026-11-13T03:02:55Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/claude-code/permissions-and-security/configure-proxy-for-credentials/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/claude-code/permissions-and-security/configure-proxy-for-credentials POST: https://latestn.com/dispute/tool/claude-code/permissions-and-security/configure-proxy-for-credentials with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/claude-code/permissions-and-security/configure-proxy-for-credentials?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I configure Claude Code to use a proxy for credential management? Revision 3, last verified 2026-11-20T12:17:08Z. https://latestn.com/tool/claude-code/permissions-and-security/configure-proxy-for-credentials (accessed 2026-11-21T09:58:31Z). @misc{LatestN_tool_claude_code_permissions_and_security_configure_proxy_for_credentials_r3, title = {How do I configure Claude Code to use a proxy for credential management?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/claude-code/permissions-and-security/configure-proxy-for-credentials}}, note = {Revision 3; digest sha256:ae77b2924dce7263; last verified 2026-11-20T12:17:08Z; accessed 2026-11-21T09:58:31Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/claude-code/permissions-and-security/configure-proxy-for-credentials