From 38f68926607e60f666f51565f29315693998d5c8 Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Fri, 27 Aug 2021 15:54:36 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=99=BD=E5=90=8D=E5=8D=95=E4=BC=9A?= =?UTF-8?q?=E8=A2=ABow=E6=8B=A6=E6=88=AA=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/linux.md | 1 - packages/core/src/config/index.js | 4 ++++ packages/gui/extra/config_remote.json5 | 12 ++++++++++++ packages/gui/src/view/pages/setting.vue | 11 +++++++++++ .../src/lib/proxy/mitmproxy/createConnectHandler.js | 8 ++++++-- .../src/lib/proxy/mitmproxy/createRequestHandler.js | 1 + packages/mitmproxy/src/options.js | 8 ++++++-- 7 files changed, 40 insertions(+), 5 deletions(-) create mode 100644 packages/gui/extra/config_remote.json5 diff --git a/doc/linux.md b/doc/linux.md index b915991..89f0ad1 100644 --- a/doc/linux.md +++ b/doc/linux.md @@ -13,7 +13,6 @@ * 设置可执行权限 `sudo chmod +X DevSidecar-x.x.x.AppImage` * 双击运行 - ## 证书安装 默认模式和增强模式需要系统信任CA证书。 由于linux上火狐和chrome都不走系统证书,所以除了安装系统证书之外,还需要给浏览器安装证书 diff --git a/packages/core/src/config/index.js b/packages/core/src/config/index.js index 2c736f1..0734581 100644 --- a/packages/core/src/config/index.js +++ b/packages/core/src/config/index.js @@ -14,6 +14,10 @@ module.exports = { mode: 'default', autoStart: { enabled: false + }, + remoteConfig: { + enabled: true, + url: 'https://gitee.com/docmirror/dev-sidecar/raw/master/packages/gui/extra/config_remote.json5' } }, server: { diff --git a/packages/gui/extra/config_remote.json5 b/packages/gui/extra/config_remote.json5 new file mode 100644 index 0000000..80d7a25 --- /dev/null +++ b/packages/gui/extra/config_remote.json5 @@ -0,0 +1,12 @@ +{ + server: { + intercepts: { + 'github.githubassets.com': { + '.*': { + proxy: 'assets.fastgit.org', + sni11: 'baidu.com' + } + } + }, + } +} diff --git a/packages/gui/src/view/pages/setting.vue b/packages/gui/src/view/pages/setting.vue index 7f8acb6..3d9124e 100644 --- a/packages/gui/src/view/pages/setting.vue +++ b/packages/gui/src/view/pages/setting.vue @@ -12,6 +12,14 @@ 开机自启 + + + 启用远程配置 + + + + +