mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-14 23:11:29 -04:00
Start on popup
This commit is contained in:
parent
11efa42e4c
commit
91255463c6
6 changed files with 87 additions and 16 deletions
|
@ -68,14 +68,14 @@ class ProxyPair
|
|||
channel.onopen = =>
|
||||
log 'WebRTC DataChannel opened!'
|
||||
snowflake.state = Snowflake.MODE.WEBRTC_READY
|
||||
snowflake.ui?.setActive true
|
||||
snowflake.ui.setActive true
|
||||
# This is the point when the WebRTC datachannel is done, so the next step
|
||||
# is to establish websocket to the server.
|
||||
@connectRelay()
|
||||
channel.onclose = =>
|
||||
log 'WebRTC DataChannel closed.'
|
||||
snowflake.ui?.setStatus 'disconnected by webrtc.'
|
||||
snowflake.ui?.setActive false
|
||||
snowflake.ui.setStatus 'disconnected by webrtc.'
|
||||
snowflake.ui.setActive false
|
||||
snowflake.state = Snowflake.MODE.INIT
|
||||
@flush()
|
||||
@close()
|
||||
|
@ -108,11 +108,11 @@ class ProxyPair
|
|||
clearTimeout @timer
|
||||
@timer = 0
|
||||
log @relay.label + ' connected!'
|
||||
snowflake.ui?.setStatus 'connected'
|
||||
snowflake.ui.setStatus 'connected'
|
||||
@relay.onclose = =>
|
||||
log @relay.label + ' closed.'
|
||||
snowflake.ui?.setStatus 'disconnected.'
|
||||
snowflake.ui?.setActive false
|
||||
snowflake.ui.setStatus 'disconnected.'
|
||||
snowflake.ui.setActive false
|
||||
snowflake.state = Snowflake.MODE.INIT
|
||||
@flush()
|
||||
@close()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue