Skip to content
This repository has been archived by the owner on Sep 9, 2022. It is now read-only.

feat: remove relay discovery and unspecified relay dialing #101

Merged
merged 2 commits into from
Apr 1, 2020

Commits on Mar 31, 2020

  1. feat: remove relay discovery and unspecified relay dialing

    This was a misfeature that looks great in demos but isn't useful in practice.
    
    First, random relays we discover are unlikely to support _active_ relaying. This
    means that picking a random relay is usually going to fail because the random
    relay won't already be connected to the target.
    
    Second, there are two use-cases for relaying:
    
    1. Connecting to undialable nodes.
    2. Relaying all outbound traffic.
    
    For the first case, we only want to use the relays specified by the target
    peers. For the second case, we'd need to modify either libp2p's dialer logic (in
    the swarm) to prefix all addresses with the specified relay.
    
    The logic _here_ covers neither use-case.
    Stebalien committed Mar 31, 2020
    Configuration menu
    Copy the full SHA
    1b975c0 View commit details
    Browse the repository at this point in the history
  2. feat: functional options

    Introduce functional options. This should make it easier for us to add
    additional options in the future (e.g., known relays, relay policies, etc.).
    Stebalien committed Mar 31, 2020
    Configuration menu
    Copy the full SHA
    7392efe View commit details
    Browse the repository at this point in the history