Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

assign roles after TCP simultaneous connect, describe how hole punching works on QUIC #361

Merged
merged 2 commits into from
Aug 23, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 17 additions & 5 deletions relay/DCUtR.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,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