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
2024-11-05 14:45:02 +08:00
parent ad6f21980c
commit e46d274a75
5 changed files with 25 additions and 5 deletions

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);