mirror of
https://github.com/ZHANGTIANYAO1/teamspeak-music-bot.git
synced 2026-10-02 13:02:49 +08:00
Add dual TS3/TS6 protocol support with auto-detection
The @honeybbq/teamspeak-client library already handles TS6 license block type 8 (Ts5Server) in its handshake, so voice connections work with both TS3 and TS6 servers. This commit adds the surrounding infrastructure: - protocol-detect.ts: Auto-detect server type by probing TS3 ServerQuery (port 10011) and TS6 HTTP Query (port 10080) in parallel - http-query.ts: TS6 HTTP Query client replacing the raw-TCP ServerQuery that TS6 servers no longer support (ports 10080/10443) - client.ts: Protocol-aware connection with auto-detection, TS6 HTTP Query setup, and forced protocol override option - manager.ts: Pass through serverProtocol and ts6ApiKey config options - connection.ts: Mark legacy TS3 ServerQuery as deprecated for TS6 https://claude.ai/code/session_016WhH58avUD9xy2dgADJgTh
This commit is contained in:
6 files changed
+386
-5
No files matched your search
@@ -1,10 +1,17 @@
|
||||
/**
|
||||
* TS3 raw-TCP ServerQuery connection (port 10011).
|
||||
*
|
||||
* @deprecated This module only works with TS3 servers. TS6 servers replaced
|
||||
* the raw-TCP ServerQuery with HTTP/HTTPS (port 10080/10443) and SSH (10022).
|
||||
* For TS6 servers, use {@link ../http-query.js TS6HttpQuery} instead.
|
||||
*/
|
||||
import net from "node:net";
|
||||
import { EventEmitter } from "node:events";
|
||||
import { encodeCommand, decodeResponse, parseErrorLine } from "./commands.js";
|
||||
|
||||
export interface ConnectionOptions {
|
||||
host: string;
|
||||
port: number; // ServerQuery port, typically 10011
|
||||
port: number; // ServerQuery port: 10011 (TS3) — not available on TS6
|
||||
}
|
||||
|
||||
export interface CommandResult {
|
||||
|
||||
Reference in new issue
Block a user