Add process bypass option and update bypass fields
Release NapCat / validate-version (push) Canceled after 0s
Release NapCat / Build-Framework (push) Canceled after 0s
Release NapCat / Build-Shell (push) Canceled after 0s
Release NapCat / Download-QNX64 (push) Canceled after 0s
Release NapCat / release-napcat (push) Canceled after 0s

Introduce a new 'process' bypass option and remove the old 'maps' key, updating all related schemas, types, defaults and validation. Adjusted napcat.json ordering and NapcatConfig defaults, updated BypassOptions schema and TypeScript interfaces, backend validation keys, loader/default parsing logic, and the web UI form mappings/labels to reflect the new field set and ordering.
This commit is contained in:
手瓜一十雪 committed 2026-02-18 22:14:31 +08:00
1 parent b9f61cc0ee
commit a3b3836b8a
8 files changed
+51 -55

No files matched your search

@@ -16,11 +16,11 @@ const defaultNapcatConfig = {
o3HookMode: 1,
bypass: {
hook: true,
module: true,
window: true,
js: true,
module: true,
process: true,
container: true,
maps: true,
js: true,
},
};
@@ -81,7 +81,7 @@ export const NapCatSetConfigHandler: RequestHandler = (req, res) => {
// 验证 bypass 字段
if (mergedConfig.bypass && typeof mergedConfig.bypass === 'object') {
const bypass = mergedConfig.bypass as Record<string, unknown>;
const validKeys = ['hook', 'module', 'window', 'js', 'container', 'maps'];
const validKeys = ['hook', 'window', 'module', 'process', 'container', 'js'];
for (const key of validKeys) {
if (key in bypass && typeof bypass[key] !== 'boolean') {
return sendError(res, `bypass.${key} must be boolean`);