mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 20:11:19 -04:00
Remove Util.mightBeTBB
Trac 31222
This commit is contained in:
parent
5d26f76ba1
commit
8de6e26c59
2 changed files with 1 additions and 22 deletions
|
@ -114,11 +114,6 @@ var debug, snowflake, config, broker, ui, log, dbg, init, update, silenceNotific
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Util.mightBeTBB()) {
|
|
||||||
ui.missingFeature("Will not run within Tor Browser.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
config = new Config;
|
config = new Config;
|
||||||
if ('off' !== query.get('ratelimit')) {
|
if ('off' !== query.get('ratelimit')) {
|
||||||
config.rateLimitBytes = Params.getByteCount(query, 'ratelimit', config.rateLimitBytes);
|
config.rateLimitBytes = Params.getByteCount(query, 'ratelimit', config.rateLimitBytes);
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* exported Params, DummyRateLimit */
|
/* exported Util, Params, DummyRateLimit */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
A JavaScript WebRTC snowflake proxy
|
A JavaScript WebRTC snowflake proxy
|
||||||
|
@ -8,12 +8,6 @@ Contains helpers for parsing query strings and other utilities.
|
||||||
|
|
||||||
class Util {
|
class Util {
|
||||||
|
|
||||||
static mightBeTBB() {
|
|
||||||
return Util.TBB_UAS.indexOf(window.navigator.userAgent) > -1 && (
|
|
||||||
window.navigator.mimeTypes && window.navigator.mimeTypes.length === 0
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
static genSnowflakeID() {
|
static genSnowflakeID() {
|
||||||
return Math.random().toString(36).substring(2);
|
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 {
|
class Parse {
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue