ipfs / kubo

An IPFS implementation in Go
https://docs.ipfs.tech/how-to/command-line-quick-start/
Other
16.17k stars 3.01k forks source link

need add feature "ipfs p2p listen /x/test /ipfs/QmXXXXXXXXX/x/test1" #5735

Open mccoysc opened 6 years ago

mccoysc commented 6 years ago

need add feature "ipfs p2p listen /x/test /ipfs/QmXXXXXXXXX/x/test1"

now ipfs p2p listen can only forward data to an ip:port, maybe,support forward data to another node's protocol "/x/test1" is important. for eaample: ipfs p2p listen /x/test /ipfs/QmXXXXXXXXX/x/test this would make the current node listen at protocol "/x/test" and forward the data to node "/ipfs/QmXXXXXXXXX" and it's protocol "/x/test1"

mccoysc commented 6 years ago

supported by these feature of p2p,ipfs can make a transport layer which don't depend on ip:port,just only the "peerId"

Stebalien commented 6 years ago

I see, so you want to forward data from one IPFS node to another? That is, you want to forward inbound connections on protocol /x/one to /x/two on some other IPFS node?

That sounds useful but what's your specific use-case? You might better be served with the relay feature.

mccoysc commented 6 years ago

@Stebalien yes,if this feature is done,we can use this feature to make a "named network". "named network" is a new network layer and has some uniqueness of TCP/IP. for exampel:security,non-attackable and so on.

mccoysc commented 6 years ago

in legacy network,all the security problems are based on the TCP/IP network layer,if IP and port is not used for data transfering,no one can attack your servers or business.

mccoysc commented 6 years ago

and also,we need a way to directly push some data to a named network and receive the data from another node ,other than ip:port-node-node-ip:port

mccoysc commented 6 years ago

maybe these features are needed: 1,ip:port-node-node-ip:port. 2,ip:port-node-node-node. 3,ip:port-node-node-cmd. 4,node-node-node-ip:port 5,cmd-node-node-ip:port ....

and so on.

Stebalien commented 6 years ago

I see. You basically want p2p proxies. Note: you can technically do this now with multiple p2p tunnels. That is, you can forward /x/test -> localhost:1234 and then forward localhost:1234 -> /x/test on /ipfs/OtherNode. However, that's not the most efficient way to do this.

mccoysc commented 6 years ago

@Stebalien not only "P2P proxy",but a new network layer without tcp/ip.

Stebalien commented 6 years ago

So, under the covers we use something called libp2p. You should check it out, I think you'd be very interested: https://github.com/libp2p/go-libp2p.

mccoysc commented 6 years ago

@Stebalien yes,it's the extract……but my need is not only the 'code', the 'so many ipfs node' is more important and useful for a network. or,i would make my own network and enough nodes

mccoysc commented 6 years ago

if ipfs have these features,the all nodes around the world would be a working and online network layer,i don't need to think about how to got a p2p network get runing and work well.

mccoysc commented 6 years ago

also,we call it 'ecology'……it's difficult for building a ecology.so using the existing ipfs ecology is the best choice

Stebalien commented 5 years ago

Unless you explicitly configure libp2p not to, libp2p nodes will automatically join the ipfs network. To be precise, the network is actually the libp2p network, IPFS nodes are just a subset.