I've implemented a custom VPN app for macOS (Packet Tunnel Provider).
If the user configured DNS servers for the tunnel, they should answer all DNS queries.
This is done with
Code Block dnsSettings.matchDomains = [""]
This works good except for one combination - if the user enabled split tunnel with include routes + searchDomains, the DNS queries goes to the system DNS server, and not to the tunnel DNS.
I found a partial solution - for the above case, if I'm setting dnsSettings.matchDomains with the searchDomains, the tunnel's DNS server will answer queries, but only those which related to a domain on that list.
I want the tunnel's DNS servers to answer all queries, so this solution isn't good.
Is it a bug or an intentional behaviour?