mirror of
https://github.com/element-hq/element-desktop
synced 2025-03-14 16:37:50 +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,
|
||||
},
|
||||
});
|
||||
mainWindow.loadURL('vector://vector/webapp/');
|
||||
|
||||
if (vectorConfig['proxy']) {
|
||||
console.log(`Starting electron through proxy: ${vectorConfig['proxy']}`);
|
||||
mainWindow.webContents.session.setProxy({proxyRules: vectorConfig['proxy']})
|
||||
.then(() => {
|
||||
mainWindow.loadURL('vector://vector/webapp/');
|
||||
});
|
||||
} else {
|
||||
mainWindow.loadURL('vector://vector/webapp/');
|
||||
}
|
||||
|
||||
Menu.setApplicationMenu(vectorMenu);
|
||||
|
||||
// Create trayIcon icon
|
||||
|
Loading…
x
Reference in New Issue
Block a user