simpleaswater / rfcs

RFCs to propose, discuss and collaborate on topics for https://simpleaswater.com
MIT License
5 stars 1 forks source link

RFC: Using Libp2p to perform peer-to-peer NAT Traversal #11

Open vasa-develop opened 4 years ago

vasa-develop commented 4 years ago

What new topic/thread/tutorial are you proposing? Please describe. The aim here is to demonstrate how to decentralize the process of NAT Traversal. Using libp2p Identify Protocol, which is a STUN protocol, which uses other peers to gather identification info about a peer, rather than using a STUN server.

vasa-develop commented 4 years ago

@DatawarehouseMonkey Can you share your findings here?

sirhc-sch commented 4 years ago

My current view on libp2p is as follows. With identity, you have the ability to connect to some nodes and get a multiaddress back. (This is kind of the STUN flow) Even though this is a nice approach, there are some challenges with that, as you still need some kind of a list of known peers, which act as identity nodes. But even though one knows the public IP of a peer some NATs (symmetric) wouldn’t allow communication by request, if there was not any outgoing request on that same IP:Port. In that case libp2p works with relaying. Special nodes, that act as relaying nodes. Here are also some privacy and safety concerns.. But first of all, let us set up a chat example, that works over the internet and not just on the same machine on different processes. From that point on, we can tackle those other challenges.