Giter Club home page Giter Club logo

Comments (3)

 avatar commented on May 16, 2024 1

cc @diasdavid @victorbjelkholm this is relevant to you two because of js-libp2p-relay.

I started working on relay in go-ipfs as part of the "browser accesses go-ipfs" sprint (ipfs/team-mgmt#130).

So far I think the cleanest solution is to make the relay service a transport, so that we get end-to-end encryption -- the existing but unused relay code makes no attempt at that. It might at first feel weird that a swarm protocol is at the same time a transport, but this kind of stack hopping is what you sign up for when building overlay networks. It'll be something like: the RelayService calls Host.NewStream() and Host.SetStreamHandler(), and the Host calls RelayService.AddRelayPeer()

In the end I think this solution is the simplest in that it doesn't have to touch any existing libp2p interfaces. It will also fit in nicely with any future things like transport capabilities and connection estimators.

  • /relay multiaddr (/relay-exp for now)
    • Just a PeerID is enough, RelayService picks a suitable peer for relaying
    • Can be explicit though: /ip4/1.2.3.4/tcp/4737/ipfs/Qmfoo/relay/Qmbar
    • Nice side-effect for free: multihop: /relay/Qmfoo/relay/Qmbar/relay/Qmbaz
  • RelayService
    • Implements go-libp2p-net.StreamHandler and go-libp2p-transport.Transport
  • Config option for relay hosts
    • Probably a static list for now?

from go-libp2p.

 avatar commented on May 16, 2024

The spec is in libp2p/specs, the /p2p-circuit multiaddr has been added to the protocol table, and @dryajov has made great progress on js-libp2p-circuit.

🚢🚢🚢

from go-libp2p.

daviddias avatar daviddias commented on May 16, 2024

The spec was revisited and released as 0.1.0 - https://github.com/libp2p/specs/tree/master/relay

from go-libp2p.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.