Only create proxy once
This commit is contained in:
parent
981d139755
commit
d1c7f53d16
1 changed files with 4 additions and 2 deletions
2
main.js
2
main.js
|
@ -113,8 +113,10 @@ const regexPatterns = [
|
||||||
}
|
}
|
||||||
|
|
||||||
// set/create local proxy
|
// set/create local proxy
|
||||||
|
try {
|
||||||
const proxy = createProxy(http.createServer());
|
const proxy = createProxy(http.createServer());
|
||||||
proxy.listen(3129)
|
proxy.listen(3129)
|
||||||
|
} catch {}
|
||||||
|
|
||||||
session.defaultSession.setProxy({
|
session.defaultSession.setProxy({
|
||||||
proxyRules: 'http=localhost:3129;https=localhost:3129',
|
proxyRules: 'http=localhost:3129;https=localhost:3129',
|
||||||
|
|
Loading…
Reference in a new issue