mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-14 23:11:29 -04:00
Begin spec for proxy-side broker interaction
This commit is contained in:
parent
547cb9690a
commit
548c100160
3 changed files with 41 additions and 0 deletions
|
@ -17,6 +17,7 @@ class Broker
|
|||
|
||||
clients: 0
|
||||
id: null
|
||||
request: null
|
||||
|
||||
# When interacting with the Broker, snowflake must generate a unique session
|
||||
# ID so the Broker can keep track of which signalling channel it's speaking
|
||||
|
@ -34,6 +35,7 @@ class Broker
|
|||
getClientOffer: ->
|
||||
new Promise (fulfill, reject) =>
|
||||
xhr = new XMLHttpRequest()
|
||||
@request = xhr
|
||||
try
|
||||
xhr.open 'POST', @url + 'proxy'
|
||||
xhr.setRequestHeader('X-Session-ID', @id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue