mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 20:11:19 -04:00
broker tracking a heap of snowflakes
This commit is contained in:
parent
28e557fb43
commit
0cd6852ad0
5 changed files with 183 additions and 20 deletions
|
@ -21,7 +21,6 @@ class Broker
|
|||
xhr = new XMLHttpRequest()
|
||||
try
|
||||
xhr.open 'POST', @url
|
||||
xhr
|
||||
catch err
|
||||
###
|
||||
An exception happens here when, for example, NoScript allows the domain on
|
||||
|
@ -35,14 +34,14 @@ class Broker
|
|||
# xhr.responseType = 'text'
|
||||
xhr.onreadystatechange = ->
|
||||
if xhr.DONE == xhr.readyState
|
||||
log 'Broker: ' + xhr.status
|
||||
if 200 == xhr.status
|
||||
log 'Broker: success'
|
||||
log 'Response: ' + xhr.responseText
|
||||
# @fac_complete xhr.responseText
|
||||
log xhr
|
||||
else
|
||||
log 'Broker error ' + xhr.status + ' - ' + xhr.statusText
|
||||
|
||||
xhr.send 'snowflake-testing'
|
||||
log "Broker: sent a registration message, waiting for reply..."
|
||||
|
||||
sendAnswer: (answer) ->
|
||||
log 'Sending answer to broker.'
|
||||
|
|
|
@ -8,7 +8,7 @@ Assume that the webrtc client plugin is always the offerer, in which case
|
|||
this must always act as the answerer.
|
||||
###
|
||||
DEFAULT_WEBSOCKET = '192.81.135.242:9901'
|
||||
DEFAULT_BROKER = 'https://snowflake-reg.appspot.com/reg/test'
|
||||
DEFAULT_BROKER = 'https://snowflake-reg.appspot.com/proxy'
|
||||
DEFAULT_PORTS =
|
||||
http: 80
|
||||
https: 443
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue