新增启动参数-proxy-server与-proxy-bypass-list

This commit is contained in:
lyswhut
2022-01-04 15:27:25 +08:00
parent 36966e220c
commit b3ab05cc86
6 changed files with 31 additions and 5 deletions
+6
View File
@@ -37,6 +37,12 @@ if (process.platform == 'linux') app.commandLine.appendSwitch('use-gl', 'desktop
// https://github.com/electron/electron/issues/22691
app.commandLine.appendSwitch('wm-window-animations-disabled')
// proxy
if (global.envParams.cmdParams['proxy-server']) {
app.commandLine.appendSwitch('proxy-server', global.envParams.cmdParams['proxy-server'])
app.commandLine.appendSwitch('proxy-bypass-list', global.envParams.cmdParams['proxy-bypass-list'] ?? '<local>')
}
// if (global.envParams.cmdParams['proxy-pac-url']) app.commandLine.appendSwitch('proxy-pac-url', global.envParams.cmdParams['proxy-pac-url'])
const { navigationUrlWhiteList, themes } = require('../common/config')
const { getWindowSizeInfo, initSetting, updateSetting } = require('./utils')