Add HTTP Proxy support

Status Fixed / completed
Maintainer reply None cached
Activity 6 comments · opened Feb 28, 2025 · closed Mar 6, 2025

claude currently fails behind an HTTP proxy. Nothing in the documentation says how to configure a proxy server, AFAICS.

This is a mandatory feature for entreprise use.

View original on GitHub ↗

6 Comments

Az0s · 1 year ago

I'm also facing the same issue with claude-code failing behind an HTTP proxy. I've tried using proxychains4 to route its traffic through the proxy, but that didn't work.

I've confirmed that proxychains4 works with other applications. I'm wondering if this is a intended behavior.

teddytomas · 1 year ago

I am also facing same issue. It is failing behind corporate firewall and I have found no docs or way to connect. I can definitely get it to work on my personal pc. This is on a mac. I get error oauth failed, with very little diagnostics.

ghost · 1 year ago

Thank you for the suggestion! the latest version now supports setting HTTPS_PROXY env var

tomasdelvechio · 1 year ago
Thank you for the suggestion! the latest version now supports setting HTTPS_PROXY env var

What is this "latest version"? I intall the version 0.2.36 (Claude Code) today, I have the HTTPS_PROXY env var in the shell (zsh) and still I get

╭────────────────────────────────────────────╮
│ ✻ Welcome to Claude Code research preview! │
╰────────────────────────────────────────────╯

 Unable to connect to Anthropic services

 Failed to connect to api.anthropic.com: Request failed with status code 503

 Please check your internet connection and network settings.
makecent · 1 year ago

@levpopov Claude Code 0.2.44 uses HTTPS_PROXY for itself but NOT for the API, so it still doesn’t work.

luchongkai@Lus-MacBook-Pro Chatigo % claude --version
0.2.44 (Claude Code)
luchongkai@Lus-MacBook-Pro Chatigo % claude 
╭───────────────────────────────────────────────────╮
│ ✻ Welcome to Claude Code research preview!        │
│                                                   │
│   /help for help                                  │
│                                                   │
│   cwd: /Users/luchongkai/PycharmProjects/Chatigo  │
╰───────────────────────────────────────────────────╯

 What's new:

  • Ask Claude to make a plan with thinking mode: just say 'think' or 'think harder' or even 'ultrathink'
  • MCP server startup timeout can now be configured via MCP_TIMEOUT environment variable
  • MCP server startup no longer blocks the app from starting up
  • New /release-notes command lets you view release notes at any time
  • `claude config add/remove` commands now accept multiple values separated by commas or spaces

> /init is analyzing your codebase… 
  ⎿  API Error: 403 {"error":{"type":"forbidden","message":"Request not allowed"}}
github-actions[bot] · 1 year ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.