mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-02-28 07:40:27 +00:00
Introduce granular "bypass" configuration to control Napi2Native bypass features and expose it in the WebUI. Key changes: - Add bypass defaults to packages/napcat-core/external/napcat.json and BypassOptionsSchema in napcat-core helper config. - Extend Napi2NativeLoader types: enableAllBypasses now accepts BypassOptions. - Framework & Shell: load napcat.json (via json5), pass parsed bypass options to native loader, and log the applied config. Add json5 dependency. - Shell: implement loadBypassConfig with a crash-recovery override (NAPCAT_BYPASS_DISABLE_LEVEL) and add master<->worker IPC (login-success) plus progressive bypass-disable strategy to mitigate repeated crashes before login. - WebUI backend: add GET/Set endpoints for NapCat config (NapCatConfigRouter) with validation and JSON5-aware defaults. - WebUI frontend: add BypassConfig page, types, and controller methods to get/set bypass config. - Update package.json to include json5 and update pnpm lockfile; native binaries (.node / ffmpeg.dll) also updated. This enables operators to tune bypass behavior per-installation and to have an in-UI control for toggling anti-detection features; it also adds progressive fallback behavior to help recover from crashes caused by bypasses.
35 lines
747 B
JSON
35 lines
747 B
JSON
{
|
|
"name": "napcat-shell",
|
|
"version": "0.0.1",
|
|
"private": true,
|
|
"type": "module",
|
|
"main": "index.ts",
|
|
"scripts": {
|
|
"build": "vite build",
|
|
"build:dev": "vite build --mode development",
|
|
"typecheck": "tsc --noEmit --skipLibCheck -p tsconfig.json"
|
|
},
|
|
"exports": {
|
|
".": {
|
|
"import": "./index.ts"
|
|
},
|
|
"./*": {
|
|
"import": "./*"
|
|
}
|
|
},
|
|
"dependencies": {
|
|
"napcat-core": "workspace:*",
|
|
"napcat-common": "workspace:*",
|
|
"napcat-adapter": "workspace:*",
|
|
"napcat-webui-backend": "workspace:*",
|
|
"napcat-qrcode": "workspace:*"
|
|
},
|
|
"devDependencies": {
|
|
"json5": "^2.2.3",
|
|
"@types/node": "^22.0.1",
|
|
"napcat-vite": "workspace:*"
|
|
},
|
|
"engines": {
|
|
"node": ">=18.0.0"
|
|
}
|
|
} |