uProxy/socks-rtc — pull request #55 by yangoon (2014-03-17 20:49:14+00:00)
Title: migrate from peerconnection to transport

This moves socks-to-rtc and rtc-to-net over to the new transport API. I ran into some issues with message delivery on Chrome 33 (on Linux) that delayed this by a day.

Two caveats:
- The Transport API provider isn't in freedom-runtime-chrome. So, for right now, I've added Freedom as a runtime dependency just to grab the provider. We can get rid of that as soon as we're ready to move to freedom-for-chrome.
- Peerconnection messages had both text and ArrayBuffer fields -- Transport just has an ArrayBuffer. So, for the "commands" (SOCKS-CONNECT, SOCKS-DISCONNECTED, NET-DISCONNECTED) I've taken to sending them on a special "control" datachannel. Those messages aren't typed, and we should review the general asynchronicity-ness of SOCKS <-> RTC <-> NET events some more (especially since we're now establishing the net connection on its own datachannel) but this seems to work quite well (there were already some TODOs concerning asynchronicity...I'll make this a followup commit).

Tested with grunt test and grunt endtoend (UDP still works, too).