From 498cb42596d8556795dcd9c61d6b4b0290fd743d Mon Sep 17 00:00:00 2001 From: bingshuo <565183519@qq.com> Date: Sat, 30 May 2026 18:23:31 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20DATA=5FDIR=E6=94=B9=E5=9B=9E.gatekeeper?= =?UTF-8?q?=E4=BF=9D=E6=8C=81=E5=AF=86=E9=92=A5=E5=85=BC=E5=AE=B9=EF=BC=8C?= =?UTF-8?q?log=E6=96=87=E4=BB=B6=E5=90=8D=E6=94=B9=E4=B8=BAgatekeeper.log?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/gatekeeper.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/gatekeeper.js b/tools/gatekeeper.js index a0cac98..d8c314b 100644 --- a/tools/gatekeeper.js +++ b/tools/gatekeeper.js @@ -7,7 +7,7 @@ const http=require('http'),fs=require('fs'),path=require('path'),crypto=require('crypto'),{exec}=require('child_process'),os=require('os'); const PORT=parseInt(process.env.GATEKEEPER_PORT||process.argv[2]||'3910',10); -const DATA_DIR=path.join(os.homedir(),'.gk'); +const DATA_DIR=path.join(os.homedir(),'.gatekeeper'); const CMD_TIMEOUT=30000,MAX_OUTPUT=100000,RATE_LIMIT=60; if(!fs.existsSync(DATA_DIR))fs.mkdirSync(DATA_DIR,{recursive:true,mode:0o700}); @@ -37,7 +37,7 @@ function log(level,action,detail){ const ts=new Date().toISOString(); const line='['+ts+'] ['+level+'] '+action+(detail?' | '+detail:''); console.log(line); - try{const lf=path.join(DATA_DIR,'gk.log');fs.appendFileSync(lf,line+'\n');}catch(e){} + try{const lf=path.join(DATA_DIR,'gatekeeper.log');fs.appendFileSync(lf,line+'\n');}catch(e){} } const RC={};