From d9dacc869aea4a9894f97c6fd9681332b6ee0286 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 14 Jan 2024 06:57:09 +0000 Subject: [PATCH 01/28] chore(deps): update dependency tape to v5.7.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index dca6bb02..49a46e16 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "magnet-uri": "7.0.5", "semantic-release": "21.1.2", "standard": "*", - "tape": "5.7.2", + "tape": "5.7.3", "undici": "^5.27.0", "webtorrent-fixtures": "2.0.2", "wrtc": "0.4.7" From 3f59b58a020ea8c0926be135471a6666fe8e8b21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ars=C3=A8ne=20Fougerouse?= Date: Tue, 16 Jan 2024 13:31:45 +0100 Subject: [PATCH 02/28] fix: update build badge url (#506) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3f3b83ba..2f0d99c1 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # bittorrent-tracker [![ci][ci-image]][ci-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url] -[ci-image]: https://img.shields.io/github/workflow/status/webtorrent/bittorrent-tracker/ci/master +[ci-image]: https://img.shields.io/github/actions/workflow/status/webtorrent/bittorrent-tracker/ci.yml [ci-url]: https://github.com/webtorrent/bittorrent-tracker/actions [npm-image]: https://img.shields.io/npm/v/bittorrent-tracker.svg [npm-url]: https://npmjs.org/package/bittorrent-tracker From a96ea91a6a7d2feaf07a43b53add50d962974e48 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Tue, 16 Jan 2024 12:34:36 +0000 Subject: [PATCH 03/28] chore(release): 11.0.1 ## [11.0.1](https://github.com/webtorrent/bittorrent-tracker/compare/v11.0.0...v11.0.1) (2024-01-16) ### Bug Fixes * update build badge url ([#506](https://github.com/webtorrent/bittorrent-tracker/issues/506)) ([3f59b58](https://github.com/webtorrent/bittorrent-tracker/commit/3f59b58a020ea8c0926be135471a6666fe8e8b21)) --- AUTHORS.md | 1 + CHANGELOG.md | 7 +++++++ package.json | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/AUTHORS.md b/AUTHORS.md index 2892a0c7..d314f4df 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -64,5 +64,6 @@ - Cas (6506529+ThaUnknown@users.noreply.github.com) - Tom Snelling (tomsnelling8@gmail.com) - Cas_ (6506529+ThaUnknown@users.noreply.github.com) +- Arsène Fougerouse (arsene582@gmail.com) #### Generated by tools/update-authors.sh. diff --git a/CHANGELOG.md b/CHANGELOG.md index 5764a224..3175bee9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [11.0.1](https://github.com/webtorrent/bittorrent-tracker/compare/v11.0.0...v11.0.1) (2024-01-16) + + +### Bug Fixes + +* update build badge url ([#506](https://github.com/webtorrent/bittorrent-tracker/issues/506)) ([3f59b58](https://github.com/webtorrent/bittorrent-tracker/commit/3f59b58a020ea8c0926be135471a6666fe8e8b21)) + # [11.0.0](https://github.com/webtorrent/bittorrent-tracker/compare/v10.0.12...v11.0.0) (2023-10-31) diff --git a/package.json b/package.json index 49a46e16..120195ee 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "bittorrent-tracker", "description": "Simple, robust, BitTorrent tracker (client & server) implementation", - "version": "11.0.0", + "version": "11.0.1", "author": { "name": "WebTorrent LLC", "email": "feross@webtorrent.io", From 5e2f59be629be0dec17e1278160875eb308f19fc Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 26 Jan 2024 06:46:09 +0000 Subject: [PATCH 04/28] chore(deps): update dependency tape to v5.7.4 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 120195ee..8b3fde75 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "magnet-uri": "7.0.5", "semantic-release": "21.1.2", "standard": "*", - "tape": "5.7.3", + "tape": "5.7.4", "undici": "^5.27.0", "webtorrent-fixtures": "2.0.2", "wrtc": "0.4.7" From ea1e78e1ded1d4a6e7bab9210a593a88fcff50ed Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 15 Feb 2024 22:47:54 +0000 Subject: [PATCH 05/28] chore(deps): update dependency tape to v5.7.5 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8b3fde75..1e9d4cc5 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "magnet-uri": "7.0.5", "semantic-release": "21.1.2", "standard": "*", - "tape": "5.7.4", + "tape": "5.7.5", "undici": "^5.27.0", "webtorrent-fixtures": "2.0.2", "wrtc": "0.4.7" From fe75272d51653e626583689081afb0b7aeadb84f Mon Sep 17 00:00:00 2001 From: Brad Marsden Date: Tue, 12 Mar 2024 17:40:46 +0000 Subject: [PATCH 06/28] fix(parse-http): ignore announcements from peers with invalid announcement ports. (#513) --- lib/server/parse-http.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/server/parse-http.js b/lib/server/parse-http.js index a6ba6a56..97b46e30 100644 --- a/lib/server/parse-http.js +++ b/lib/server/parse-http.js @@ -22,7 +22,7 @@ export default function (req, opts) { params.peer_id = bin2hex(params.peer_id) params.port = Number(params.port) - if (!params.port) throw new Error('invalid port') + if (!params.port || params.port <= 0 || params.port > 65535) throw new Error('invalid port') params.left = Number(params.left) if (Number.isNaN(params.left)) params.left = Infinity From a4f956e3cbc2534fb92bb9a8841cccb5224130e1 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Tue, 12 Mar 2024 17:43:38 +0000 Subject: [PATCH 07/28] chore(release): 11.0.2 ## [11.0.2](https://github.com/webtorrent/bittorrent-tracker/compare/v11.0.1...v11.0.2) (2024-03-12) ### Bug Fixes * **parse-http:** ignore announcements from peers with invalid announcement ports. ([#513](https://github.com/webtorrent/bittorrent-tracker/issues/513)) ([fe75272](https://github.com/webtorrent/bittorrent-tracker/commit/fe75272d51653e626583689081afb0b7aeadb84f)) --- AUTHORS.md | 1 + CHANGELOG.md | 7 +++++++ package.json | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/AUTHORS.md b/AUTHORS.md index d314f4df..abe53c94 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -65,5 +65,6 @@ - Tom Snelling (tomsnelling8@gmail.com) - Cas_ (6506529+ThaUnknown@users.noreply.github.com) - Arsène Fougerouse (arsene582@gmail.com) +- Brad Marsden (silentbot1@gmail.com) #### Generated by tools/update-authors.sh. diff --git a/CHANGELOG.md b/CHANGELOG.md index 3175bee9..6db84216 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [11.0.2](https://github.com/webtorrent/bittorrent-tracker/compare/v11.0.1...v11.0.2) (2024-03-12) + + +### Bug Fixes + +* **parse-http:** ignore announcements from peers with invalid announcement ports. ([#513](https://github.com/webtorrent/bittorrent-tracker/issues/513)) ([fe75272](https://github.com/webtorrent/bittorrent-tracker/commit/fe75272d51653e626583689081afb0b7aeadb84f)) + ## [11.0.1](https://github.com/webtorrent/bittorrent-tracker/compare/v11.0.0...v11.0.1) (2024-01-16) diff --git a/package.json b/package.json index 1e9d4cc5..f04ef3dc 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "bittorrent-tracker", "description": "Simple, robust, BitTorrent tracker (client & server) implementation", - "version": "11.0.1", + "version": "11.0.2", "author": { "name": "WebTorrent LLC", "email": "feross@webtorrent.io", From f6a7993e8411ebeef75a7a74386d18e3f35be77d Mon Sep 17 00:00:00 2001 From: krazak Date: Thu, 11 Apr 2024 15:19:03 -0700 Subject: [PATCH 08/28] Add event timestamp (#516) --- bin/cmd.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/bin/cmd.js b/bin/cmd.js index fb7e0653..c57eef55 100755 --- a/bin/cmd.js +++ b/bin/cmd.js @@ -86,22 +86,22 @@ const server = new Server({ }) server.on('error', err => { - if (!argv.silent) console.error(`ERROR: ${err.message}`) + if (!argv.silent) console.error(`${new Date().toISOString()} ERROR: ${err.message}`) }) server.on('warning', err => { - if (!argv.quiet) console.log(`WARNING: ${err.message}`) + if (!argv.quiet) console.log(`${new Date().toISOString()} WARNING: ${err.message}`) }) server.on('update', addr => { - if (!argv.quiet) console.log(`update: ${addr}`) + if (!argv.quiet) console.log(`${new Date().toISOString()} update: ${addr}`) }) server.on('complete', addr => { - if (!argv.quiet) console.log(`complete: ${addr}`) + if (!argv.quiet) console.log(`${new Date().toISOString()} complete: ${addr}`) }) server.on('start', addr => { - if (!argv.quiet) console.log(`start: ${addr}`) + if (!argv.quiet) console.log(`${new Date().toISOString()} start: ${addr}`) }) server.on('stop', addr => { - if (!argv.quiet) console.log(`stop: ${addr}`) + if (!argv.quiet) console.log(`${new Date().toISOString()} stop: ${addr}`) }) const hostname = { @@ -115,30 +115,30 @@ server.listen(argv.port, hostname, () => { const httpAddr = server.http.address() const httpHost = httpAddr.address !== '::' ? httpAddr.address : 'localhost' const httpPort = httpAddr.port - console.log(`HTTP tracker: http://${httpHost}:${httpPort}/announce`) + console.log(`${new Date().toISOString()} HTTP tracker: http://${httpHost}:${httpPort}/announce`) } if (server.udp && !argv.quiet) { const udpAddr = server.udp.address() const udpHost = udpAddr.address const udpPort = udpAddr.port - console.log(`UDP tracker: udp://${udpHost}:${udpPort}`) + console.log(`${new Date().toISOString()} UDP tracker: udp://${udpHost}:${udpPort}`) } if (server.udp6 && !argv.quiet) { const udp6Addr = server.udp6.address() const udp6Host = udp6Addr.address !== '::' ? udp6Addr.address : 'localhost' const udp6Port = udp6Addr.port - console.log(`UDP6 tracker: udp://${udp6Host}:${udp6Port}`) + console.log(`${new Date().toISOString()} UDP6 tracker: udp://${udp6Host}:${udp6Port}`) } if (server.ws && !argv.quiet) { const wsAddr = server.http.address() const wsHost = wsAddr.address !== '::' ? wsAddr.address : 'localhost' const wsPort = wsAddr.port - console.log(`WebSocket tracker: ws://${wsHost}:${wsPort}`) + console.log(`${new Date().toISOString()} WebSocket tracker: ws://${wsHost}:${wsPort}`) } if (server.http && argv.stats && !argv.quiet) { const statsAddr = server.http.address() const statsHost = statsAddr.address !== '::' ? statsAddr.address : 'localhost' const statsPort = statsAddr.port - console.log(`Tracker stats: http://${statsHost}:${statsPort}/stats`) + console.log(`${new Date().toISOString()} Tracker stats: http://${statsHost}:${statsPort}/stats`) } }) From 633d68a32c2c143fec0182317a9801dd1b64faef Mon Sep 17 00:00:00 2001 From: Cas_ <6506529+ThaUnknown@users.noreply.github.com> Date: Wed, 22 May 2024 23:51:48 +0200 Subject: [PATCH 09/28] feat: updated webrtc implementation (#519) * feat: update webrtc implementation * chore: update deps --- package.json | 37 ++++++++++++++++++------------------- test/evict.js | 2 +- test/server.js | 2 +- 3 files changed, 20 insertions(+), 21 deletions(-) diff --git a/package.json b/package.json index f04ef3dc..809488d9 100644 --- a/package.json +++ b/package.json @@ -27,42 +27,41 @@ }, "type": "module", "dependencies": { - "@thaunknown/simple-peer": "^9.12.1", - "@thaunknown/simple-websocket": "^9.1.0", + "@thaunknown/simple-peer": "^10.0.6", + "@thaunknown/simple-websocket": "^9.1.1", "bencode": "^4.0.0", - "bittorrent-peerid": "^1.3.3", + "bittorrent-peerid": "^1.3.6", "chrome-dgram": "^3.0.6", - "clone": "^2.0.0", + "clone": "^2.1.2", "compact2string": "^1.4.1", - "cross-fetch-ponyfill": "^1.0.1", - "debug": "^4.1.1", - "ip": "^1.1.5", + "cross-fetch-ponyfill": "^1.0.3", + "debug": "^4.3.4", + "ip": "^2.0.1", "lru": "^3.1.0", - "minimist": "^1.2.5", + "minimist": "^1.2.8", "once": "^1.4.0", "queue-microtask": "^1.2.3", "random-iterate": "^1.0.1", "run-parallel": "^1.2.0", "run-series": "^1.1.9", - "socks": "^2.0.0", - "string2compact": "^2.0.0", - "uint8-util": "^2.1.9", + "socks": "^2.8.3", + "string2compact": "^2.0.1", + "uint8-util": "^2.2.5", "unordered-array-remove": "^1.0.2", - "ws": "^8.0.0" + "ws": "^8.17.0" }, "devDependencies": { "@mapbox/node-pre-gyp": "1.0.11", "@webtorrent/semantic-release-config": "1.0.10", "magnet-uri": "7.0.5", - "semantic-release": "21.1.2", "standard": "*", "tape": "5.7.5", - "undici": "^5.27.0", - "webtorrent-fixtures": "2.0.2", - "wrtc": "0.4.7" + "undici": "^6.16.1", + "webrtc-polyfill": "^1.1.5", + "webtorrent-fixtures": "2.0.2" }, "engines": { - "node": ">=12.20.0" + "node": ">=16.0.0" }, "exports": { "import": "./index.js" @@ -80,8 +79,8 @@ "license": "MIT", "main": "index.js", "optionalDependencies": { - "bufferutil": "^4.0.3", - "utf-8-validate": "^5.0.5" + "bufferutil": "^4.0.8", + "utf-8-validate": "^6.0.4" }, "repository": { "type": "git", diff --git a/test/evict.js b/test/evict.js index 76967fd3..385fae2a 100644 --- a/test/evict.js +++ b/test/evict.js @@ -1,7 +1,7 @@ import Client from '../index.js' import common from './common.js' import test from 'tape' -import wrtc from 'wrtc' +import wrtc from 'webrtc-polyfill' const infoHash = '4cb67059ed6bd08362da625b3ae77f6f4a075705' const peerId = Buffer.from('01234567890123456789') diff --git a/test/server.js b/test/server.js index cb1095e1..d4cf493e 100644 --- a/test/server.js +++ b/test/server.js @@ -1,7 +1,7 @@ import Client from '../index.js' import common from './common.js' import test from 'tape' -import wrtc from 'wrtc' +import wrtc from 'webrtc-polyfill' const infoHash = '4cb67059ed6bd08362da625b3ae77f6f4a075705' const peerId = Buffer.from('01234567890123456789') From 428fb224f5666731332738032649f4448b2e1e4f Mon Sep 17 00:00:00 2001 From: Cas_ <6506529+ThaUnknown@users.noreply.github.com> Date: Wed, 22 May 2024 23:55:47 +0200 Subject: [PATCH 10/28] fix: semantic release (#520) --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 809488d9..f97e3217 100644 --- a/package.json +++ b/package.json @@ -54,6 +54,7 @@ "@mapbox/node-pre-gyp": "1.0.11", "@webtorrent/semantic-release-config": "1.0.10", "magnet-uri": "7.0.5", + "semantic-release": "21.1.2", "standard": "*", "tape": "5.7.5", "undici": "^6.16.1", From 683fca88d69d9410d6608d0807fa45c3dc4caeb0 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Wed, 22 May 2024 21:58:44 +0000 Subject: [PATCH 11/28] chore(release): 11.1.0 # [11.1.0](https://github.com/webtorrent/bittorrent-tracker/compare/v11.0.2...v11.1.0) (2024-05-22) ### Bug Fixes * semantic release ([#520](https://github.com/webtorrent/bittorrent-tracker/issues/520)) ([428fb22](https://github.com/webtorrent/bittorrent-tracker/commit/428fb224f5666731332738032649f4448b2e1e4f)) ### Features * updated webrtc implementation ([#519](https://github.com/webtorrent/bittorrent-tracker/issues/519)) ([633d68a](https://github.com/webtorrent/bittorrent-tracker/commit/633d68a32c2c143fec0182317a9801dd1b64faef)) --- AUTHORS.md | 1 + CHANGELOG.md | 12 ++++++++++++ package.json | 2 +- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/AUTHORS.md b/AUTHORS.md index abe53c94..86740739 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -66,5 +66,6 @@ - Cas_ (6506529+ThaUnknown@users.noreply.github.com) - Arsène Fougerouse (arsene582@gmail.com) - Brad Marsden (silentbot1@gmail.com) +- krazak (krazak@vt.edu) #### Generated by tools/update-authors.sh. diff --git a/CHANGELOG.md b/CHANGELOG.md index 6db84216..02410224 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,15 @@ +# [11.1.0](https://github.com/webtorrent/bittorrent-tracker/compare/v11.0.2...v11.1.0) (2024-05-22) + + +### Bug Fixes + +* semantic release ([#520](https://github.com/webtorrent/bittorrent-tracker/issues/520)) ([428fb22](https://github.com/webtorrent/bittorrent-tracker/commit/428fb224f5666731332738032649f4448b2e1e4f)) + + +### Features + +* updated webrtc implementation ([#519](https://github.com/webtorrent/bittorrent-tracker/issues/519)) ([633d68a](https://github.com/webtorrent/bittorrent-tracker/commit/633d68a32c2c143fec0182317a9801dd1b64faef)) + ## [11.0.2](https://github.com/webtorrent/bittorrent-tracker/compare/v11.0.1...v11.0.2) (2024-03-12) diff --git a/package.json b/package.json index f97e3217..a190be68 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "bittorrent-tracker", "description": "Simple, robust, BitTorrent tracker (client & server) implementation", - "version": "11.0.2", + "version": "11.1.0", "author": { "name": "WebTorrent LLC", "email": "feross@webtorrent.io", From ed57d0c78a2fa6292fd4b04e650502fbc3a0da23 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 16 Jun 2024 03:02:54 +0000 Subject: [PATCH 12/28] chore(deps): update dependency tape to v5.8.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a190be68..d853ba3d 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "magnet-uri": "7.0.5", "semantic-release": "21.1.2", "standard": "*", - "tape": "5.7.5", + "tape": "5.8.0", "undici": "^6.16.1", "webrtc-polyfill": "^1.1.5", "webtorrent-fixtures": "2.0.2" From b21a6a5d0aa27014656b0490b4e34c94d045f87c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 17 Jun 2024 19:31:22 +0000 Subject: [PATCH 13/28] chore(deps): update dependency tape to v5.8.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d853ba3d..6d419276 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "magnet-uri": "7.0.5", "semantic-release": "21.1.2", "standard": "*", - "tape": "5.8.0", + "tape": "5.8.1", "undici": "^6.16.1", "webrtc-polyfill": "^1.1.5", "webtorrent-fixtures": "2.0.2" From 83a24ce77fb1a96b7fe4c383ce92d7c28fc165a7 Mon Sep 17 00:00:00 2001 From: Cas_ <6506529+ThaUnknown@users.noreply.github.com> Date: Mon, 1 Jul 2024 19:23:38 +0200 Subject: [PATCH 14/28] perf: drop clone (#523) --- lib/client/udp-tracker.js | 4 +++- package.json | 5 ++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/client/udp-tracker.js b/lib/client/udp-tracker.js index 3a3ad42a..b4ac4bdb 100644 --- a/lib/client/udp-tracker.js +++ b/lib/client/udp-tracker.js @@ -1,5 +1,4 @@ import arrayRemove from 'unordered-array-remove' -import clone from 'clone' import Debug from 'debug' import dgram from 'dgram' import Socks from 'socks' @@ -11,6 +10,9 @@ import compact2string from 'compact2string' const debug = Debug('bittorrent-tracker:udp-tracker') +// this was done some many years ago to fix "prevent Socks instances concurrency", and used some bloated package, no clue if it's needed, but this is simpler, #356 +const clone = obj => JSON.parse(JSON.stringify(obj)) + /** * UDP torrent tracker client (for an individual tracker) * diff --git a/package.json b/package.json index 6d419276..77be4b5e 100644 --- a/package.json +++ b/package.json @@ -27,12 +27,11 @@ }, "type": "module", "dependencies": { - "@thaunknown/simple-peer": "^10.0.6", - "@thaunknown/simple-websocket": "^9.1.1", + "@thaunknown/simple-peer": "^10.0.8", + "@thaunknown/simple-websocket": "^9.1.3", "bencode": "^4.0.0", "bittorrent-peerid": "^1.3.6", "chrome-dgram": "^3.0.6", - "clone": "^2.1.2", "compact2string": "^1.4.1", "cross-fetch-ponyfill": "^1.0.3", "debug": "^4.3.4", From 6a6280a03ce77b123df84f20f0f8b1172d8c193e Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Mon, 1 Jul 2024 17:27:05 +0000 Subject: [PATCH 15/28] chore(release): 11.1.1 ## [11.1.1](https://github.com/webtorrent/bittorrent-tracker/compare/v11.1.0...v11.1.1) (2024-07-01) ### Performance Improvements * drop clone ([#523](https://github.com/webtorrent/bittorrent-tracker/issues/523)) ([83a24ce](https://github.com/webtorrent/bittorrent-tracker/commit/83a24ce77fb1a96b7fe4c383ce92d7c28fc165a7)) --- CHANGELOG.md | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 02410224..0f7e29d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [11.1.1](https://github.com/webtorrent/bittorrent-tracker/compare/v11.1.0...v11.1.1) (2024-07-01) + + +### Performance Improvements + +* drop clone ([#523](https://github.com/webtorrent/bittorrent-tracker/issues/523)) ([83a24ce](https://github.com/webtorrent/bittorrent-tracker/commit/83a24ce77fb1a96b7fe4c383ce92d7c28fc165a7)) + # [11.1.0](https://github.com/webtorrent/bittorrent-tracker/compare/v11.0.2...v11.1.0) (2024-05-22) diff --git a/package.json b/package.json index 77be4b5e..71e0fb3d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "bittorrent-tracker", "description": "Simple, robust, BitTorrent tracker (client & server) implementation", - "version": "11.1.0", + "version": "11.1.1", "author": { "name": "WebTorrent LLC", "email": "feross@webtorrent.io", From e9d8f8cd754ba26d86f32f9b8da0c0c4a3dcd646 Mon Sep 17 00:00:00 2001 From: Cas_ <6506529+ThaUnknown@users.noreply.github.com> Date: Tue, 13 Aug 2024 23:38:01 +0200 Subject: [PATCH 16/28] fix: statuscode (#526) --- lib/client/http-tracker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/client/http-tracker.js b/lib/client/http-tracker.js index 6297d2e2..a31fb604 100644 --- a/lib/client/http-tracker.js +++ b/lib/client/http-tracker.js @@ -158,7 +158,7 @@ class HTTPTracker extends Tracker { if (this.destroyed) return if (res.status !== 200) { - return cb(new Error(`Non-200 response code ${res.statusCode} from ${this.announceUrl}`)) + return cb(new Error(`Non-200 response code ${res.status} from ${this.announceUrl}`)) } if (!data || data.length === 0) { return cb(new Error(`Invalid tracker response from${this.announceUrl}`)) From fd5ea54559e52b9c94e6f5dfd4ea3dc2bc8ef45b Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Tue, 13 Aug 2024 21:40:59 +0000 Subject: [PATCH 17/28] chore(release): 11.1.2 ## [11.1.2](https://github.com/webtorrent/bittorrent-tracker/compare/v11.1.1...v11.1.2) (2024-08-13) ### Bug Fixes * statuscode ([#526](https://github.com/webtorrent/bittorrent-tracker/issues/526)) ([e9d8f8c](https://github.com/webtorrent/bittorrent-tracker/commit/e9d8f8cd754ba26d86f32f9b8da0c0c4a3dcd646)) --- CHANGELOG.md | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f7e29d3..8992459f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [11.1.2](https://github.com/webtorrent/bittorrent-tracker/compare/v11.1.1...v11.1.2) (2024-08-13) + + +### Bug Fixes + +* statuscode ([#526](https://github.com/webtorrent/bittorrent-tracker/issues/526)) ([e9d8f8c](https://github.com/webtorrent/bittorrent-tracker/commit/e9d8f8cd754ba26d86f32f9b8da0c0c4a3dcd646)) + ## [11.1.1](https://github.com/webtorrent/bittorrent-tracker/compare/v11.1.0...v11.1.1) (2024-07-01) diff --git a/package.json b/package.json index 71e0fb3d..2906140c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "bittorrent-tracker", "description": "Simple, robust, BitTorrent tracker (client & server) implementation", - "version": "11.1.1", + "version": "11.1.2", "author": { "name": "WebTorrent LLC", "email": "feross@webtorrent.io", From 8b02864b510cd1082179dc88315a0a33c2097e7d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 17 Sep 2024 01:30:41 +0000 Subject: [PATCH 18/28] chore(deps): update dependency tape to v5.9.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2906140c..982272d3 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "magnet-uri": "7.0.5", "semantic-release": "21.1.2", "standard": "*", - "tape": "5.8.1", + "tape": "5.9.0", "undici": "^6.16.1", "webrtc-polyfill": "^1.1.5", "webtorrent-fixtures": "2.0.2" From f2f4990501f918bf6ab0106a03f9c7a1d0d1bbc8 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 7 Nov 2024 19:00:51 +0100 Subject: [PATCH 19/28] Add subpath import for client and server (#535) --- README.md | 3 +++ package.json | 10 +++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2f0d99c1..db0eba16 100644 --- a/README.md +++ b/README.md @@ -160,6 +160,7 @@ To start a BitTorrent tracker server to track swarms of peers: ```js import { Server } from 'bittorrent-tracker' +// Or import Server from 'bittorrent-tracker/server' const server = new Server({ udp: true, // enable udp server? [default=true] @@ -267,6 +268,8 @@ Scraping multiple torrent info is possible with a static `Client.scrape` method: ```js import Client from 'bittorrent-tracker' +// Or import Client from 'bittorrent-tracker/client' + Client.scrape({ announce: announceUrl, infoHash: [ infoHash1, infoHash2 ]}, function (err, results) { results[infoHash1].announce results[infoHash1].infoHash diff --git a/package.json b/package.json index 982272d3..8984180a 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,15 @@ "node": ">=16.0.0" }, "exports": { - "import": "./index.js" + ".": { + "import": "./index.js" + }, + "./client": { + "import": "./client.js" + }, + "./server": { + "import": "./server.js" + } }, "keywords": [ "bittorrent", From e45516d73a1ca546f7eeaf75d93e9b32ca3ca00f Mon Sep 17 00:00:00 2001 From: uriva Date: Fri, 29 Nov 2024 11:53:40 +0200 Subject: [PATCH 20/28] Bugfix - when using AbortController, errors on resulting stream must be caught (#539) * use-native-fetch * Bugfix: `res.body` should handle errors according to https://github.com/nodejs/undici/issues/3353#issuecomment-2184635954 * Revert "use-native-fetch" This reverts commit d65460319ea116fb28defc677af878cec42e8d43. * fix-quotes * some-build-targets-return-different-output --- lib/client/http-tracker.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/client/http-tracker.js b/lib/client/http-tracker.js index a31fb604..678f7a26 100644 --- a/lib/client/http-tracker.js +++ b/lib/client/http-tracker.js @@ -150,6 +150,7 @@ class HTTPTracker extends Tracker { 'user-agent': this.client._userAgent || '' } }) + if (res.body.on) res.body.on('error', cb) } catch (err) { if (err) return cb(err) } From 7c963a6f5e7664d7d12d44ca5bac61b910e7bd8f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 28 Dec 2024 12:45:50 +0000 Subject: [PATCH 21/28] chore(deps): update actions/cache action to v4 (#543) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 037e5acf..61c6902c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,7 +19,7 @@ jobs: with: node-version: 18 - name: Cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.npm key: ${{ runner.os }}-npm-${{ hashFiles('**/package.json') }} From e7de90c0cbcfb41c9c53c5caf69cc37c6d3ef1e8 Mon Sep 17 00:00:00 2001 From: Brad Marsden Date: Sat, 28 Dec 2024 13:16:20 +0000 Subject: [PATCH 22/28] feat: release #539 and #535 (#544) From 980919508807d76c52a7236ea90c94e25f9d5d8b Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Sat, 28 Dec 2024 13:19:22 +0000 Subject: [PATCH 23/28] chore(release): 11.2.0 # [11.2.0](https://github.com/webtorrent/bittorrent-tracker/compare/v11.1.2...v11.2.0) (2024-12-28) ### Features * release [#539](https://github.com/webtorrent/bittorrent-tracker/issues/539) and [#535](https://github.com/webtorrent/bittorrent-tracker/issues/535) ([#544](https://github.com/webtorrent/bittorrent-tracker/issues/544)) ([e7de90c](https://github.com/webtorrent/bittorrent-tracker/commit/e7de90c0cbcfb41c9c53c5caf69cc37c6d3ef1e8)) --- AUTHORS.md | 2 ++ CHANGELOG.md | 7 +++++++ package.json | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/AUTHORS.md b/AUTHORS.md index 86740739..50d9f2f4 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -67,5 +67,7 @@ - Arsène Fougerouse (arsene582@gmail.com) - Brad Marsden (silentbot1@gmail.com) - krazak (krazak@vt.edu) +- Chocobozzz (chocobozzz@cpy.re) +- uriva (uriva@users.noreply.github.com) #### Generated by tools/update-authors.sh. diff --git a/CHANGELOG.md b/CHANGELOG.md index 8992459f..84c04d73 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# [11.2.0](https://github.com/webtorrent/bittorrent-tracker/compare/v11.1.2...v11.2.0) (2024-12-28) + + +### Features + +* release [#539](https://github.com/webtorrent/bittorrent-tracker/issues/539) and [#535](https://github.com/webtorrent/bittorrent-tracker/issues/535) ([#544](https://github.com/webtorrent/bittorrent-tracker/issues/544)) ([e7de90c](https://github.com/webtorrent/bittorrent-tracker/commit/e7de90c0cbcfb41c9c53c5caf69cc37c6d3ef1e8)) + ## [11.1.2](https://github.com/webtorrent/bittorrent-tracker/compare/v11.1.1...v11.1.2) (2024-08-13) diff --git a/package.json b/package.json index 8984180a..4cb56fcd 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "bittorrent-tracker", "description": "Simple, robust, BitTorrent tracker (client & server) implementation", - "version": "11.1.2", + "version": "11.2.0", "author": { "name": "WebTorrent LLC", "email": "feross@webtorrent.io", From 934dc1bafc440146e3522eb39402cca222a102cb Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 4 Jan 2025 16:46:56 +0000 Subject: [PATCH 24/28] chore(deps): update dependency magnet-uri to v7.0.7 (#545) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4cb56fcd..071d7730 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "devDependencies": { "@mapbox/node-pre-gyp": "1.0.11", "@webtorrent/semantic-release-config": "1.0.10", - "magnet-uri": "7.0.5", + "magnet-uri": "7.0.7", "semantic-release": "21.1.2", "standard": "*", "tape": "5.9.0", From 3cd77f3e6f5b52f5d58adaf004b333cd2061a4da Mon Sep 17 00:00:00 2001 From: Cas_ <6506529+ThaUnknown@users.noreply.github.com> Date: Sun, 19 Jan 2025 23:33:16 +0100 Subject: [PATCH 25/28] fix: http announce no left (#548) * fix: http announce no left * fix: proper left check --- lib/client/http-tracker.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/client/http-tracker.js b/lib/client/http-tracker.js index 678f7a26..43464e8e 100644 --- a/lib/client/http-tracker.js +++ b/lib/client/http-tracker.js @@ -55,6 +55,8 @@ class HTTPTracker extends Tracker { peer_id: this.client._peerIdBinary, port: this.client._port }) + + if (params.left !== 0 && !params.left) params.left = 16384 if (this._trackerId) params.trackerid = this._trackerId this._request(this.announceUrl, params, (err, data) => { From b4557a7f65635f6ae8100828d51f257ed1a6d0b6 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Sun, 19 Jan 2025 22:36:07 +0000 Subject: [PATCH 26/28] chore(release): 11.2.1 ## [11.2.1](https://github.com/webtorrent/bittorrent-tracker/compare/v11.2.0...v11.2.1) (2025-01-19) ### Bug Fixes * http announce no left ([#548](https://github.com/webtorrent/bittorrent-tracker/issues/548)) ([3cd77f3](https://github.com/webtorrent/bittorrent-tracker/commit/3cd77f3e6f5b52f5d58adaf004b333cd2061a4da)) --- CHANGELOG.md | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 84c04d73..7f21349d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [11.2.1](https://github.com/webtorrent/bittorrent-tracker/compare/v11.2.0...v11.2.1) (2025-01-19) + + +### Bug Fixes + +* http announce no left ([#548](https://github.com/webtorrent/bittorrent-tracker/issues/548)) ([3cd77f3](https://github.com/webtorrent/bittorrent-tracker/commit/3cd77f3e6f5b52f5d58adaf004b333cd2061a4da)) + # [11.2.0](https://github.com/webtorrent/bittorrent-tracker/compare/v11.1.2...v11.2.0) (2024-12-28) diff --git a/package.json b/package.json index 071d7730..1593e197 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "bittorrent-tracker", "description": "Simple, robust, BitTorrent tracker (client & server) implementation", - "version": "11.2.0", + "version": "11.2.1", "author": { "name": "WebTorrent LLC", "email": "feross@webtorrent.io", From 15715518decfed77d7888ba21d6ab592fa91cc85 Mon Sep 17 00:00:00 2001 From: Subin Siby Date: Sat, 6 Sep 2025 17:55:35 +0530 Subject: [PATCH 27/28] fix: export WebSocketTracker (#558) --- package.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package.json b/package.json index 1593e197..f0166623 100644 --- a/package.json +++ b/package.json @@ -72,6 +72,9 @@ }, "./server": { "import": "./server.js" + }, + "./websocket-tracker": { + "import": "./lib/client/websocket-tracker.js" } }, "keywords": [ From 295c69ab61719a61952a342b04390abfa9e9ac08 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Sat, 6 Sep 2025 12:28:37 +0000 Subject: [PATCH 28/28] chore(release): 11.2.2 ## [11.2.2](https://github.com/webtorrent/bittorrent-tracker/compare/v11.2.1...v11.2.2) (2025-09-06) ### Bug Fixes * export WebSocketTracker ([#558](https://github.com/webtorrent/bittorrent-tracker/issues/558)) ([1571551](https://github.com/webtorrent/bittorrent-tracker/commit/15715518decfed77d7888ba21d6ab592fa91cc85)) --- AUTHORS.md | 1 + CHANGELOG.md | 7 +++++++ package.json | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/AUTHORS.md b/AUTHORS.md index 50d9f2f4..3b930ae6 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -69,5 +69,6 @@ - krazak (krazak@vt.edu) - Chocobozzz (chocobozzz@cpy.re) - uriva (uriva@users.noreply.github.com) +- Subin Siby (mail@subinsb.com) #### Generated by tools/update-authors.sh. diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f21349d..6b00b4dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [11.2.2](https://github.com/webtorrent/bittorrent-tracker/compare/v11.2.1...v11.2.2) (2025-09-06) + + +### Bug Fixes + +* export WebSocketTracker ([#558](https://github.com/webtorrent/bittorrent-tracker/issues/558)) ([1571551](https://github.com/webtorrent/bittorrent-tracker/commit/15715518decfed77d7888ba21d6ab592fa91cc85)) + ## [11.2.1](https://github.com/webtorrent/bittorrent-tracker/compare/v11.2.0...v11.2.1) (2025-01-19) diff --git a/package.json b/package.json index f0166623..ca9cebd6 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "bittorrent-tracker", "description": "Simple, robust, BitTorrent tracker (client & server) implementation", - "version": "11.2.1", + "version": "11.2.2", "author": { "name": "WebTorrent LLC", "email": "feross@webtorrent.io",