mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-14 14:11:23 -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
|
# WebRTC --> websocket
|
||||||
onClientToRelayMessage: (msg) =>
|
onClientToRelayMessage: (msg) =>
|
||||||
line = recv = msg.data
|
|
||||||
if DEBUG
|
if DEBUG
|
||||||
# Go sends only raw bytes...
|
log 'WebRTC --> websocket data: ' + msg.data.byteLength + ' bytes'
|
||||||
if '[object ArrayBuffer]' == recv.toString()
|
@c2rSchedule.push msg.data
|
||||||
bytes = new Uint8Array recv
|
|
||||||
line = String.fromCharCode.apply(null, bytes)
|
|
||||||
line = line.trim()
|
|
||||||
log 'WebRTC --> websocket data: ' + line
|
|
||||||
@c2rSchedule.push recv
|
|
||||||
@flush()
|
@flush()
|
||||||
|
|
||||||
# websocket --> WebRTC
|
# websocket --> WebRTC
|
||||||
onRelayToClientMessage: (event) =>
|
onRelayToClientMessage: (event) =>
|
||||||
@r2cSchedule.push event.data
|
@r2cSchedule.push event.data
|
||||||
# log 'websocket-->WebRTC data: ' + event.data
|
# log 'websocket --> WebRTC data: ' + event.data.byteLength + ' bytes'
|
||||||
@flush()
|
@flush()
|
||||||
|
|
||||||
onError: (event) =>
|
onError: (event) =>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue