Skip to content

Commit 885349d

Browse files
committed
docs: document Go module proxy setup in remote environment
The HTTP_PROXY/HTTPS_PROXY env vars are pre-configured in the Claude Code remote environment and Go's toolchain respects them automatically. Document this so future sessions don't waste time debugging module fetching. Also improve the troubleshooting section with actionable steps. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> https://claude.ai/code/session_01WLKDmB7kemgPsjsj9KFEXa
1 parent be1b039 commit 885349d

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

CLAUDE.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,13 @@ This document provides essential information for working with the sqlc codebase,
1414

1515
When running in the Claude Code remote environment (or any environment without Docker), you can install PostgreSQL and MySQL natively. The test framework automatically detects and uses native database installations.
1616

17+
### Network Proxy (Pre-configured)
18+
19+
The Claude Code remote environment routes outbound traffic through an HTTP proxy via the `HTTP_PROXY` and `HTTPS_PROXY` environment variables. **Go module operations (`go mod tidy`, `go mod download`, `go get`, etc.) work automatically** because Go's toolchain respects these variables. No extra configuration is needed for the Go module proxy (`proxy.golang.org`) or checksum database (`sum.golang.org`).
20+
1721
### Step 1: Configure apt Proxy (Required in Remote Environment)
1822

19-
The Claude Code remote environment requires an HTTP proxy for apt. Configure it:
23+
The apt package manager needs its own proxy configuration since it does not read `HTTP_PROXY`:
2024

2125
```bash
2226
bash -c 'echo "Acquire::http::Proxy \"$http_proxy\";"' | sudo tee /etc/apt/apt.conf.d/99proxy
@@ -306,9 +310,13 @@ POSTGRESQL_SERVER_URI="postgres://postgres:mysecretpassword@localhost:5432/postg
306310

307311
## Common Issues & Solutions
308312

309-
### Network Connectivity Issues
313+
### Network Connectivity / Go Module Proxy Issues
314+
315+
In the Claude Code remote environment, Go module fetching works automatically via the `HTTP_PROXY`/`HTTPS_PROXY` environment variables. If you see errors about `storage.googleapis.com` or `proxy.golang.org`:
310316

311-
If you see errors about `storage.googleapis.com`, the Go proxy may be unreachable. Tests may still pass for packages that don't require network dependencies.
317+
1. **Verify proxy vars are set:** `echo $HTTP_PROXY` (should be non-empty in the remote environment)
318+
2. **Test connectivity:** `go mod download 2>&1 | head` to check for errors
319+
3. **If proxy is not set** (e.g., local development without Docker), Go will try to reach `proxy.golang.org` directly, which requires internet access
312320

313321
### Test Timeouts
314322

0 commit comments

Comments
 (0)