So, a turn server? Very little info about the architecture here, but since you said relay operators would hate it, now I'm wondering why would I hate it? Don't see a reason why.. 😎 The thing is, I know you can't do this without servers to bounce the traffic, and push notify uses too much Google servers to feel very OSS nostr. If you keep your server stack opensource and configurable then relays can help run the network and decentralize. If not, you're gonna lock yourself into being the one server and I don't think you really want that..

Turn services would be a really cool concept to nostrize to facilitate P2P connections. I'd run some along side relays for sure, because then I don't have that data resting and clients can p2p any number of things..

Reply to this note

Please Login to reply.

Discussion

this is my assumption too. looking forward to seeing some architecture documents, not sure how this achieves privacy.

No servers (otherwise we should just use relays).

The proposal is to do phone to phone directly.

sounds too good to be true! how do phones talk p2p. share the wizardry good sir

keet.io

🤷‍♂️ must be magic

So how do you traverse the NAT?

Yes, how?

Ok, this is what I am testing.. Dont take this as a final solution.

First: IPv6. On IPv4, you have to deal with NAT travel + firewall holepunch. With IPv6, the NAT stuff is gone. All you need is a simple STUN server to open the connection.

Second: We can use Nostr to signal people's IPv6+port to one another.

Once that is done, both sides start sendind UDP messages over IPv6 to each other. The first 2 messages should be rejected because of the firewall, but after that the door is open. We try this until we hear a package back.

Now, the beauty of Nostr is that somebody is always online. Which means other phones can behave as STUN servers to open people's firewals more easily.

The goal is to use network effects to avoid the need for central servers. Market participants can add their computers or phones to the pool by just replying the Nostr signaling requests.

It's like a STUN server as a DVM.

Lots to test, but that was the idea.

what if.. forget about STUN for a second, it isn't gonna work for most peers (esp mobile carrier networks). You could support ipv* by 'relays' running coturn and forcing the use of the turn server vs. stun would not expose IP info between the peers. Coturn has all the stun options, so if a peer was willing, they could opt in to the IP disclosure and achieve a true P2P connection.

multi hops could also be implemented, by using wireguard networks with relays being a 'hop' server.

https://github.com/coturn/coturn

Yeah that's the easy way to do it. But I think we can do it without coturn. Most of what coturn implements is for the old nat stuff. There days everyone has an IPv6. Só it should be easier.

🤔

But it is a fallback for the p2p if everything else fails.

given how popular vpns are im not sure why anyone would want to connect p2p 🐻‍❄️🤔

"These days everyone has an IPv6" - don't think that's the case at all. Most countries seem to be running at around 50-60% deployment, and that's only showing allocated IPv6 that doesn't mean configured and in use.

That seems different than what I have but if that is true let's hope we can help them finish the transition.

Let's hope you can. It's been in deployment for ~20 years!

Maybe you're mixing cellular and fixed line services. On cellular, the figures are likely higher but on fixed line they're also likely lower. Mobile users aren't, most the time, using a cellular connection though, they're using WiFi.

https://ipv6-test.com/stats/

I have implemented the calling service in 0xchat, but using the traditional technical solution:

Relay signaling+WebRTC+STUN+TURN.

I’m looking forward to your experimental results. :)

Which servers are you using for stun and turn?

Google’s STUN and our own built STUN/TURN service, followed by support users to input their owned services, similar to the approach of Simplex

cool idea, subscribed!

peers in a p2p network are servers and can act as relays, there is already a few p2p relay networks

You can't traverse NAT without a server to setup your connection. Especially on mobile networks. One of your 'peers' must open their firewall. By doing so, in my book, it becomes a server. But the semantics may have changed, I dunno why people think servers are so lame. They're just computers that are up and online.

peers in p2p are servers

from the lead dev of holepunch.to https://x.com/mafintosh/status/1259596991857930243 there is distributed holepunching aka nat firewall traversal

Yes, it uses a lot of techniques I'm well familiar with, techniques that don't really work anymore. Like STUN. Mobile networks especially, you're just gonna end up sending all that traffic through a turn relay (which is fine).

https://en.m.wikipedia.org/wiki/Traversal_Using_Relays_around_NAT

https://webrtc.org/getting-started/turn-server

as p2p apps become popular incompatible shit 'networks' will face tremendous pressure to become proper networks

I wish. A majority of the world is on a mobile carriers network.. I just don't see how it would apply any pressure, can't even get people to use a desktop browser anymore.

many mobile networks work p2p, mobiles also have wifi, starlink lol

there will be nsa datacenter peers to use, its what american tax victims pay for