freedomjs/freedom — pull request #45 by dborkan (2014-05-27 21:19:31+00:00)
Title: Add parameter to freedom.transport.setup to immediately initiate a connection, then fulfill promise when it succeeds.

Add parameter to freedom.transport.setup to immediately initiate a connection, then fulfill promise when it succeeds.

This is needed so that we can verify that a webrtc connection is established and won't set chrome's proxy settings before our socks-to-rtc proxy is up and running.

Rather than always try to initiate a connection, this is a boolean parameter with the intention that only 1 side of the webrtc connection will set this to true. In our case socks-to-rtc (client-side) sets the new param to true, but rtc-to-net (server-side) does not and just waits for the incoming connection.