Repository navigation
Conversation
Port of the v1 loopback exemption (anomalyco#52951, closed only as "port to v2"). With HTTP(S)_PROXY set and no NO_PROXY, every call to the local server on 127.0.0.1 routes through the proxy, which on offline or airgapped hosts stalls or fails instead of connecting. Append the loopback hosts to NO_PROXY/no_proxy at CLI entry before anything dials out, mirroring the desktop runtime's exemption, and re-apply it after service mode re-injects its saved environment so a stored proxy configuration cannot recapture loopback. Refs anomalyco#52054 Refs anomalyco#51247 Co-Authored-By: Claude Mythos 5 <[email protected]>
Contributor
|
The following comment was made by an LLM, it may be inaccurate: |
3 tasks done
3 tasks done
Collaborator
|
Closing in favor of #60441, which landed the loopback NO_PROXY fix (merging both spellings into one list). You're credited as a co-author there, thanks for the work on this. |
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.
Issue for this PR
Closes #52054
Related: #51247. This is the v2 port of #52951, which was closed with "please port it over and open it for V2".
Type of change
What does this PR do?
When
HTTP(S)_PROXYis set without aNO_PROXYexemption, the CLI's requests to its own local server — including the service probe loop and the TUI event stream — get routed through the proxy. With an unreachable or buffering proxy that shows up as the endless "Restarting service..." loop from #52054. The desktop app already upserts a loopbackNO_PROXYat startup; this ports the same helper to the CLI entrypoint (Env.ensureLoopbackNoProxy: upserts bothNO_PROXY/no_proxyspellings, appends only missing hosts, preserves existing user values, case-insensitive dedupe) and guards the service-mode env re-injection inserver-process.tsso a saved environment can't strip the exemption back out.How did you verify your code works?
Unit tests for the upsert helper in
packages/cli/test/env.test.ts(empty env, existingNO_PROXYvalues preserved and appended, already-present entries not duplicated);bun run typecheckclean inpackages/cli. The helper mirrors the desktop implementation that already ships.Screenshots / recordings
N/A — no UI change.
Checklist
🤖 Generated with Claude Code