mirror of
https://github.com/ZHANGTIANYAO1/teamspeak-music-bot.git
synced 2026-10-02 04:52:50 +08:00
Version 0.2.1 ships a universal clientinit format that works natively
against both TS3 and TS6 servers:
client_version: "3.?.? [Build: 5680278000]"
client_version_sign: DX5NIYLvfJEUjuIbCidnoeozxIDRRkpq3I9vVMBmE9L2qnekOo
BzSenkzsg2lC9CMv8K5hkEzhr2TYUYSwUXCg==
The old ts6-compat.ts workaround (monkey-patching handler.sendPacket to
rewrite clientinit's client_version to "3.6.2") is now actively wrong:
it replaces the library's new correct version/signature pair with a
stale one that TS6 servers reject, which is why the first 0.2.1 TS6
handshake attempt still hung at `received initivexpand2`.
Changes:
- package.json: "@honeybbq/teamspeak-client": "^0.1.0" -> "^0.2.1"
- src/ts-protocol/client.ts: remove patchClientInitVersion import and
the sendPacket monkey-patch block. Leave an inline comment so anyone
reading the git blame understands why the shim is gone.
- Delete src/ts-protocol/ts6-compat.ts and ts6-compat.test.ts — no
callers remain.
Other 0.2.x notes worth knowing (no code change here, just documenting):
- ClientOptions gained serverPassword / defaultChannel /
defaultChannelPassword that are sent DURING clientinit. We still call
our own joinChannel() post-connect because the existing flow works
and switching is an orthogonal refactor.
- 0.1.1 contains the P-256 DER encoding fix (PR #5 by ZHANGTIANYAO1).
Identities generated by 0.1.0 are cryptographically incompatible with
0.2.x's corrected handshake path — a bot whose identity column was
populated before this upgrade will hang at `received initivexpand2`
and fall through the 15s connect deadline. Workaround: clear the
identity column so the next start generates a fresh key. Server
groups assigned to the old UID must be re-granted once against the
new one.
Verification:
- tsc --noEmit clean
- vitest: 93/93 unit tests pass (1 test file removed with ts6-compat)
- scripts/test_full_feature.py against a local TS6 server: 51/51 pass,
including handshake, voice playback, identity persistence, WebSocket
stateChange broadcasts, and all corner-case regressions.
- Live: bot connected to TS6 in ~80ms after identity regeneration,
played NetEase audio through the voice channel, clean stop.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
46 lines
1.2 KiB
JSON
46 lines
1.2 KiB
JSON
{
|
|
"name": "tsmusicbot",
|
|
"version": "0.1.0",
|
|
"description": "TeamSpeak music bot with NetEase Cloud Music and QQ Music support",
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "tsx watch src/index.ts",
|
|
"build": "tsc && npm run build:web",
|
|
"build:web": "cd web && npm run build",
|
|
"start": "node dist/index.js",
|
|
"play": "node dist/index.js",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest"
|
|
},
|
|
"license": "MIT",
|
|
"dependencies": {
|
|
"@discordjs/opus": "^0.10.0",
|
|
"@honeybbq/teamspeak-client": "^0.2.1",
|
|
"@koa/router": "^15.4.0",
|
|
"@sansenjian/qq-music-api": "^2.2.9",
|
|
"axios": "^1.14.0",
|
|
"better-sqlite3": "^12.8.0",
|
|
"chalk": "^5.6.2",
|
|
"express": "^5.2.1",
|
|
"ffmpeg-static": "^5.3.0",
|
|
"koa": "^3.2.0",
|
|
"koa-bodyparser": "^4.4.1",
|
|
"koa-static": "^5.0.0",
|
|
"NeteaseCloudMusicApi": "^4.30.0",
|
|
"pino": "^10.3.1",
|
|
"ts3-nodejs-library": "^3.5.1",
|
|
"tweetnacl": "^1.0.3",
|
|
"ws": "^8.20.0",
|
|
"yt-dlp-wrap": "^2.3.12"
|
|
},
|
|
"devDependencies": {
|
|
"@types/better-sqlite3": "^7.6.13",
|
|
"@types/express": "^5.0.6",
|
|
"@types/node": "^25.5.0",
|
|
"@types/ws": "^8.18.1",
|
|
"tsx": "^4.21.0",
|
|
"typescript": "^6.0.2",
|
|
"vitest": "^4.1.2"
|
|
}
|
|
}
|