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();