Collabora works inside NAT, and outside same time

Hello. I’m using Nextcloud 14.0.3 and installed Collabora Online (on the same pc, both without Docker that is just terrible solution for me).
What i want to achieve is working inside LAN, and outside world in the same time, using different URLs (for example using IP/hostname locally from PC’s inside LAN, and domain name (mynextcloudsample.com) from outside. I’m using NAT on the router for Nextcloud server IP, so it’s accessible and working.
Before You ask: why to use different addresses? - It is because not every ISP router support inside loop (connecting from inside LAN into it’s own external IP - there are cases where i just can’t change router or it’s configuration, so i don’t have any other ways to do it).
I may do it by just making the default url an external domain address, and make users share folders inside LAN. So it’s working great then.
The problem is with Collabora Online App. I’ve installed it almost exactly like in this topic:
https://help.nextcloud.com/t/thanks-for-spending-time-with-us/40550 but it makes it work only, when i try to load nextcloud from localhost. It looks, like it use address added inside Nextcloud Collabora app configuration, as the one to load data inside client browser. So when i change it into LAN IP/hostname of the server, it will work for LAN users, but not for the one that are logging in outside (from Internet using domain name). But then, when i will put external domain name in config, it will not work for users inside LAN. Is there any way i can solve it?
Maybe it is possible to add option (choice), that it would read address that client use for loading nextcloud (in browser), and use it for Collabora then?
Thank You for any help