Skip to content

Add proxy support for "Check for Updates" (#314)#337

Merged
erikdarlingdata merged 1 commit into
devfrom
fix/issue-314-proxy-support
May 18, 2026
Merged

Add proxy support for "Check for Updates" (#314)#337
erikdarlingdata merged 1 commit into
devfrom
fix/issue-314-proxy-support

Conversation

@erikdarlingdata
Copy link
Copy Markdown
Owner

Summary

Fixes #314. James reported that "Check for Updates" fails behind a corporate proxy because neither Velopack nor the HttpClient fallback was sending Windows credentials to the proxy.

In his follow-up he confirmed his proxy is auto-discovered for most apps but SSMS 25 needed manual address + on-prem AD user/pass, so both modes are wired:

  • System (default) — system-discovered proxy + Windows default credentials. Solves the auto-detect / NTLM / Negotiate case with no UI.
  • Manual — proxy address + optional username/password (stored via the existing ICredentialService, i.e. Windows Credential Manager / macOS Keychain).

Both update paths go through the same ProxyHttpHandlerFactory:

  • UpdateChecker (GitHub API fallback) builds its HttpClient from it.
  • ProxyAwareDownloader overrides HttpClientFileDownloader.CreateHttpClientHandler and is passed as the 4th arg to Velopack.Sources.GithubSource.

Also addresses the UX items James asked for:

  • The error text is wrapped (was being truncated)
  • "Open the releases page in your browser" link appears when the check fails, so the user can update manually

A few rough edges fixed along the way:

  • SettingsFile.Update is merge-safe — MCP and proxy saves no longer stomp each other
  • Password is never round-tripped through the UI (TextBox.PasswordChar only masks the glyph; the cleartext would still live in the visual/accessibility tree). Watermark shows "(saved — leave blank to keep)".
  • Velopack errors used to be silently swallowed before the fallback API check — which hid the actual [FEATURE] Check for Updates from behind a Proxy Server #314 error. Now surfaced if both checks fail.

Test plan

  • Default install on a non-proxy machine: Check for Updates works (System mode, no proxy in play)
  • @jamesrudolph behind his corporate proxy: System mode works without entering any credentials
  • Manual mode with proxy address + AD username/password works (the SSMS 25 case)
  • After typing a password and saving, re-opening About shows watermark and does not re-prompt
  • If both Velopack and the GitHub API check fail, error text wraps and "Open releases page" link appears

🤖 Generated with Claude Code

Corporate-proxy users were hitting "Check for Updates" failures because
neither Velopack's downloader nor the HttpClient fallback was sending
Windows credentials to the proxy. James (issue #314) confirmed his proxy
is auto-discovered for most apps but SSMS 25 needed manual address +
on-prem AD user/pass, so both paths are needed.

* ProxySettings — "System" (default) sends Windows credentials to the
  auto-discovered proxy; "Manual" lets the user enter address + optional
  username/password. Password is held in the existing ICredentialService
  (Windows Credential Manager / macOS Keychain).
* ProxyHttpHandlerFactory — single source of truth for proxy wiring on
  HttpClientHandler. Used by both UpdateChecker (GitHub API fallback)
  and ProxyAwareDownloader (Velopack's IFileDownloader override).
* ProxyAwareDownloader subclasses Velopack.Sources.HttpClientFileDownloader
  and snapshots ProxySettings at construction so retries/redirects don't
  re-read DPAPI.
* SettingsFile — merge-safe JSON read/update so the MCP and Proxy save
  paths don't stomp each other.
* AboutWindow — proxy settings UI (radio + collapsed manual grid). The
  password field is intentionally not round-tripped through the UI;
  watermark says "(saved — leave blank to keep)". Status text now wraps.
  When the update check fails, a "Open the releases page in your browser"
  link is shown as a manual-download fallback.
* If Velopack itself fails (the actual #314 symptom), its error is now
  surfaced alongside the API fallback error instead of being swallowed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@erikdarlingdata erikdarlingdata merged commit c7e4e64 into dev May 18, 2026
2 checks passed
@erikdarlingdata erikdarlingdata deleted the fix/issue-314-proxy-support branch May 18, 2026 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant