[tor-commits] [snowflake-webext/master] Do not set NAT type to unknown after failed test

cohosh at torproject.org cohosh at torproject.org
Wed Jan 27 17:13:28 UTC 2021


commit fa578972db6d69fb9d2763b83c119a57fefe95a7
Author: Cecylia Bocovich <cohosh at torproject.org>
Date:   Thu Jan 21 10:12:05 2021 -0500

    Do not set NAT type to unknown after failed test
    
    If a previous NAT check has succeeded and we fail to contact the probe
    server, do not set the NAT type to unknown. Most proxies will probably
    not change their NAT type frequently, so this will prevent an outage of
    the probe service from wiping out our unrestricted proxy pool.
---
 init-badge.js  | 1 -
 init-webext.js | 1 -
 2 files changed, 2 deletions(-)

diff --git a/init-badge.js b/init-badge.js
index 6c4c7a7..784ffc8 100644
--- a/init-badge.js
+++ b/init-badge.js
@@ -155,7 +155,6 @@ var debug, snowflake, config, broker, ui, log, dbg, init, update, initNATType, s
         _this.natType = type;
       }).catch((e) => {
         console.log(e);
-        _this.natType = "unknown";
       });
       // reset NAT type every 24 hours in case proxy location changed
       setTimeout(_this.initNATType, 24 * 60 * 60 * 1000);
diff --git a/init-webext.js b/init-webext.js
index 0a2c22b..8a756ec 100644
--- a/init-webext.js
+++ b/init-webext.js
@@ -33,7 +33,6 @@ class WebExtUI extends UI {
         _this.natType = type;
       }).catch((e) => {
         console.log(e);
-        _this.natType = "unknown";
       });
       // reset NAT type every 24 hours in case proxy location changed
       setTimeout(_this.initNATType, 24 * 60 * 60 * 1000);





More information about the tor-commits mailing list