How to set a proxy device for a container with proxy_protocol enabled?

The LTS editions of Ubuntu like 18.04 come with a Deb package of LXD, and that version is 3.0.x. It is supported until 2018+5years=2023. It does not get new features but does get security updates and bug fixes.

On the other hand, you can migrate to the snap package of LXD, currently at version 3.4. Also supported but you get upgrading to new versions as they come along. Here you get new features.

If you want to stick to the Deb package of LXD, you can do what you need by using iptables rules and configuring appropriately the containers to keep the source IP address. Ask if you need further assistance with that.