Repository navigation
fix(agent): check for updates through the configured proxy - #1531
Merged
Merged
Conversation
The updater's HTTP client called `.no_proxy()`, so on networks that reach the internet only through a proxy, update checks failed while sign-in, billing and model traffic worked. Use the same proxy settings as the rest of the app: the proxy variables, then the system's manual proxy setting. A proxy cannot change what installs, because the feed must carry a pinned-key signature and each payload must match the signed size and SHA-256. Failed checks, downloads and saved-update verifications now log their cause. A child-process test sets HTTP_PROXY and points the feed at a closed port, so the check succeeds only through the proxy. It fails with `.no_proxy()`. Fixes #1528 Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
Fixes #1528.
The updater's HTTP client was built with
.no_proxy(), so on a network that reaches the internet only through a proxy, Maple Work never found an update. Sign-in, billing and model traffic went through the proxy on the same machine; only update checks connected directly and failed. Settings → About showed "Could not check for updates", and nothing was logged.Changes
.no_proxy(), so update checks and downloads use the same proxy settings as the rest of the app:HTTPS_PROXY/HTTP_PROXY, or else the Windows or macOS manual proxy setting (reqwest's defaultsystem-proxysupport).no_proxy()clients stay as they are, because both only talk to loopback: the local API test client and plain-HTTP MCP OAuth.warn, for exampleupdate check failed: update request failed: error sending request for url (…): client error (Connect): … Connection refused. The UI messages are unchanged. The only URLs in these lines are the fixed feed and package URLs, which carry no user data.docs/updates.mdsays which proxy settings apply and that PAC files are not read.Testing
update_checks_use_the_configured_proxyruns in a child process, because proxy variables are process-wide. It setsHTTP_PROXYto a test server and points the feed at a closed port, so the signed check can only succeed through the proxy. It also asserts that the proxy received the absolute-formGETfor the feed..no_proxy()restored, it fails withConnection refusedon the direct connection.Not covered
🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.