Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
Vanessa 2023-10-09 01:24:40 +08:00
commit 179b6f30fd
4 changed files with 11 additions and 8 deletions

View file

@ -789,6 +789,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 + "]");
});