contrun / ckb-p2p-experiments

1 stars 0 forks source link

Create a network over other hole-punching infrastructure #3

Open contrun opened 1 year ago

contrun commented 1 year ago

Since there are too many refactoring needed in order to make NAT traversal compatible (see for example #1 ), we might also try to leverage other systems to do hole punch.

A promising solution is to create a "sidecar" proxy which does all the hole-punching work (below we call the real network node program p2p node program, the hole-punching program proxy). Whenever our p2p node program to connect to another peer, it connects to the proxy instead. This proxy tries to connect to the proxy running on the node of the other peer. When the connection between two proxies are successfully established, the proxies forward traffic to our p2p node program. This solution seems to be viable. We need to check the following things.

contrun commented 1 year ago

edgevpn uses techniques like https://github.com/libp2p/go-libp2p/tree/master/examples/chat-with-rendezvous to discover peers.