libp2p / js-libp2p

The JavaScript Implementation of libp2p networking stack.
https://libp2p.io
Other
2.3k stars 440 forks source link

B. 🥊 Decentralized Hole Punching #1461

Open p-shahi opened 1 year ago

p-shahi commented 1 year ago

eta: 2023Q2

Why: P2P networks can have a combination of both public and private nodes. While private nodes can dial nodes on the public Internet, they are unreachable from the outside as they are behind a NAT or a firewall. We need a mechanism to dial them. A previous DHT crawl found that almost 63% of the network was undialable.

Goal: Implement Decentralized Hole Punching in js-libp2p and bring it to parity with the Go and Rust implementations.

momack2 commented 1 year ago

can we clarify that this is for js-ipfs in the title please?

p-shahi commented 1 year ago

@momack2 Any reason to include js-ipfs specifically? This work is not progressing with it in mind. We will need it for Helia but I would still not include any project in the title since it's better to remain product agnostic

momack2 commented 1 year ago

sorry - I think I meant "js-libp2p" - the reason is because each of these cards shows up with out the repo title in starmaps - so otherwise you have many "holepunching" milesotnes without knowing they are for different libp2p implementations

SgtPooki commented 1 year ago

@momack2 we could include the repo-name on milestone cards in starmap to help mitigate this problem?

p-shahi commented 1 year ago

Didn't see the replies above but I support adding the repo-name to the milestone cards

momack2 commented 1 year ago

Yeah, I think that would help a lot

On Tue, May 9, 2023 at 2:39 AM Prithvi Shahi @.***> wrote:

Didn't see the replies above but I support adding the repo-name to the milestone cards

— Reply to this email directly, view it on GitHub https://github.com/libp2p/js-libp2p/issues/1461#issuecomment-1539150846, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEXAF7RQHPNSIA76WOYPQLXFHRALANCNFSM6AAAAAARKTHWP4 . You are receiving this because you were mentioned.Message ID: @.***>

2color commented 4 months ago

@p-shahi Is this still in progress? It was my understanding that this is already implemented in js-libp2p?

SgtPooki commented 1 week ago
JS Colo 2024 discussion We don't do hole-punching in TCP, hole-punching is much more successful with UDP (timing is more reliable) * TCP: ~30% success * UDP: ~70% success * Ref: https://youtu.be/bzL7Y1wYth8?feature=shared&t=1157

Things left to do:

  1. Incorporate QUIC transport
  2. Implement missing parts of DCUtR (the half after unilateral connection upgrade)