This commit is contained in:
Vanessa 2022-11-25 23:09:16 +08:00
parent a8f3b1762a
commit b2ba9ace07
10 changed files with 33 additions and 36 deletions

View file

@ -92,12 +92,12 @@ export const setProxy = () => {
/// #if !BROWSER
if ("" === window.siyuan.config.system.networkProxy.scheme) {
console.log("network proxy [system]");
return
return;
}
const session = getCurrentWindow().webContents.session;
session.closeAllConnections().then(() => {
const proxyURL = `${window.siyuan.config.system.networkProxy.scheme}://${window.siyuan.config.system.networkProxy.host}:${window.siyuan.config.system.networkProxy.port}`
const proxyURL = `${window.siyuan.config.system.networkProxy.scheme}://${window.siyuan.config.system.networkProxy.host}:${window.siyuan.config.system.networkProxy.port}`;
session.setProxy({proxyRules: proxyURL}).then(
() => console.log("network proxy [" + proxyURL + "]"),
);