Set single hostname for same machine connected locally and via vpn

I have a mobile device that I can use locally on my router and remotely via OpenVPN/WireGuard. I have configured static IPs for each situation, but they are in different subnets for obvious reasons. I want this device be accessible from other hosts in local network via its hostname, regardless current connection type and actual IP. How to configure dnsmasq to return IP address depending on actual connection type? Or retuning list of possible IPs (would it work? would clients select the only "pingable" IP from the list?)

Then you just set those 2 hostnames.

See: https://openwrt.org/docs/guide-user/base-system/dhcp_configuration#hostnames

I'm not clear on this inquiry - based on the first part. I would assume you just set the hostnames as desired. :man_shrugging: