From 817945510cff9e35f899d03b5817428c78ed4b89 Mon Sep 17 00:00:00 2001 From: Mathias Buus Date: Thu, 16 Sep 2021 22:28:49 +0200 Subject: [PATCH] make quickFirewall heuristic opt-out --- index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 38fa846..58d1232 100644 --- a/index.js +++ b/index.js @@ -41,6 +41,7 @@ class DHT extends EventEmitter { this._nat = new NatSampler() this._bind = opts.bind || 0 + this._quickFirewall = opts.quickFirewall !== false this._forcePersistent = opts.ephemeral === false this._repinging = 0 this._checks = 0 @@ -147,7 +148,7 @@ class DHT extends EventEmitter { // TODO: some papers describe more advanced ways of bootstrapping - we should prob look into that - let first = !this._forcePersistent + let first = this._quickFirewall && !this._forcePersistent let testNat = false const onlyFirewall = !this._forcePersistent