For CloudFlare users: how to use CF-* fields from HTTP header instead of normal IP?

If you use the provided Cloudflare template this is all handled automatically. This has actually been available within Discourse for four or five years.

Assuming you followed the standard install:

cd /var/discourse
nano containers/app.yml

then add this line under templates:

- "templates/cloudflare.template.yml"

Then just rebuild:

./launcher rebuild app

At which point your install will show true user addresses.