#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
_______________________________________________ tor-bugs mailing list tor-bugs@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs