Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
antSword
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
HuangJunbo
antSword
Commits
0d6dcfbe
Commit
0d6dcfbe
authored
Jan 30, 2019
by
Medicean
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(Enhance::Module::PluginStore) 支持代理访问插件市场
parent
05778de5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
5 deletions
+20
-5
CHANGELOG.md
CHANGELOG.md
+8
-0
app.entry.js
source/app.entry.js
+1
-1
index.js
source/modules/plugin/index.js
+11
-4
No files found.
CHANGELOG.md
View file @
0d6dcfbe
...
@@ -16,6 +16,14 @@
...
@@ -16,6 +16,14 @@


### 插件市场
*
支持使用代理访问插件市场,当配置了代理之后,默认开启
### Other
*
调整 aproxy uri 初始化 URL 格式
## 2019/01/21 `v(2.0.4)`
## 2019/01/21 `v(2.0.4)`
### 后端模块
### 后端模块
...
...
source/app.entry.js
View file @
0d6dcfbe
...
@@ -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'
,
{
...
...
source/modules/plugin/index.js
View file @
0d6dcfbe
...
@@ -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
;
});
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment