I've got a local network with associated WiFi where I'm already running a DNS server and I can resolve
somehost.local.example.com on any machine in that network just fine.
On Android I can only resolve those host names when I turn off "Private DNS" and I understand why. However, I'd like to keep the "Private DNS" feature enabled in general.
Is there some way to either disable Private DNS when I'm in a specific WiFi network (either autodetected some way or even manually configured on my phone is fine) or to ensure that local host names (within the DHCP servers search domain) are still resolved using the DHCP-provided DNS even when Private DNS is enabled?
My phone is running Android 12, in case that matters.