@torrent-tv/proxy 2.55.10 → 2.55.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## 2.55.12
2
+
3
+ - **Fix**: `--sctp-debug` now passes the required callback to `initLogger` (`node-datachannel` 0.32.x needs two args). The 2.55.10 single-arg call always threw `Function expected` and left verbose logging off.
4
+
5
+ ## 2.55.11
6
+
7
+ - **Fix**: `initLogger('Verbose')` call for `--sctp-debug` used the wrong `this` binding and never enabled verbose logging (`Function expected`). Call it as a method on the imported module's default export so the SCTP debug lines appear.
8
+
1
9
  ## 2.55.10
2
10
 
3
11
  - **Change**: Add `--sctp-debug` (off by default). When enabled, the proxy calls `node-datachannel.initLogger('Verbose')` early so SCTP-level lines (`usrsctp: …`) become visible. Useful only with an image rebuilt with `SCTP_DEBUG=ON` (addon 0.48.0) — there they carry the SACK `a_rwnd` and gap information that separates the two remaining hypotheses for the delivery-side freeze of 2026-08-24/25.
package/bin/cli.js CHANGED
@@ -287,13 +287,14 @@ try {
287
287
  // SCTP_DEBUG=ON (addon 0.48.0); this flag merely sets the log level.
288
288
  if (options.sctpDebug) {
289
289
  try {
290
- const dc = await import("node-datachannel");
291
- const initLogger =
292
- // node-datachannel exports initLogger at the top level; be defensive
293
- // about CJS-default interop.
294
- dc.initLogger ?? dc.default?.initLogger ?? null;
295
- if (typeof initLogger === "function") {
296
- initLogger("Verbose");
290
+ const mod = await import("node-datachannel");
291
+ const target = mod.default ?? mod;
292
+ if (typeof target.initLogger === "function") {
293
+ target.initLogger("Verbose", (level, message) => {
294
+ if (typeof message === "string" && message.startsWith("usrsctp:")) {
295
+ logger.info(message);
296
+ }
297
+ });
297
298
  logger.info("SCTP debug verbose logging enabled");
298
299
  }
299
300
  } catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@torrent-tv/proxy",
3
- "version": "2.55.10",
3
+ "version": "2.55.12",
4
4
  "description": "Torrent proxy client that exposes webseed-like HTTP stream endpoint.",
5
5
  "license": "GPL-3.0-or-later",
6
6
  "publishConfig": {