As the original developer of the nginx plugin, I know that there is also a specific header as the real IP source.
do you have a process to go this with nginx as opposed to HAP? I think nginx uses more resources, but I think it will be ok.
can this be done with wireguard?
Take a look at this guide to get HAProxy up and running: https://forum.opnsense.org/index.php?topic=23339.0