What web protocol Godot uses?

Godot Version

Godot 4.2.1

Question

I’m trying to host a server on Ngrok with TCP protocol, but it doesn’t connect

Godot supports TCP, UDP, HTTP (over TCP), WebSocket (over TCP) and WebRTC (over UDP).

If you use the TCPServer class, it uses TCP purely, no UDP is involved.

Is your server configured to listen on 0.0.0.0 (to accept connections from all addresses) as opposed to 127.0.0.1? This may be required for it to be reachable by ngrok.

Do you know how to change it?

TCPServer has a listen() method that accepts port and bind_address parameters. The default for bind_address is "*", which listens on all addresses on both IPv4 and IPv6.

However, on certain IPv4 + IPv6 setups (broken dual stack setups), it’s possible that this may not work correctly, so try specifying "0.0.0.0" to force listening on IPv4 only.

PS: How are you testing the server’s remote connection? The remote device must be on a network different than the server’s, otherwise the ngrok domain probably won’t work. You can test this with a mobile device on a 4G connection (or a PC with tethered 4G connection), for instance.

I don’t have listen() function in Godot, also i tried to set bind ip to 0.0.0.0 but It doesn’t work.
also I’m testing like this:
1 player host
Other join