Some said that I must configure a reverse proxy but tbh I have no idea how to do it in Ubuntu 16.04 (or on any OS).
Is there any way to do it on Cloudflare?
You can achieve via Cloudflare Tunnel :
Cloudflare Tunnel exposes applications running on your local web server, on any network with an Internet connection, without adding DNS records or configuring a firewall or router. It just works.
In Cloudflare workers you are not allowed to fetch ip addresses.