fix: 修复https_proxy环境变量无法设置的bug
parent
70ae907b5b
commit
7fef19d572
|
@ -71,8 +71,10 @@ async function _winSetProxy (exec, ip, port, setEnv) {
|
|||
const proxyPath = extraPath.getProxyExePath()
|
||||
await execFile(proxyPath, ['global', `${ip}:${port}`, lanIpStr])
|
||||
|
||||
if (setEnv == null) {
|
||||
if (setEnv) {
|
||||
log.info('同时设置 https_proxy')
|
||||
try {
|
||||
await exec('echo \'test\'')
|
||||
await exec('echo \'test\'')
|
||||
await exec(`setx HTTPS_PROXY "http://${ip}:${port}/"`)
|
||||
// await addClearScriptIni()
|
||||
|
@ -94,7 +96,7 @@ const executor = {
|
|||
} else {
|
||||
// 设置代理
|
||||
|
||||
log.info('设置代理', ip, port)
|
||||
log.info('设置代理', ip, port, setEnv)
|
||||
return _winSetProxy(exec, ip, port, setEnv)
|
||||
}
|
||||
},
|
||||
|
|
|
@ -119,7 +119,9 @@ function showWin () {
|
|||
if (win) {
|
||||
win.show()
|
||||
}
|
||||
app.dock.show()
|
||||
if (app.dock) {
|
||||
app.dock.show()
|
||||
}
|
||||
}
|
||||
|
||||
function changeAppConfig (config) {
|
||||
|
|
Loading…
Reference in New Issue