修复若配置了`http_proxy`环境变量时,会意外使用此代理配置的问题
parent
4783c9be8d
commit
ae18db45a4
2
FAQ.md
2
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`键就可以将它复制
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
### 新增
|
||||
|
||||
- 新增设置-以全屏模式启动设置
|
||||
|
||||
### 修复
|
||||
|
||||
- 修复若配置了`http_proxy`环境变量时,会意外使用此代理配置的问题
|
||||
|
|
|
@ -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(':')
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue