fix: support IPv6 TeamSpeak targets safely

This commit is contained in:
illusia committed 2026-09-10 10:39:02 +08:00
1 parent 0dc623eb69
commit a041ba90bb
3 files changed
+4 -3

No files matched your search

+2 -2
View File
@@ -10,7 +10,7 @@
"license": "AGPL-3.0-only",
"dependencies": {
"@discordjs/opus": "^0.10.0",
"@echosixhiya/teamspeak-client": "git+https://github.com/EchoSixHIYA/teamspeak-js.git#8d91c30",
"@echosixhiya/teamspeak-client": "git+https://github.com/EchoSixHIYA/teamspeak-js.git#fef0fdb",
"express": "^5.2.1",
"pino": "^10.3.1",
"werift": "0.24.4",
@@ -63,7 +63,7 @@
},
"node_modules/@echosixhiya/teamspeak-client": {
"version": "0.2.4",
"resolved": "git+https://github.com/EchoSixHIYA/teamspeak-js.git#8d91c300438b45c2f5e96638daabbc68277f378b",
"resolved": "git+https://github.com/EchoSixHIYA/teamspeak-js.git#fef0fdb4d024bc640544766be704bf46eab49e85",
"license": "MIT",
"dependencies": {
"@noble/curves": "^2.0.1"
+1 -1
View File
@@ -19,7 +19,7 @@
},
"dependencies": {
"@discordjs/opus": "^0.10.0",
"@echosixhiya/teamspeak-client": "git+https://github.com/EchoSixHIYA/teamspeak-js.git#8d91c30",
"@echosixhiya/teamspeak-client": "git+https://github.com/EchoSixHIYA/teamspeak-js.git#fef0fdb",
"express": "^5.2.1",
"pino": "^10.3.1",
"werift": "0.24.4",
+1
View File
@@ -14,5 +14,6 @@ test("open mode blocks loopback, private, link-local, multicast and reserved ran
test("validated literal target is returned for the actual connection", async () => {
assert.deepEqual(await resolveSafeOpenTarget({ host: "8.8.8.8", port: 9987 }), { host: "8.8.8.8", port: 9987 });
assert.deepEqual(await resolveSafeOpenTarget({ host: "2606:4700:4700::1111", port: 9987 }), { host: "2606:4700:4700::1111", port: 9987 });
await assert.rejects(resolveSafeOpenTarget({ host: "127.0.0.1", port: 9987 }));
});