Is there is a way to make peer-to-peer connection with godot in all platforms?
I know there is UPNP but it doesnt works on mobile.
Is there is another way?
If ıpv4 cant, maybe ıpv6 do this?
Is there is a way to do it without server?
The problem with peer-to-peer is that all clients need to be directly reachable, and this can’t be done on mobile connections due to their use of CGNAT or similar features that make their IPv4 not directly routable. Also, IPv6 support on mobile connections isn’t that widespread yet in most countries – and when you do have IPv6, it’s often firewalled with no way for users to opt out of that firewall.
Also, while some free STUN servers exist, you’ll have to pay to host a TURN server for the ~10% of clients who can’t rely on a STUN server alone. This is because TURN requires much more bandwidth as it relies all traffic through the server, as opposed to using the server only to perform the initial hole punching.
STUN only works in situations where the client has their own IPv4 or IPv6 behind a standard firewall. It won’t suffice for users behind a CGNAT, a mobile connection, or a corporate/university connection with aggressive firewall rules.
This is a very complicated topic. Browsers try this for WebRTC video-conferencing:
Maybe you can somewhere find a library that implements this procedure. You would still need TURN servers for some clients though AND you initially need a signalling connection that can relay information between the clients, so they can coordinate while searching for a path.
thanks for your reply @joviansettler !
I found some tutorials about making plugins. I will check what it gives.
I dont know anything about rust but I can try to understand.
But anyway the libp2p looks very interest. Do you have more source about it?