Integrating DCUtR with Circuit Relay v2 for Robust NAT Traversal #786
Winter-Soren
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Overview
This discussion outlines the approach for integrating Direct Connection Upgrade through Relay (DCUtR) with Circuit Relay v2 in py-libp2p, enabling robust NAT traversal and resilient peer connectivity. The integration aims to provide fallback and upgrade mechanisms between relayed and direct connections.
Motivation
Workflow Diagram
Integration Approaches
Approach 1: Proactive Upgrade with Signal-Based Detection
Relay connections are established as needed, but the system actively monitors the health and performance of the relay connection. If certain signals (e.g., high latency, handshake failures, stream resets, or timeouts) are detected, the system proactively attempts a DCUtR (hole punch) upgrade to a direct connection. All failures and switching events are logged for diagnostics.
Key Features:
Approach 2: Opportunistic Upgrade After Relay Establishment
After establishing a relay connection, the system always attempts a DCUtR upgrade to a direct connection, regardless of the relay connection’s health or performance. This is a simpler, more aggressive approach that does not wait for signals or issues before attempting the upgrade.
Key Features:
Comparison Table
Beta Was this translation helpful? Give feedback.
All reactions