mirror of
https://github.com/element-hq/element-desktop
synced 2025-03-15 08:53:31 +01:00
Added the ability to specify a proxy for electron to connect through in the config.json file.
This commit is contained in:
parent
c2be98e3df
commit
e50281f11c
@ -696,7 +696,17 @@ app.on('ready', async () => {
|
|||||||
spellcheck: true,
|
spellcheck: true,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (vectorConfig['proxy']) {
|
||||||
|
console.log(`Starting electron through proxy: ${vectorConfig['proxy']}`);
|
||||||
|
mainWindow.webContents.session.setProxy({proxyRules: vectorConfig['proxy']})
|
||||||
|
.then(() => {
|
||||||
mainWindow.loadURL('vector://vector/webapp/');
|
mainWindow.loadURL('vector://vector/webapp/');
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
mainWindow.loadURL('vector://vector/webapp/');
|
||||||
|
}
|
||||||
|
|
||||||
Menu.setApplicationMenu(vectorMenu);
|
Menu.setApplicationMenu(vectorMenu);
|
||||||
|
|
||||||
// Create trayIcon icon
|
// Create trayIcon icon
|
||||||
|
Loading…
x
Reference in New Issue
Block a user