libp2p / go-libp2p

libp2p implementation in Go
MIT License
6.11k stars 1.08k forks source link

webrtc: private/browser-to-private/server #2009

Open p-shahi opened 1 year ago

p-shahi commented 1 year ago

eta: 2023-09-30

This is the browser side implementation in go-libp2p (a scenario where the go-libp2p node is in a private network e.g. behind a NAT/firewall). It is required for a browser node to hole punch to a private non-browser node and will “complete” the browser connectivity story.

Done Criteria

p-shahi commented 1 year ago

Status update: @ckousik will start on this feature now, as most of the work on js-libp2p-webrtc browser-to-browser is complete (minus the potential multiaddr name change) @ckousik @ddimaria please use this ticket to capture the work-plan/todos

ddimaria commented 1 year ago

@p-shahi working branch for this work: https://github.com/ckousik/go-libp2p/tree/ckousik/webrtc-m3

Jorropo commented 1 year ago

What's gonna be our strategy for finding STUN servers ? Hard-code some well known servers ? (bad, not local first)

Given STUN is cheap and can be easily rate limited I would argue public go-libp2p servers should include a STUN server, similar to how autonat and relay v2 is implemented right now, then in Kubo I can do the same thing I do for relay v2 where I select nodes based on the DHT keyspace. I remember discussing this with @mxinden and there were concern than IPFS would unwillingly become public STUN service for all kind of unrelated spammy usecases.

mxinden commented 1 year ago

Hard-code some well known servers ? (bad, not local first)

I don't have a good solution here. I would start with this, i.e. I would start with a hard-coded set of servers. Though products would need to make it explicit to the user that they are using the services of company X.

omar391 commented 6 months ago

Bump: I can see many open PRs. Any update on this?

sukunrt commented 6 months ago

We have prioritized other work right now and this won't be picked up for a few more months. I first want to get /webrtc-direct in non experimental mode and then work on adding webrtc private to private.

I can help if someone is interested in working on this and landing this in.

Out of curiority, what do you need this for?

2color commented 6 months ago

To reduce confusion (for myself and others), is this issue is solely focused on the WebRTC spec and not the WebRTC-Direct spec?

Can you confirm this @sukunrt?

MarcoPolo commented 6 months ago

@2color correct