Merge remote-tracking branch 'origin/master'
|
@ -1,6 +1,7 @@
|
|||
# 卸载与恢复网络
|
||||
由于应用启动后会自动设置系统代理,正常退出时会关闭系统代理。
|
||||
当应用意外关闭,或者未正常退出后被卸载,此时会因为系统代理没有恢复从而导致完全上不了网。
|
||||
由于应用启动后会自动设置系统代理,正常退出时会关闭系统代理。
|
||||
当应用意外关闭,或者未正常退出后被卸载,此时会因为系统代理没有恢复从而导致完全上不了网。
|
||||
目前electron在windows系统上无法监听系统重启事件。更多相关资料 [electron issues](https://github.com/electron/electron/pull/24261)
|
||||
|
||||
## 恢复代理设置
|
||||
### 1、windows 代理关闭
|
||||
|
@ -17,4 +18,4 @@
|
|||
|
||||
|
||||
### 3、Linux(Ubuntu)
|
||||
网络->代理->选择禁用
|
||||
网络->代理->选择禁用
|
||||
|
|
|
@ -14,5 +14,5 @@
|
|||
"ignore": []
|
||||
}
|
||||
},
|
||||
"version": "1.6.0"
|
||||
"version": "1.6.1"
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@docmirror/dev-sidecar",
|
||||
"version": "1.6.0",
|
||||
"version": "1.6.1",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@docmirror/dev-sidecar",
|
||||
"version": "1.6.0",
|
||||
"version": "1.6.1",
|
||||
"description": "给开发者的加速代理工具",
|
||||
"main": "src/index.js",
|
||||
"keywords": [
|
||||
|
@ -17,7 +17,7 @@
|
|||
"test": "mocha"
|
||||
},
|
||||
"dependencies": {
|
||||
"@docmirror/mitmproxy": "^1.6.0",
|
||||
"@docmirror/mitmproxy": "^1.6.1",
|
||||
"agentkeepalive": "^2.1.1",
|
||||
"babel-preset-es2020": "^1.0.2",
|
||||
"charset": "^1.0.0",
|
||||
|
|
|
@ -210,6 +210,7 @@ module.exports = {
|
|||
},
|
||||
mapping: {
|
||||
// 'assets.fastgit.org': 'usa',
|
||||
'*.electronjs.org': 'quad9',
|
||||
'*amazonaws.com': 'quad9',
|
||||
'*githubusercontent.com': 'quad9',
|
||||
'*yarnpkg.com': 'quad9',
|
||||
|
|
After Width: | Height: | Size: 43 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 519 B |
After Width: | Height: | Size: 853 B |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 353 KiB |
After Width: | Height: | Size: 519 B |
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@docmirror/dev-sidecar-gui",
|
||||
"version": "1.6.0",
|
||||
"version": "1.6.1",
|
||||
"private": false,
|
||||
"license": "MPL-2.0",
|
||||
"main": "background.js",
|
||||
|
@ -12,7 +12,8 @@
|
|||
"postinstall": "electron-builder install-app-deps",
|
||||
"postuninstall": "electron-builder install-app-deps",
|
||||
"electron:icons": "electron-icon-builder --input=./public/logo/win.png --output=build --flatten",
|
||||
"electron:icons-mac": "electron-icon-builder --input=./public/logo/mac.png --output=build --flatten"
|
||||
"electron:icons-mac": "electron-icon-builder --input=./public/logo/mac.png --output=build --flatten",
|
||||
"electron:icons-black": "electron-icon-builder --input=./public/logo/win-black.png --output=build/black --flatten"
|
||||
},
|
||||
"homepage": "https://github.com/docmirror/dev-sidecar",
|
||||
"author": {
|
||||
|
@ -20,8 +21,8 @@
|
|||
"name": "Greper"
|
||||
},
|
||||
"dependencies": {
|
||||
"@docmirror/dev-sidecar": "^1.6.0",
|
||||
"@docmirror/mitmproxy": "^1.6.0",
|
||||
"@docmirror/dev-sidecar": "^1.6.1",
|
||||
"@docmirror/mitmproxy": "^1.6.1",
|
||||
"adm-zip": "^0.5.5",
|
||||
"ant-design-vue": "^1.6.5",
|
||||
"compressing": "^1.5.1",
|
||||
|
|
After Width: | Height: | Size: 99 KiB |
|
@ -1,7 +1,7 @@
|
|||
'use strict'
|
||||
/* global __static */
|
||||
import path from 'path'
|
||||
import { app, protocol, BrowserWindow, Menu, Tray, ipcMain, dialog } from 'electron'
|
||||
import { app, protocol, BrowserWindow, Menu, Tray, ipcMain, dialog, powerMonitor } from 'electron'
|
||||
import { createProtocol } from 'vue-cli-plugin-electron-builder/lib'
|
||||
import backend from './bridge/backend'
|
||||
import DevSidecar from '@docmirror/dev-sidecar'
|
||||
|
@ -43,7 +43,7 @@ function setTray (app) {
|
|||
// 设置系统托盘图标
|
||||
let icon = '128x128.png'
|
||||
if (isMac) {
|
||||
icon = '16x16.png'
|
||||
icon = '16x16-black.png'
|
||||
}
|
||||
const iconPath = path.join(__dirname, '../extra/icons/', icon)
|
||||
const appTray = new Tray(iconPath)
|
||||
|
@ -100,9 +100,13 @@ function createWindow () {
|
|||
if (args.hideWindow) {
|
||||
startHideWindow = true
|
||||
}
|
||||
|
||||
log.info('start args', args)
|
||||
}
|
||||
log.info('start hide window', startHideWindow)
|
||||
if (app.getLoginItemSettings().wasOpenedAsHidden) {
|
||||
startHideWindow = true
|
||||
}
|
||||
log.info('start hide window', startHideWindow, app.getLoginItemSettings())
|
||||
|
||||
win = new BrowserWindow({
|
||||
width: 900,
|
||||
|
@ -242,6 +246,12 @@ if (!isFirstInstance) {
|
|||
} catch (err) {
|
||||
log.info('err', err)
|
||||
}
|
||||
|
||||
powerMonitor.on('shutdown', async (e) => {
|
||||
e.preventDefault()
|
||||
log.info('系统关机,恢复代理设置')
|
||||
await quit(app)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -261,7 +271,6 @@ if (isDevelopment) {
|
|||
})
|
||||
}
|
||||
}
|
||||
|
||||
// 系统关机和重启时的操作
|
||||
process.on('exit', function () {
|
||||
log.info('进程结束,退出app')
|
||||
|
|
|
@ -42,7 +42,7 @@ export default {
|
|||
} else {
|
||||
app.setLoginItemSettings({
|
||||
openAtLogin: true,
|
||||
path: ex,
|
||||
openAsHidden: true,
|
||||
args: [
|
||||
'--hideWindow', '"true"'
|
||||
]
|
||||
|
@ -56,7 +56,7 @@ export default {
|
|||
} else {
|
||||
app.setLoginItemSettings({
|
||||
openAtLogin: false,
|
||||
path: ex,
|
||||
openAsHidden: false,
|
||||
args: []
|
||||
})
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@docmirror/mitmproxy",
|
||||
"version": "1.6.0",
|
||||
"version": "1.6.1",
|
||||
"description": "",
|
||||
"main": "src/index.js",
|
||||
"keywords": [
|
||||
|
|