Skip to content

Commit

Permalink
relay/DCUtR: Assign roles and describe hole punching on QUIC (#361)
Browse files Browse the repository at this point in the history
  • Loading branch information
marten-seemann authored Aug 23, 2021
1 parent 0076c69 commit b420064
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions relay/DCUtR.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,23 @@ connection upgrade protocol as follows:
4. Upon receiving the `Connect`, `B` sends a `Sync` message and starts a timer
for half the RTT measured from the time between sending the initial `Connect`
and receiving the response.
5. Simultaneous Connect
- Upon receiving the `Sync`, `A` immediately starts a direct dial to B using
the addresses obtained from the `Connect` message.
- Upon expiry of the timer, `B` starts a direct dial to `A` using the
addresses obtained from the `Connect` message.
5. Simultaneous Connect. This depends on the transport in use:
- For TCP:
- Upon receiving the `Sync`, `A` immediately starts a direct dial to B using
the addresses obtained from the `Connect` message.
- Upon expiry of the timer, `B` starts a direct dial to `A` using the
addresses obtained from the `Connect` message.
- This will result in a TCP Simultaneous Connect. For the purpose of all
protocols run on top of this TCP connection, `A` is assumed to be the
client and `B` the server.
- For QUIC:
- Upon receiving the `Sync`, `A` immediately starts a direct dial to B using
the addresses obtained from the `Connect` message.
- Upon expiry of the timer, `B` starts to send UDP packets filled with
random bytes to the addresses obtained from the `Connect` message.
Packets should be sent in random intervals between 10 and 200 ms.
- This will result in a QUIC connection where `A` is the client and `B`
is the server.
6. On failure go back to step (2), reusing the same stream opened in (1).
Inbound peers (here `B`) SHOULD retry twice (thus a total of 3 attempts)
before considering the upgrade as failed.
Expand Down

0 comments on commit b420064

Please sign in to comment.