Hole punching with Open Relay for file transfer #4266
-
Hey there! For some background, I am not new to Rust, but I am fairly new to networking. I believe that I will need to perform hole punching to set up this direct connection. I have read these articles: The tutorial assumes that I have access to some public relay server that I can run my binary on. This leads me to my first question: If this is possible, how would you suggest me to get started? I would like to create a minimal example of just sending a string from one computer to the other. Is one of the examples a particularly good starting point for this? I have seen the ping tutorial, but will that help me for communicating across networks? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Openrelay uses WebRTC TURN whereas libp2p has its own relay protocol so the two are not compatible. Running a relay can be expensive depending on how much bandwidth you are offering to your users. It is best if you run your own relay server. You can then use the dcutr protocol to attempt a hole punch between two peers. Checkout our examples on how to do that :) |
Beta Was this translation helpful? Give feedback.
Openrelay uses WebRTC TURN whereas libp2p has its own relay protocol so the two are not compatible.
Running a relay can be expensive depending on how much bandwidth you are offering to your users.
It is best if you run your own relay server. You can then use the dcutr protocol to attempt a hole punch between two peers. Checkout our examples on how to do that :)