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

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