From 045c3076ac8139ace8eb63d06501bd766ce0f59d Mon Sep 17 00:00:00 2001 From: zmzimpl Date: Sat, 9 Dec 2023 22:45:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E6=8E=89=E4=B8=8D=E5=BF=85=E8=A6=81?= =?UTF-8?q?=E7=9A=84=E6=89=93=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/main/src/fingerprint/index.ts | 8 +++++++- packages/renderer/src/pages/windows/index.tsx | 1 - 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/main/src/fingerprint/index.ts b/packages/main/src/fingerprint/index.ts index f62a769..9d6c0b4 100644 --- a/packages/main/src/fingerprint/index.ts +++ b/packages/main/src/fingerprint/index.ts @@ -109,7 +109,13 @@ export async function openFingerprintWindow(id: number) { } const win = BrowserWindow.getAllWindows()[0]; const windowDataDir = `${cachePath}\\${id}_${windowData.profile_id}`; - const chromePath = 'D:\\chromium-dev\\source\\src\\out\\Default\\chrome.exe'; + let chromePath; + + if (import.meta.env.DEV) { + chromePath = 'D:\\chromium-dev\\source\\src\\out\\Default\\chrome.exe'; + } else { + chromePath = app.getPath('userData'); + } let ipInfo = {timeZone: '', ip: '', ll: [], country: ''}; if (windowData.proxy_id && proxyData.ip) { diff --git a/packages/renderer/src/pages/windows/index.tsx b/packages/renderer/src/pages/windows/index.tsx index ac863ad..896ecb8 100644 --- a/packages/renderer/src/pages/windows/index.tsx +++ b/packages/renderer/src/pages/windows/index.tsx @@ -253,7 +253,6 @@ const Windows = () => { const fetchProxies = async () => { const proxies = await ProxyBridge?.getAll(); - proxies.splice(0, 0, {id: undefined, ip: 'No Proxy'}); setProxies(proxies); };