AI coding tools

Proxy settings for terminal tools such as Claude Code, OpenAI Codex and Gemini CLI.

AI tools in the terminal usually ignore the system PAC, so they need environment variables or TUN mode.

Claude Code

bash
export HTTPS_PROXY=http://127.0.0.1:7898
claude
  • The Max (Residential) plan is recommended: Claude Code requests then take the residential line.
  • Don't switch exits often on the same account; CoderBoost's no-silent-fallback rule and node change quotas exist for exactly this reason.

OpenAI Codex CLI

bash
export HTTPS_PROXY=http://127.0.0.1:7898
codex

Gemini CLI

bash
export HTTPS_PROXY=http://127.0.0.1:7898
gemini

Others (Aider, OpenCode, vendor SDKs)

Almost every tool built on Python, Node.js, Go or Rust respects HTTPS_PROXY. For example, the Python SDKs:

python
# with the environment variable set, the openai / anthropic SDKs use the proxy automatically
import anthropic
client = anthropic.Anthropic()

Set it once with TUN

If you'd rather not set variables in every terminal, switch to TUN mode: AI domains on the list are taken over at the system level, including programs that ignore proxy variables.