mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-14 05:11:19 -04:00
Move querystring access to init
This commit is contained in:
parent
3839c2e0b1
commit
edbbea1d03
3 changed files with 11 additions and 13 deletions
|
@ -22,14 +22,10 @@ class Snowflake
|
|||
WEBRTC_READY: 2
|
||||
|
||||
# Prepare the Snowflake with a Broker (to find clients) and optional UI.
|
||||
constructor: (@broker, @ui) ->
|
||||
constructor: (@broker, @ui, rateLimitBytes) ->
|
||||
@state = Snowflake.MODE.INIT
|
||||
@proxyPairs = []
|
||||
|
||||
rateLimitBytes = undefined
|
||||
if 'off' != query['ratelimit']
|
||||
rateLimitBytes = Params.getByteCount(query, 'ratelimit',
|
||||
DEFAULT_RATE_LIMIT)
|
||||
if undefined == rateLimitBytes
|
||||
@rateLimit = new DummyRateLimit()
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue