fix(updater): route update check/download/install through the app proxy#188
Merged
Conversation
github_client() already followed the app proxy for manifest lookup, but build_updater() left tauri-plugin-updater's own client untouched, so the authoritative check() and download_and_install() connected to GitHub directly (or silently picked up unrelated OS proxy env vars). Resolve the same app-proxy config into a Url for the updater builder so the whole update flow behaves consistently. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
Summary
github_client()(manifest existence probe + release feed lookup) already routed through the app proxy, butbuild_updater()lefttauri-plugin-updater's own internal client untouched — the authoritativeupdater.check()andupdate.download_and_install()connected to GitHub directly, ignoring the app proxy setting (or silently picking up unrelated OS-level proxy env vars).system_proxy::current_proxy_url()to resolve the current app-proxy config into aUrlfor consumers that configure their own client (rather than reusingclient_builder()), and wired it intobuild_updater():.proxy(url)when enabled,.no_proxy()when disabled, matching the "single source of truth, no OS env leakage" behavior used elsewhere insystem_proxy.rs.UpdaterBuilder'sproxy/no_proxyfields flow through to bothUpdater::check()and the resultingUpdate::download_and_install(), this one change covers the entire update flow (check, download, install).Test plan
cargo testforservices::system_proxy::tests::*(8 tests, incl. newcurrent_proxy_url_reflects_mode) andcommands::app_commands::update::tests::*(5 tests) — all passcargo check/cargo clippy— no new warnings🤖 Generated with Claude Code