@decentnetwork/peer 0.1.13 → 0.1.15

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.
Files changed (2) hide show
  1. package/dist/peer.js +11 -0
  2. package/package.json +1 -1
package/dist/peer.js CHANGED
@@ -889,6 +889,12 @@ export class Peer {
889
889
  return;
890
890
  }
891
891
  this.#tracePacket("rx", packet, { host: remote.address, port: remote.port });
892
+ // TEMP: log every inbound UDP datagram so we can see if bootstraps reply at all
893
+ try {
894
+ const fs = require("fs");
895
+ fs.appendFileSync("/tmp/decent-udp-rx.log", `${new Date().toISOString()} from=${remote.address}:${remote.port} firstByte=0x${packet[0]?.toString(16) ?? "??"} len=${packet.length}\n`);
896
+ }
897
+ catch { /* best-effort */ }
892
898
  if (packet[0] === NET_PACKET_CRYPTO) {
893
899
  const opened = openToxDhtCryptoRequest(packet, this.#keyPair);
894
900
  if (!opened) {
@@ -1972,6 +1978,11 @@ export class Peer {
1972
1978
  const resp1 = r.status === "fulfilled" ? r.value : undefined;
1973
1979
  if (!resp1) {
1974
1980
  this.#debugLog(`self announce step1 no response from ${c.node.host}:${c.node.port}`);
1981
+ try {
1982
+ const fs = await import("fs");
1983
+ fs.appendFileSync("/tmp/decent-announce.log", `${new Date().toISOString()} step1 from=${c.node.host}:${c.node.port} NO_RESPONSE\n`);
1984
+ }
1985
+ catch { /* best-effort */ }
1975
1986
  continue;
1976
1987
  }
1977
1988
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decentnetwork/peer",
3
- "version": "0.1.13",
3
+ "version": "0.1.15",
4
4
  "description": "Pure TypeScript port of Elastos Carrier (toxcore-derived) P2P messaging. DHT, onion routing, TCP relay, FlatBuffers app payloads, Express offline relay. Wire-compatible with iOS Beagle and the Carrier C SDK.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",