From a45e127f6cf02fda8870aff00be459d02b3d0f83 Mon Sep 17 00:00:00 2001 From: zmzimpl Date: Mon, 11 Dec 2023 00:51:53 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E9=BB=98=E8=AE=A4=E8=AE=BF?= =?UTF-8?q?=E9=97=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/main/src/fingerprint/index.ts | 2 +- packages/main/src/services/commonService.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/main/src/fingerprint/index.ts b/packages/main/src/fingerprint/index.ts index 77fa039..55400f0 100644 --- a/packages/main/src/fingerprint/index.ts +++ b/packages/main/src/fingerprint/index.ts @@ -73,7 +73,7 @@ async function connectBrowser(port: number, ipInfo: IP) { : await browser.newPage(); try { await attachFingerprintToPuppeteer(page, ipInfo); - await page.goto('https://browserleaks.com/canvas'); + // await page.goto('https://browserleaks.com/canvas'); } catch (error) { logger.error(error); } diff --git a/packages/main/src/services/commonService.ts b/packages/main/src/services/commonService.ts index 716c56b..3e7fc05 100644 --- a/packages/main/src/services/commonService.ts +++ b/packages/main/src/services/commonService.ts @@ -42,8 +42,10 @@ export const initCommonService = () => { ipcMain.handle( 'common-fetch-logs', async (_, module: 'Main' | 'Windows' | 'Proxy' | 'Services' | 'Api' = 'Main') => { + if (import.meta.env.DEV) { + return []; + } // read directory and get all folders - // read directory and get all files const logFiles = await new Promise((resolve, reject) => { readdir(`logs/${module}`, (err, files) => { if (err) {