Comments (3)
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
andgo-libp2p-transport.Transport
- Implements
- Config option for relay hosts
- Probably a static list for now?
from go-libp2p.
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.
The spec was revisited and released as 0.1.0 - https://github.com/libp2p/specs/tree/master/relay
from go-libp2p.
Related Issues (20)
- Per-connection protocol list HOT 2
- \network\rcmgr.go:166:27: network.NullResourceManager (type) is not an expression HOT 2
- Filter out undefined/reserved addresses HOT 13
- v0.34
- Drop support for go1.20 HOT 2
- Deprecate or improve documentation for crypto.GenerateEKeyPair HOT 3
- Why the pubsub doesn't work in my case? HOT 4
- swarm.DialPeer and host.Connect should fail when no direct/unlimited connection is available to the peer
- Feature request: add system network monitoring module HOT 7
- Quic-go removed config field causes compilation error HOT 1
- AutoNAT fails to close its peerstore
- Identify protocol: SignedPeerRecords not being added to the CertifiedAddrBook HOT 4
- [Hole Punching] - Implementation Example HOT 16
- Disabled using gorilla/websocket version 1.5.1 HOT 1
- Lotus sync issue: libp2p 0.31.1 to 0.33.2 regression HOT 18
- AutoNAT dialing over WebRTC transports crashes. HOT 2
- libp2p.New docs say to stop/shutdown cancel the passed in context, but there is no ctx.
- Persists information about the connection to disk to save memory usage HOT 1
- v0.35 HOT 1
- Allow Option to set quic.Config{}.KeepAlivePeriod HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-libp2p.