From f7e190b193213612f74c934cf2e1b588a03f52fd Mon Sep 17 00:00:00 2001 From: Michael Neale Date: Fri, 9 Jan 2026 14:39:58 +1100 Subject: [PATCH] feat: http proxy support thanks from shanto12 (PR#6349 which has original code) --- ui/desktop/src/main.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/ui/desktop/src/main.ts b/ui/desktop/src/main.ts index b10b937e..2bf4fce7 100644 --- a/ui/desktop/src/main.ts +++ b/ui/desktop/src/main.ts @@ -132,6 +132,23 @@ async function ensureTempDirExists(): Promise { return gooseTempDir; } +async function configureProxy() { + const httpsProxy = process.env.HTTPS_PROXY || process.env.https_proxy; + const httpProxy = process.env.HTTP_PROXY || process.env.http_proxy; + const noProxy = process.env.NO_PROXY || process.env.no_proxy || ''; + + const proxyUrl = httpsProxy || httpProxy; + + if (proxyUrl) { + console.log('[Main] Configuring proxy'); + await session.defaultSession.setProxy({ + proxyRules: proxyUrl, + proxyBypassRules: noProxy, + }); + console.log('[Main] Proxy configured successfully'); + } +} + if (started) app.quit(); if (process.env.ENABLE_PLAYWRIGHT) { @@ -1806,6 +1823,8 @@ const focusWindow = () => { }; async function appMain() { + await configureProxy(); + // Ensure Windows shims are available before any MCP processes are spawned await ensureWinShims();