@profullstack/threatcrush 0.13.80 → 0.13.81

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/dist/daemon.js CHANGED
@@ -20748,6 +20748,8 @@ var TorExitBlockEnforcer = class {
20748
20748
  opts;
20749
20749
  timer = null;
20750
20750
  applied = false;
20751
+ /** Set once if nft is not installed here; stops retrying and logging. */
20752
+ unavailable = false;
20751
20753
  runNft;
20752
20754
  log;
20753
20755
  intervalMs;
@@ -20763,6 +20765,7 @@ var TorExitBlockEnforcer = class {
20763
20765
  }
20764
20766
  /** Apply (or tear down) the block to match the current setting and list. */
20765
20767
  async sync() {
20768
+ if (this.unavailable) return;
20766
20769
  if (!this.opts.enabled()) {
20767
20770
  await this.teardown();
20768
20771
  return;
@@ -20776,6 +20779,11 @@ var TorExitBlockEnforcer = class {
20776
20779
  }
20777
20780
  this.applied = true;
20778
20781
  } catch (err) {
20782
+ if (err.code === "ENOENT") {
20783
+ this.unavailable = true;
20784
+ this.log("[tor] nft is not installed; the proactive Tor exit block is unavailable on this host");
20785
+ return;
20786
+ }
20779
20787
  this.log(`[tor] could not apply the proactive Tor exit block: ${err.message}`);
20780
20788
  }
20781
20789
  }
@@ -23130,7 +23138,7 @@ async function runDaemon() {
23130
23138
  sshIntrusion.start();
23131
23139
  const torBlock = new TorExitBlockEnforcer({
23132
23140
  exits: torExits,
23133
- enabled: () => remediation.blockTorSsh && firewallAdapter.name === "nftables",
23141
+ enabled: () => remediation.blockTorSsh,
23134
23142
  log: logLine
23135
23143
  });
23136
23144
  torBlock.start();