feat: add DCUtR hole-punch interop test app - #281
Open
adust09 wants to merge 2 commits into
Open
Conversation
Hole punching against a real NAT needs the outgoing SYN to leave from the listen port and DCUtR CONNECT to advertise Identify observed addresses (NAT mappings), not LAN listen addrs. The new libp2p-hole-punch binary speaks the unified-testing hole-punch contract so hs can join the upstream matrix after this lands. Refs #131
Use the harness role, routing, address, timeout, and latency contracts so DCUtR runs through the real NAT topology. Keep simultaneous-open source ports aligned with observed relay mappings and make failed parallel dials exception-safe.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SO_REUSEADDR/SO_REUSEPORTto the listen port so the NAT mapping matches the address advertised in DCUtR CONNECT.libp2p-hole-punchimplements the current unified-testing role, environment, Redis coordination, routing, timeout, and nested latency YAML contracts.Why
Refs #131. DCUtR was only exercised on loopback. The upstream hole-punch harness puts both peers behind separate SNAT routers, so simultaneous opens must reuse the source port whose mapped address was learned through the relay.
The unified-testing
images.yamlPR remains a follow-up because its GitHub source builder must pin a merged commit from this repository.Test plan
make -C interop hole-punch-self-testagainst two local NAT routerslibp2p/unified-testingharness (4ade567b), Linux routers + Rust relay:latency.handshake_plus_one_rtt,ping_rtt, andunitlibp2p/unified-testingaddinghaskell-v0.1tohole-punch/images.yaml