Decentralised Network based on quic-p2p

Hey Everyone,

I am currently working on decentralised networks for my master thesis by comparing different approaches, and I found quic-p2p. I want to set up a prove of concept with some hardware and quic-p2p, to show how the NAT traversal works and do some performance testing. Therefore I wanted to set up a network with some NAT’s and nodes that run quic-p2p. I found the github page but based on the documentation, it is not clear to me, how to actually use it.

Has anyone experience with that or has done it before ?

Of course I would like to share the outcomes of my testing.

Thanks in Advance and best regards,


There is an example directory in this repo with 3 test programs. A chat program and client / server programs.

Please note that I personally didn’t test them and that NAT traversal is still in the to-do list in the README.


To add hole_punch @ustulation has this crate


But this is only a solution if one of the peers already knows the public IP of the other peer… right ?

Its not clear to me, which Network the chat app for example would use, if I would install it on two peers.

No, they must know the public IP of some node, not each others. That is a STUN like mechanism (rendezvous connector). If you check out STUN you will see how that operates.


Hey dirvine,

thank you for your help already. I know what STUN does and I kinda know what a Rendevouz Server does, but as far as I can see, the actual problem of a decentralised Network with NAT Traversal is just shifted from the STUN Server to the Rendevouz Server, as one still needs a “hard-coded” Server that can be reached by both peers.

Maybe I am totally wrong and I just do not get the NAT traversal process right for this crate

Thank you in advance !

Ah I see the confusion. All you need to be able to do is connect to any peer you know that has a stun service (so still decentralised) and your other peer does the same to another peer with a STUN service. Both the STUN services tell each side what IP:port you should connect and and they can then connect.

So no need for hard coded servers, just use any peer you can speak to that has a STUN service running, so save them up as you go along and use them as needed.


Ahhhhh, so some peers function as peers and “stun-server”… and those are stored with a special flag in a distributed hash table or something?

Is there a documentation on how to set up a quic-p2p App like the Chat Example with crate ?
Because I am struggling to get it going.

Maybe we could setup a repository.

best regards,

P.S: I am still struggling with the hour zero of the network. When the first peer wants to join the network, there are no other peers to function as a STUN… sorry for being retarded ^^


first peer means a peer that could not bootstrap. It sets its own config to always start on same port etc. Other join in and can reboostrap there. It gets less required as time goes on.

Pretty much, you store them as stun capable.

Love to but time is a killer for me these days. I m 100% in launch mode.


Ok I understand… But maybe only some short tipps, how I can get this to work ?

My main goal is to connect two machines with quic-p2p and crate.

I would really appreciate your help !

By the way, I am wondering, if Crust ist still used by the Safe Network or if it is Quic-p2p ?

Quic more or less replaced Crust from my understanding.

You’re lucky you received as many replies from David as you did! He really is super busy I think. IMO, you’ll need to put on your waders and work most of it out yourself.