Commit 0d6dcfbe authored by Medicean's avatar Medicean

(Enhance::Module::PluginStore) 支持代理访问插件市场

parent 05778de5
...@@ -16,6 +16,14 @@ ...@@ -16,6 +16,14 @@
![chunk-1.png](https://i.loli.net/2019/01/28/5c4e8868f178a.png) ![chunk-1.png](https://i.loli.net/2019/01/28/5c4e8868f178a.png)
### 插件市场
* 支持使用代理访问插件市场,当配置了代理之后,默认开启
### Other
* 调整 aproxy uri 初始化 URL 格式
## 2019/01/21 `v(2.0.4)` ## 2019/01/21 `v(2.0.4)`
### 后端模块 ### 后端模块
......
...@@ -189,7 +189,7 @@ antSword['aproxyauth'] = ( ...@@ -189,7 +189,7 @@ antSword['aproxyauth'] = (
!aproxy['username'] || !aproxy['password'] !aproxy['username'] || !aproxy['password']
) ? '' : `${aproxy['username']}:${aproxy['password']}`; ) ? '' : `${aproxy['username']}:${aproxy['password']}`;
antSword['aproxyuri'] = `${aproxy['protocol']}:\/\/${antSword['aproxyauth']}@${aproxy['server']}:${aproxy['port']}`; antSword['aproxyuri'] = `${aproxy['protocol']}:\/\/${antSword['aproxyauth']}${antSword['aproxyauth']===""?"":"@"}${aproxy['server']}:${aproxy['port']}`;
// 通知后端设置代理 // 通知后端设置代理
ipcRenderer.send('aproxy', { ipcRenderer.send('aproxy', {
......
...@@ -39,10 +39,17 @@ class Plugin { ...@@ -39,10 +39,17 @@ class Plugin {
win.on('close', () => { win.on('close', () => {
this.win = win = null; this.win = win = null;
}); });
win.loadURL(url); let ses = win.webContents.session;
win.show(); let proxyuri = "";
// win.openDevTools(); if(antSword.aproxymode != "noproxy") {
this.win = win; proxyuri = antSword.aproxyuri;
}
ses.setProxy({proxyRules: proxyuri}, ()=>{
win.loadURL(url);
win.show();
// win.openDevTools();
this.win = win;
});
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment