Opened 20 months ago

Closed 20 months ago

Last modified 20 months ago

#28732 closed defect (fixed)

Standardize on ArrayBuffer as the type of WebRTC messages

Reported by: dcf Owned by:
Priority: Medium Milestone:
Component: Circumvention/Snowflake Version:
Severity: Normal Keywords:
Cc: dcf, arlolra Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


Two problems:

  1. The proxy receives binary messages over an RTCDataChannel without specifying what the type of those messages should be. Some debugging code is written to handle the type ArrayBuffer, but when I tried it the type was actually Blob, which crashed the debug code.
  2. Snowflake uses exclusively binary WebRTC data, but the test code uses strings as message contents rather than one of the binary data types.

This wasn't a huge problem, because strings ArrayBuffers and Blobs are all valid to pass to WebSocket.send. The only other thing we do other than send them is take their length for the purpose of rate limiting, and that is broken.

This branch sets binaryType = "arraybuffer" so that we don't get unexpected Blob objects. It then makes changes to the test and rate-limiting code to standardize on the ArrayBuffer interface everywhere.

Child Tickets

Change History (3)

comment:1 Changed 20 months ago by dcf

Status: newneeds_review

comment:2 Changed 20 months ago by dcf

Resolution: fixed
Status: needs_reviewclosed

Merged this in 01bdcd6b28 and deployed to

comment:3 Changed 20 months ago by arlolra

Sorry for being slow here. For what it's worth, the changes seemed fine.

Note: See TracTickets for help on using tickets.