relay/dcutr/quic: Alternate host sending garbage UDP packet
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 1.8k
- Forks
- 320
- Avg merge
- 11d 15h
- Merged PRs (30d)
- 1
Description
Today during direct connection upgrade on QUIC, A sends a client hello, B sends random bytes. The client hello makes it through B's firewall and/or NAT through the hole punched by the random bytes sent by B. B's consecutive server hello makes it through A's firewall and/or NAT through the hole punched by A's client hello.
- For a QUIC address:
- Upon receiving the
Sync,Aimmediately dials the address toB.- Upon expiry of the timer,
Bstarts to send UDP packets filled with
random bytes toA's address. Packets should be sent repeatedly in
random intervals between 10 and 200 ms.- This will result in a QUIC connection where
Ais the client andBis
the server.
https://github.com/libp2p/specs/blob/master/relay/DCUtR.md#the-protocol
Now assume that B is behind a symmetric NAT but A is not. A's client hello will not make it through B's NAT, given that it (most likely) does not have the same destination port as the translated source port of B's random bytes.
If we would alternate the roles on retries in DCUtR, e.g. have B be the one to send random bytes in round 1 and A be the one to send random bytes in round 2, the above scenario would succeed on the second try, given that B is not behind a symmetric NAT.
Note that we could as well have both A and B send client hellos in the first round. The downside is, that contrary with TCP and simultaneous open, we might end up with two QUIC connections. One from A to B and one from B to A.
//CC @elenaf9 and @dennis-tra as discussed today.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the DCUtR protocol section linked in the issue and review the described QUIC address exchange, retry timing, and alternate-role proposal. Determine the intended retry behavior and document the agreed protocol change, including how completion is verified without creating duplicate connections.
Written by the indexing model from the issue text.
Assessment
- Domain
- networking
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100