From ae18db45a430fa63ef9ce564a327dd678d25eb44 Mon Sep 17 00:00:00 2001 From: lyswhut Date: Sun, 29 May 2022 10:39:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=8B=A5=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E4=BA=86`http=5Fproxy`=E7=8E=AF=E5=A2=83=E5=8F=98=E9=87=8F?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E4=BC=9A=E6=84=8F=E5=A4=96=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E6=AD=A4=E4=BB=A3=E7=90=86=E9=85=8D=E7=BD=AE=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FAQ.md | 2 +- publish/changeLog.md | 4 ++++ src/renderer/core/useApp/index.js | 4 ++++ src/renderer/core/useApp/useListAutoUpdate.js | 3 +-- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/FAQ.md b/FAQ.md index 452ac61a..3b3a9d91 100644 --- a/FAQ.md +++ b/FAQ.md @@ -114,7 +114,7 @@ 这些浏览器打开此窗口时界面可能是中文也可能是英文,英文的话按括号里的来 -1. 点击窗口顶部`应用程序(application)` +1. 点击窗口顶部`应用程序(application)`(若找不到此选项,则可能是被折叠起来了,看看顶部菜单的`>>`) 2. 展开左侧 `Cookies` 3. 点击 `https://music.163.com` 4. 在右侧窗口找到 `名称(Name)` 为 `MUSIC_U` 的这行,这行的第二列(`值(Value)`)内的那串内容就是`token`,双击它进入编辑状态,然后按`ctrl + c`键就可以将它复制 diff --git a/publish/changeLog.md b/publish/changeLog.md index ec9bc710..ac01cffa 100644 --- a/publish/changeLog.md +++ b/publish/changeLog.md @@ -1,3 +1,7 @@ ### 新增 - 新增设置-以全屏模式启动设置 + +### 修复 + +- 修复若配置了`http_proxy`环境变量时,会意外使用此代理配置的问题 diff --git a/src/renderer/core/useApp/index.js b/src/renderer/core/useApp/index.js index 194dfc0c..68671fe9 100644 --- a/src/renderer/core/useApp/index.js +++ b/src/renderer/core/useApp/index.js @@ -52,6 +52,10 @@ export default () => { getEnvParams().then(envParams => { + // 移除代理相关的环境变量设置,防止请求库自动应用它们 + for (const key of Object.keys(process.env)) { + if (/^(?:http_proxy|https_proxy|NO_PROXY)$/i.test(key)) delete process.env[key] + } const envProxy = envParams.cmdParams['proxy-server'] if (envProxy && typeof envProxy == 'string') { const [host, port = ''] = envProxy.split(':') diff --git a/src/renderer/core/useApp/useListAutoUpdate.js b/src/renderer/core/useApp/useListAutoUpdate.js index 2d65efce..1e96a41f 100644 --- a/src/renderer/core/useApp/useListAutoUpdate.js +++ b/src/renderer/core/useApp/useListAutoUpdate.js @@ -18,8 +18,7 @@ export default () => { return () => { const waitUpdateLists = Object.entries(getListUpdateInfo()) - .filter(([id, info]) => info.isAutoUpdate) - .map(([id]) => userLists.find(l => l.id === id)) + .map(([id, info]) => info.isAutoUpdate && userLists.find(l => l.id === id)) .filter(_ => _) for (let i = 2; i > 0; i--) { handleSyncSourceList(waitUpdateLists)