Skip to content
This repository was archived by the owner on Nov 22, 2023. It is now read-only.
This repository was archived by the owner on Nov 22, 2023. It is now read-only.

Decentralized hole punching #224

@alexander-camuto

Description

@alexander-camuto
  • We currently use ngrok as a NAT hole punching solution. Although easy to use this introduces a myriad of setbacks:
    • ngrok servers are not distributed geographically, so we really take a hit in performance
    • ngrok code is proprietary so its hard to figure out what exactly is going on behind the scenes
    • ngrok relays / servers can't act as providers on our network -- which is a missed opportunity

In light of the PL project flare developments we should consider rolling out their relay-circuit v2 implementation for the public nodes on our networks (i.e those not behind a NAT).

Some brief notes on how to implement this:

  • Use autonat to determine if a node is behind a NAT or not -- if not, automatically promote a node to a relay.
  • Multi-address can contain information as to whether a peer requires a connection via a relay or not -- and through which relay.
  • Relays can see requests for content and would determine if they themselves should cache the content to boost performance and avoid the messaging roundtrips hole-punching requires -- this would be a first step in introducing a performance boosting hierarchy to the network.
  • Baking in support for WebRTC would remove the need for the DNS records we have to maintain atm -- which would make it easier to onboard new providers (as WebRTC is currently the only protocol that can perform hole-punching browser side)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions