mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🐛 Set proxy
This commit is contained in:
parent
7b10f042b5
commit
b589a93f13
2 changed files with 7 additions and 4 deletions
|
|
@ -737,6 +737,13 @@ app.whenReady().then(() => {
|
|||
break;
|
||||
case "setProxy":
|
||||
event.sender.session.closeAllConnections().then(() => {
|
||||
if (data.proxyURL.startsWith("://")) {
|
||||
event.sender.session.setProxy({mode: "system"}).then(() => {
|
||||
console.log("network proxy [system]");
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
event.sender.session.setProxy({proxyRules: data.proxyURL}).then(() => {
|
||||
console.log("network proxy [" + data.proxyURL + "]");
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue