May I ask why do you want to use a proxy?
I'm not a huge fan of proxying a game server.
You could always use your domain name without any subdomain to connect to the server if you forwarded the right ports in your router, in case for Valheim.
Minecraft needs only one port, Valheim needs three ports.
The ports are in the template itself and also which protocol do you have to use.
Please pook at the second recommended post on top of this thread.