[tor-bugs] #34278 [Circumvention/Snowflake]: Handling connection failures.

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu Jun 4 19:46:02 UTC 2020


#34278: Handling connection failures.
-------------------------------------+-----------------------------------
 Reporter:  HashikD                  |          Owner:  (none)
     Type:  task                     |         Status:  needs_information
 Priority:  Medium                   |      Milestone:
Component:  Circumvention/Snowflake  |        Version:
 Severity:  Normal                   |     Resolution:
 Keywords:  snowflake-mobile         |  Actual Points:
Parent ID:                           |         Points:
 Reviewer:                           |        Sponsor:
-------------------------------------+-----------------------------------

Comment (by cohosh):

 This is a really good question, and one that we've worked on with the
 other proxy implementations.

 There are a few things we can look for to close a connection. In the
 Google API, there should be an `OnClose` event: https://webrtc.org
 /getting-started/data-channels#open_and_close_events
 that we can add a listener to. You can see that in our Javascript proxy
 code [https://gitweb.torproject.org/pluggable-transports/snowflake-
 webext.git/tree/proxypair.js#n91 here].

 We also want to close if there is an error (see
 [https://gitweb.torproject.org/pluggable-transports/snowflake-
 webext.git/tree/proxypair.js#n175 here]).

 We also added a timeout as an extra check. We can do this because the
 underlying layer is sending keep-alive messages every 10 seconds. You can
 see that in the existing code [https://gitweb.torproject.org/pluggable-
 transports/snowflake-webext.git/tree/proxypair.js#n160 here].

 We also want to close the connection if it is closed or we receive an
 error from the WebSocket side. See [https://gitweb.torproject.org
 /pluggable-transports/snowflake-webext.git/tree/proxypair.js#n131 here].

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/34278#comment:7>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list