[tor-bugs] #34042 [Circumvention/Snowflake]: Reduce DataChannelTimeout

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Apr 28 16:11:35 UTC 2020


#34042: Reduce DataChannelTimeout
-------------------------------------+------------------------
 Reporter:  dcf                      |          Owner:  (none)
     Type:  enhancement              |         Status:  new
 Priority:  Medium                   |      Milestone:
Component:  Circumvention/Snowflake  |        Version:
 Severity:  Normal                   |     Resolution:
 Keywords:                           |  Actual Points:
Parent ID:                           |         Points:
 Reviewer:                           |        Sponsor:
-------------------------------------+------------------------

Comment (by dcf):

 Replying to [comment:2 cohosh]:
 > I just realized that we can't use the datachannel timeout to detect non-
 working proxies on the client-side the same way we do on the proxy side.
 The client initiates the datachannel, so once they set the remote
 description, they will call `datachannel.OnOpen` regardless of whether or
 not the proxy is reachable.

 That's not how it works for me. On the client, `OnOpen` never gets called
 for a non-working proxy. I.e., you get a `DataChannel created` log line
 ([https://gitweb.torproject.org/pluggable-
 transports/snowflake.git/tree/client/lib/webrtc.go#n209 line 209]) but not
 a `DataChannel.OnOpen` log line ([https://gitweb.torproject.org/pluggable-
 transports/snowflake.git/tree/client/lib/webrtc.go#n187 line 187]).

 You may be thinking of the `PeerConnection` that gets created on the
 client by setting the remote description, not the `DataChannel`.

 Non-working proxy looks like this, note `timeout waiting for
 DataChannel.OnOpen` 10 seconds after `DataChannel created`:
 {{{
 2020/04/28 02:39:03 snowflake-599035b6d7ce9d2d  connecting...
 2020/04/28 02:39:03 WebRTC: Created offer
 2020/04/28 02:39:03 WebRTC: Set local description
 2020/04/28 02:39:03 WebRTC: Got ICE candidate: host [scrubbed]
 2020/04/28 02:39:03 WebRTC: Got ICE candidate: srflx [scrubbed] related
 [scrubbed]
 2020/04/28 02:39:03 WebRTC: Got ICE candidate: srflx [scrubbed] related
 [scrubbed]2
 2020/04/28 02:39:03 WebRTC: Done gathering candidates
 2020/04/28 02:39:03 WebRTC: PeerConnection created.
 2020/04/28 02:39:03 Negotiating via BrokerChannel...
 Target URL:  snowflake-broker.azureedge.net
 Front URL:   ajax.aspnetcdn.com
 2020/04/28 02:39:04 BrokerChannel Response:
 200 OK

 2020/04/28 02:39:04 Received Answer.
 2020/04/28 02:39:04 WebRTC: DataChannel created.
 2020/04/28 02:39:14 establishDataChannel: timeout waiting for
 DataChannel.OnOpen
 2020/04/28 02:39:14 WebRTC: closing PeerConnection
 2020/04/28 02:39:14 WebRTC: Closing
 }}}

 Working proxy looks like this, note `DataChannel.OnOpen` 3 seconds after
 `DataChannel created`:
 {{{
 2020/04/28 02:39:24 WebRTC: Created offer
 2020/04/28 02:39:24 WebRTC: Set local description
 2020/04/28 02:39:24 WebRTC: Got ICE candidate: srflx [scrubbed] related
 [scrubbed]3
 2020/04/28 02:39:24 WebRTC: Got ICE candidate: host [scrubbed]
 2020/04/28 02:39:24 WebRTC: Got ICE candidate: srflx [scrubbed] related
 [scrubbed]
 2020/04/28 02:39:24 WebRTC: Done gathering candidates
 2020/04/28 02:39:24 WebRTC: PeerConnection created.
 2020/04/28 02:39:24 Negotiating via BrokerChannel...
 Target URL:  snowflake-broker.azureedge.net
 Front URL:   ajax.aspnetcdn.com
 2020/04/28 02:39:24 BrokerChannel Response:
 200 OK

 2020/04/28 02:39:24 Received Answer.
 2020/04/28 02:39:24 WebRTC: DataChannel created.
 2020/04/28 02:39:27 WebRTC: DataChannel.OnOpen
 2020/04/28 02:39:27 ---- Handler: snowflake assigned ----
 2020/04/28 02:39:31 Traffic Bytes (in|out): 318864 | 49898 -- (262
 OnMessages, 235 Sends)
 }}}

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


More information about the tor-bugs mailing list