Ability to distinguish between local and domain shared links

We currently use nextcloud in a production environment. We need to share files on and off and its getting increasingly difficult to do so.

Our current setup is this:
local nc instance hosted within the business network
a relay server that connects the nc server to the outside world via a domain.

We like the speed and agility of network shares
But the convenience and security of the nextcloud client (like onedrive via virtual files etc.)

The problem is to get the speed from our local network we would need to connect the nc sync clients to the local server. But if you then try to share files it would give you a link with that local IP instead of the global domain. Is there a possibility to make a setting for sharing files to use a different domain?

If you’re implying you’re using different URLs for local versus remote access, yes, that’s a problem.

The recommended approach is same URL but split DNS.