fix: 默认启用NapCat反检测配置
This commit is contained in:
parent
e356784836
commit
8d96e3dc48
@ -29,12 +29,12 @@ type OnebotConfig = {
|
|||||||
|
|
||||||
type NapcatConfig = {
|
type NapcatConfig = {
|
||||||
bypass: {
|
bypass: {
|
||||||
container: false;
|
container: true;
|
||||||
hook: false;
|
hook: true;
|
||||||
js: false;
|
js: true;
|
||||||
module: false;
|
module: true;
|
||||||
process: false;
|
process: true;
|
||||||
window: false;
|
window: true;
|
||||||
};
|
};
|
||||||
o3HookMode: 0;
|
o3HookMode: 0;
|
||||||
packetBackend: 'auto';
|
packetBackend: 'auto';
|
||||||
@ -68,12 +68,12 @@ export class NapcatConfigWriterService {
|
|||||||
};
|
};
|
||||||
const napcatConfig: NapcatConfig = {
|
const napcatConfig: NapcatConfig = {
|
||||||
bypass: {
|
bypass: {
|
||||||
container: false,
|
container: true,
|
||||||
hook: false,
|
hook: true,
|
||||||
js: false,
|
js: true,
|
||||||
module: false,
|
module: true,
|
||||||
process: false,
|
process: true,
|
||||||
window: false,
|
window: true,
|
||||||
},
|
},
|
||||||
o3HookMode: 0,
|
o3HookMode: 0,
|
||||||
packetBackend: 'auto',
|
packetBackend: 'auto',
|
||||||
|
|||||||
@ -253,6 +253,14 @@ describe('NapCat runtime profile generation', () => {
|
|||||||
reconnectInterval: 5000,
|
reconnectInterval: 5000,
|
||||||
reportSelfMessage: false,
|
reportSelfMessage: false,
|
||||||
});
|
});
|
||||||
|
expect(result.napcatConfig.bypass).toEqual({
|
||||||
|
container: true,
|
||||||
|
hook: true,
|
||||||
|
js: true,
|
||||||
|
module: true,
|
||||||
|
process: true,
|
||||||
|
window: true,
|
||||||
|
});
|
||||||
expect(result.napcatConfig.o3HookMode).toBe(0);
|
expect(result.napcatConfig.o3HookMode).toBe(0);
|
||||||
expect(
|
expect(
|
||||||
result.files.find((file) => file.path === 'webui.json')?.content,
|
result.files.find((file) => file.path === 'webui.json')?.content,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user