uProxy/socks-rtc — pull request #59 by yangoon (2014-03-26 20:57:01+00:00)
Title: Pipe UDP traffic through the encrypted data channel

This completes UDP support.

Main change here is how socks.ts and socks-to-rtc.ts communicate: Socks.Session is no more, and now they both use EndpointInfo objects to talk to one another. Socks.Session wasn't working for me because one UDP session can result in connections to many different hosts (meaning multiple data channels). A new class, Socks.UdpSession, handles this complication: it decodes the UDP headers, keeping udprelay.ts and, on the remote side, udpclient.ts, nice and simple (in fact they're almost identical and some refactoring in the future could unify them).

Existing unit and integration tests pass. UDP support tested with the help of redsocks and an echo server:
https://docs.google.com/a/google.com/document/d/150cwwDqfTe0_Os-FTTVO9DNG4wqxNlksxxo2QeFj1bA/edit?usp=sharing

Note: I can't guarantee this will support, say, a Skype call but I think if it doesn't it should be a matter of bug fixes rather than a fundamental redesign.