[BUG] Claude Code Web: crates.io blocked by proxy in cloud environment despite being trusted by default
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Product: Claude Code (Web/Cloud)
Version: 2.0.23
Environment: Cloud/Remote environment (CLAUDE_CODE_REMOTE_ENVIRONMENT_TYPE=cloud_default)
Description
When running cargo commands in a cloud-based Claude Code session, all attempts to access crates.io fail with 403 Forbidden errors, even though the documentation states that crates.io is trusted by default.
Expected Behavior
According to the documentation (https://docs.claude.com/en/docs/claude-code/claude-code-on-the-web), crates.io should be accessible by default in Claude Code environments.
Actual Behavior
All cargo operations that need to fetch dependencies fail with:
error: failed to get <package> as a dependency of package <project>
Caused by:
download of config.json failed
Caused by:
failed to get successful HTTP response from https://index.crates.io/config.json (<proxy_ip>), got 403
body:
Access denied
Root Cause
The cloud environment routes all HTTP/HTTPS traffic through a proxy server. The proxy's NO_PROXY configuration does not include crates.io or index.crates.io, causing all requests to be blocked:
Environment variables (IPs redacted):
HTTPS_PROXY=http://<container_auth>@<proxy_ip>:15002
HTTP_PROXY=http://<container_auth>@<proxy_ip>:15002
NO_PROXY=localhost,127.0.0.1,169.254.169.254,metadata.google.internal,.svc.cluster.local,.local,.googleapis.com,.google.com
Missing from NO_PROXY: *.crates.io, index.crates.io
Impact
Cannot compile Rust projects in cloud Claude Code sessions
Cannot run cargo check, cargo test, or cargo build
Cannot verify code quality before committing
Rust development workflow is completely blocked in cloud environments
Reproduction Steps
Open Claude Code in a cloud/web environment
Navigate to any Rust project with dependencies
Run cargo check or any cargo command that fetches dependencies
Observe 403 error from proxy
Suggested Fix
Add the following to the NO_PROXY environment variable in cloud Claude Code containers:
*.crates.io
index.crates.io
static.crates.io
Workaround
None available. cargo check --offline fails if dependencies aren't already cached.
Additional Context
This appears to be specific to cloud/remote environments
Local Claude Code installations are not affected
The proxy configuration is set by the cloud infrastructure, not user-configurable
Environment variable CLAUDE_CODE_REMOTE_ENVIRONMENT_TYPE=cloud_default indicates cloud deployment
What Should Happen?
Based on the documentation at https://docs.claude.com/en/docs/claude-code/claude-code-on-the-web, crates.io should be accessible by default in Claude Code environments.
Expected behavior:
cargo check should successfully download dependencies from crates.io
cargo build should compile Rust projects without network errors
cargo test should run tests after fetching dependencies
All crates.io domains (index.crates.io, static.crates.io, etc.) should bypass the proxy or be whitelisted
Currently: All cargo commands that require dependency resolution fail with 403 Forbidden errors because the cloud environment's proxy blocks crates.io
Error Messages/Logs
Error Messages/Logs
error: failed to get `anyhow` as a dependency of package
Caused by:
download of config.json failed
Caused by:
failed to get successful HTTP response from `https://index.crates.io/config.json` (proxy_ip_redacted), got 403
body:
Access denied
Steps to Reproduce
- Open Claude Code in a web browser (cloud environment)
- Clone or navigate to any Rust project with dependencies in Cargo.toml
- Run the command: cargo check
- Observe the error:
failed to get successful HTTP response from https://index.crates.io/config.json
(Optional) Verify proxy configuration:
env | grep -i "proxy"
- Notice that NO_PROXY does not include crates.io domains
Alternative reproduction:
- In cloud Claude Code, run: cargo new test_project
- Add any dependency to Cargo.toml, e.g., serde = "1.0"
- Run: cargo build
- Observe 403 error when attempting to fetch crate index
Claude Model
Not sure / Multiple models
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
2.0.25
Platform
Other
Operating System
Other
Terminal/Shell
Other
Additional Information
This is only happening in Claude Code Web
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗