Cloudflare's standard web proxy is not designed to transfer gaming port like regular HTTP traffic. Use the game save as DNS only on a separate subdomain.
Step by step
-
Separate web and game logs in the Cloudflare DNS panel. For example, use
www.example.netfor web,play.example.netfor Minecraft. -
Open the A or AAAA record of the game address. Set the proxy status to
DNS onlyand verify the server's public address as the value. -
If Java is running on a private port, check that the destination of the SRV record is also resolved to the correct address. If you are using a paid gaming proxy service, follow the port and protocol rules of that product.
-
Check the address returned in the public DNS query and the correct Minecraft port. Then log in from outside your local network.
Keep in mind
When DNS only is selected, the IP address of the game server can be seen from this DNS record. Setting a web proxy is not the same as game traffic protection.