Repository navigation
Route local API requests through the proxy when it runs - #12
Merged
Merged
Conversation
The API runs each tool without the user's settings, so the proxy routes the app writes into those settings (HTTPS_PROXY for Claude Code, openai_base_url for Codex) were skipped and API traffic bypassed the proxy. Pass the route per request instead: the HTTPS proxy, its CA and NO_PROXY in the environment for Claude Code and Gemini CLI, and -c openai_base_url for Codex. Only while our service holds the port (and the CA exists), so a request never goes to a foreign listener; otherwise it goes direct as before.
redacid
pushed a commit
that referenced
this pull request
Dec 2, 2026
Version bump and changelog for routing local API requests through the proxy (#12).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requests to the local API did not show up in the proxy: the tools run without the user's settings (for isolation), and the proxy routes the app writes live in those settings.
Now the route is passed per request:
HTTPS_PROXY,NODE_EXTRA_CA_CERTS,NO_PROXYin the tool's environment.-c openai_base_url=<Codex listener>.Only while our service holds the port (and, for the HTTPS proxy, the CA file exists); otherwise the request goes direct, as before. The API never starts or waits for the proxy.
Tested:
make check(182 tests); Codex live through :8878 answered, mitmdump logged chatgpt.com. Claude Code and Gemini CLI not tested live.