[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [snowflake/master] Remove Util.mightBeTBB



commit 8de6e26c597edadac633ae8bed163893f4d932e2
Author: Arlo Breault <arlolra@xxxxxxxxx>
Date:   Fri Jul 26 15:10:44 2019 -0400

    Remove Util.mightBeTBB
    
    Trac 31222
---
 proxy/init-badge.js |  5 -----
 proxy/util.js       | 18 +-----------------
 2 files changed, 1 insertion(+), 22 deletions(-)

diff --git a/proxy/init-badge.js b/proxy/init-badge.js
index b240456..4a331c3 100644
--- a/proxy/init-badge.js
+++ b/proxy/init-badge.js
@@ -114,11 +114,6 @@ var debug, snowflake, config, broker, ui, log, dbg, init, update, silenceNotific
       return;
     }
 
-    if (Util.mightBeTBB()) {
-      ui.missingFeature("Will not run within Tor Browser.");
-      return;
-    }
-
     config = new Config;
     if ('off' !== query.get('ratelimit')) {
       config.rateLimitBytes = Params.getByteCount(query, 'ratelimit', config.rateLimitBytes);
diff --git a/proxy/util.js b/proxy/util.js
index 8fa6d9c..42843d7 100644
--- a/proxy/util.js
+++ b/proxy/util.js
@@ -1,4 +1,4 @@
-/* exported Params, DummyRateLimit */
+/* exported Util, Params, DummyRateLimit */
 
 /*
 A JavaScript WebRTC snowflake proxy
@@ -8,12 +8,6 @@ Contains helpers for parsing query strings and other utilities.
 
 class Util {
 
-  static mightBeTBB() {
-    return Util.TBB_UAS.indexOf(window.navigator.userAgent) > -1 && (
-      window.navigator.mimeTypes && window.navigator.mimeTypes.length === 0
-    );
-  }
-
   static genSnowflakeID() {
     return Math.random().toString(36).substring(2);
   }
@@ -28,16 +22,6 @@ class Util {
 
 }
 
-// It would not be effective for Tor Browser users to run the proxy.
-// Do we seem to be running in Tor Browser? Check the user-agent string and for
-// no listing of supported MIME types.
-Util.TBB_UAS = [
-  'Mozilla/5.0 (Windows NT 6.1; rv:10.0) Gecko/20100101 Firefox/10.0',
-  'Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20100101 Firefox/17.0',
-  'Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Firefox/24.0',
-  'Mozilla/5.0 (Windows NT 6.1; rv:31.0) Gecko/20100101 Firefox/31.0'
-];
-
 
 class Parse {
 

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits