Skip to content

fix(desktop): respect proxy environment#25846

Merged
Hona merged 3 commits intoanomalyco:devfrom
Hona:fix/desktop-env-proxy-25843
May 5, 2026
Merged

fix(desktop): respect proxy environment#25846
Hona merged 3 commits intoanomalyco:devfrom
Hona:fix/desktop-env-proxy-25843

Conversation

@Hona
Copy link
Copy Markdown
Member

@Hona Hona commented May 5, 2026

Summary

  • Enable Node 24 env proxy handling in Desktop before the embedded server starts.
  • Keeps loopback in NO_PROXY so local sidecar traffic stays direct.

Fixes #25843

Testing

  • bun typecheck (packages/desktop)
  • bun turbo typecheck
  • local Node 24 proxy repro confirmed fetch sends CONNECT through HTTPS_PROXY after setGlobalProxyFromEnv()

Copilot AI review requested due to automatic review settings May 5, 2026 09:55
@Hona Hona requested a review from adamdotdevin as a code owner May 5, 2026 09:55
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Desktop main process startup to enable Node’s environment-driven proxy handling (HTTP_PROXY / HTTPS_PROXY / NO_PROXY) before the embedded server is started, addressing proxy-related failures in GitHub Copilot authentication on Windows.

Changes:

  • Call a new useEnvProxy() hook during setupApp() startup.
  • Add a useEnvProxy() helper that invokes Node’s http.setGlobalProxyFromEnv() (when available) and logs a warning on failure.
  • Import node:http to access the Node proxy bootstrap API.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/desktop/src/main/index.ts
@Hona Hona merged commit 465c83c into anomalyco:dev May 5, 2026
8 checks passed
oleksii-honchar pushed a commit to oleksii-honchar/better-opencode that referenced this pull request May 6, 2026
thdxr pushed a commit that referenced this pull request May 6, 2026
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.

After v1.14.33, OpenCode Desktop on Windows no longer respects proxy settings for GitHub Copilot authentication.

2 participants