mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 20:11:19 -04:00
prepare for multiplexed snowflake (#11)
This commit is contained in:
parent
6b5a36ac84
commit
5e318b6219
4 changed files with 20 additions and 19 deletions
|
@ -8,15 +8,17 @@ Represents a single:
|
|||
class ProxyPair
|
||||
|
||||
MAX_BUFFER: 10 * 1024 * 1024
|
||||
pc: null
|
||||
pc: null
|
||||
c2rSchedule: []
|
||||
r2cSchedule: []
|
||||
client: null # WebRTC Data channel
|
||||
relay: null # websocket
|
||||
running: true
|
||||
client: null # WebRTC Data channel
|
||||
relay: null # websocket
|
||||
running: true
|
||||
active: false # Whether serving a client.
|
||||
flush_timeout_id: null
|
||||
|
||||
constructor: (@clientAddr, @relayAddr, @rateLimit) ->
|
||||
@active = false
|
||||
|
||||
# Prepare a WebRTC PeerConnection and await for an SDP offer.
|
||||
begin: ->
|
||||
|
@ -51,6 +53,7 @@ class ProxyPair
|
|||
log 'Invalid SDP message.'
|
||||
return false
|
||||
dbg 'SDP ' + offer.type + ' successfully received.'
|
||||
@active = true
|
||||
true
|
||||
|
||||
prepareDataChannel: (channel) =>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue