VPN & proxies
ReCodex only handles Codex and OpenAI traffic; everything else keeps going through your VPN or proxy.
ReCodex only handles traffic for Codex and OpenAI. When Codex browses the web, calls third-party MCP servers or reaches local services such as localhost:3000, that traffic still goes through your own VPN, proxy or system network.
While you use Codex Desktop, the handling extends to OpenAI / ChatGPT traffic from the whole computer; see Using Codex Desktop.
Usually nothing to set up
Each time the background service starts, it takes the proxy environment variables (such as HTTPS_PROXY) from the terminal that started it; if that terminal has none, it reads the system proxy settings (on Linux, only GNOME's system proxy). In most cases you don't need to configure anything.
Once started, the background service keeps using those settings. After switching VPNs or proxies, run gcodex config network reload in a terminal that has the new settings; there's no need to restart Codex.
When you need to set it yourself
If Codex chats work but third-party websites or MCP servers can't connect, your proxy usually wasn't detected:
| Command | What it does |
|---|---|
gcodex config network current | Show the network and proxy currently in use |
gcodex config network set <proxy URL> | Set a proxy: http://, https://, socks5:// or socks5h://; a bare host:port is treated as an HTTP proxy |
gcodex config network auto | Clear the manual setting and detect again from the current terminal and system settings |
gcodex config network reload | Detect again from the current terminal and system settings; applies to new connections immediately |
PAC auto-configuration is not supported
If your system proxy uses PAC / WPAD auto-configuration, gcodex can't use it: in gcodex status the third-party egress shows 本机网络配置不可用 ("local network configuration unavailable") along with 本机网络不可用: localnet: system PAC/WPAD is enabled; configure a static upstream proxy explicitly. Use gcodex config network set with the fixed address from your proxy app, such as http://127.0.0.1:7890.
Windows: “Automatically detect settings” counts as auto-configuration
When “Automatically detect settings” is on under Windows Settings → Network & internet → Proxy, you get the same message. If you use a proxy, set its address with gcodex config network set; if you don't, turn “Automatically detect settings” off and run gcodex config network auto.