diff --git a/src/main/helpers/proxy.helpers.ts b/src/main/helpers/proxy.helpers.ts index 71f9a366..0a102b13 100644 --- a/src/main/helpers/proxy.helpers.ts +++ b/src/main/helpers/proxy.helpers.ts @@ -1,6 +1,6 @@ import log from 'electron-log'; import { RegDwordValue, RegSzValue } from "regedit-rs" -import { execOnOs } from "../helpers/env.helpers"; +import { execOnOs } from "./env.helpers"; import { bootstrap } from 'global-agent'; import { StaticConfigurationService } from "../services/static-configuration.service"; @@ -14,7 +14,7 @@ async function isProxyEnabled(): Promise{ if(!key.exists){ throw new Error("Key \"HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\" not exist"); } const registryValue = key.values.ProxyEnable as RegDwordValue; if(!registryValue){ throw new Error("Value \"ProxyEnable\" not exist"); } - return (1 === registryValue.value); + return registryValue.value === 1; } async function getProxyServer(): Promise{