As of server version 2377, support was added to FiveM to run a custom streaming proxy similar to cfx.re, but proxying the data connection (UDP) as well. This can be accomplished very easily with nginx acting as a proxy, and you can combine the caching proxy with it.
- Nginx 1.17+ (1.16 absolute minimum, guide tested on 1.17)
 - Server with reasonable network bandwidth (500mbps uplink strongly suggested)
 - FXserver version 2377 or later
 - SSL certificate for the domain you're using (highly recommended)