mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-14 05:11:19 -04:00
answer successfully roundtripped back from snowflake proxy through broker to client (#1)
This commit is contained in:
parent
7081e6328c
commit
c9013b2f80
5 changed files with 127 additions and 70 deletions
|
@ -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/proxy'
|
||||
DEFAULT_BROKER = 'https://snowflake-reg.appspot.com/'
|
||||
COPY_PASTE_ENABLED = false
|
||||
DEFAULT_PORTS =
|
||||
http: 80
|
||||
|
@ -104,8 +104,8 @@ class Snowflake
|
|||
poll = =>
|
||||
recv = broker.getClientOffer()
|
||||
recv.then((desc) =>
|
||||
log 'Received:\n\n' + desc + '\n'
|
||||
offer = JSON.parse desc
|
||||
log 'Received:\n\n' + offer.sdp + '\n'
|
||||
@receiveOffer offer
|
||||
, (err) ->
|
||||
log err
|
||||
|
@ -113,13 +113,6 @@ class Snowflake
|
|||
)
|
||||
poll()
|
||||
|
||||
# if @proxyPairs.length >= MAX_NUM_CLIENTS * CONNECTIONS_PER_CLIENT
|
||||
# setTimeout(@proxyMain, @broker_poll_interval * 1000)
|
||||
# return
|
||||
# params = [['r', '1']]
|
||||
# params.push ['transport', 'websocket']
|
||||
# params.push ['transport', 'webrtc']
|
||||
|
||||
# Receive an SDP offer from client plugin.
|
||||
receiveOffer: (desc) =>
|
||||
sdp = new RTCSessionDescription desc
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue