feat: http proxy support

thanks from shanto12 (PR#6349 which has original code)
This commit is contained in:
Michael Neale
2026-01-09 14:39:58 +11:00
committed by GitHub
parent 9a01fcb740
commit f7e190b193
+19
View File
@@ -132,6 +132,23 @@ async function ensureTempDirExists(): Promise<string> {
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();