mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-14 05:11:19 -04:00
Only console.log the number of bytes, not the literal message.
It doesn't really help to have a bunch TLS application records interpreted as a string written to the console.
This commit is contained in:
parent
aa668bdc92
commit
f06104d182
1 changed files with 3 additions and 9 deletions
|
@ -132,21 +132,15 @@ class ProxyPair
|
|||
|
||||
# WebRTC --> websocket
|
||||
onClientToRelayMessage: (msg) =>
|
||||
line = recv = msg.data
|
||||
if DEBUG
|
||||
# Go sends only raw bytes...
|
||||
if '[object ArrayBuffer]' == recv.toString()
|
||||
bytes = new Uint8Array recv
|
||||
line = String.fromCharCode.apply(null, bytes)
|
||||
line = line.trim()
|
||||
log 'WebRTC --> websocket data: ' + line
|
||||
@c2rSchedule.push recv
|
||||
log 'WebRTC --> websocket data: ' + msg.data.byteLength + ' bytes'
|
||||
@c2rSchedule.push msg.data
|
||||
@flush()
|
||||
|
||||
# websocket --> WebRTC
|
||||
onRelayToClientMessage: (event) =>
|
||||
@r2cSchedule.push event.data
|
||||
# log 'websocket-->WebRTC data: ' + event.data
|
||||
# log 'websocket --> WebRTC data: ' + event.data.byteLength + ' bytes'
|
||||
@flush()
|
||||
|
||||
onError: (event) =>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue