feat: add new NapCat config key: packetBackend

- Acceptable values: `native`, `frida`, `auto`, `disable`
- Default value is set to `auto`
This commit is contained in:
pk5ls20 committed 2024-11-05 14:45:02 +08:00
1 parent ad6f21980c
commit e46d274a75
5 files changed
+25 -5

No files matched your search

+5 -1
View File
@@ -61,7 +61,11 @@ export class NTQQPacketApi {
this.qqVersion = qqversion;
const table = typedOffset[qqversion + '-' + os.arch()];
if (!table) {
this.logger.logError('PacketServer Offset table not found for QQVersion: ', qqversion + '-' + os.arch());
this.logger.logError('[Core] [Packet] PacketServer Offset table not found for QQVersion: ', qqversion + '-' + os.arch());
return false;
}
if (this.core.configLoader.configData.packetBackend === 'disable') {
this.logger.logWarn('[Core] [Packet] 已禁用Packet后端,NapCat.Packet将不会加载!');
return false;
}
this.packetSession = new PacketSession(this.core);