mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-21 09:36:35 +00:00
feat: 区分arch
This commit is contained in:
parent
9df5bee8d3
commit
ffba3573ba
@ -1,5 +1,5 @@
|
||||
import { InstanceContext, NapCatCore } from '..';
|
||||
import { RequestUtil } from '@/common/request';
|
||||
import * as os from 'os';
|
||||
import offset from '@/core/external/offset.json';
|
||||
import * as crypto from 'crypto';
|
||||
import { PacketClient } from '../helper/packet';
|
||||
@ -39,7 +39,7 @@ export class NTQQPacketApi {
|
||||
this.serverUrl = serverUrl;
|
||||
this.qqversion = qqversion;
|
||||
let offsetTable: OffsetType = offset;
|
||||
if (!offsetTable[qqversion]) return false;
|
||||
if (!offsetTable[qqversion + '-' + os.arch()]) return false;
|
||||
let url = 'ws://' + this.serverUrl + '/ws';
|
||||
this.PacketClient = new PacketClient(url, this.core.context.logger);
|
||||
await this.PacketClient.connect();
|
||||
|
6
src/core/external/offset.json
vendored
6
src/core/external/offset.json
vendored
@ -1,13 +1,13 @@
|
||||
{
|
||||
"3.2.12-28418": {
|
||||
"3.2.12-28418-x64": {
|
||||
"recv": "A0723E0",
|
||||
"send": "A06EAE0"
|
||||
},
|
||||
"9.9.15-28418": {
|
||||
"9.9.15-28418-x64": {
|
||||
"recv": "37A9004",
|
||||
"send": "37A4BD0"
|
||||
},
|
||||
"9.9.15-28498": {
|
||||
"9.9.15-28498-x64": {
|
||||
"recv": "37A9004",
|
||||
"send": "37A4BD0"
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user