I'm researching the capabilities of NEDNSSettingsManager
.
I've been able to implement custom dns settings to route my phone's DNS requests onto the servers I need.
However, I can't find if there's a mechanism to route specific domains to the local DNS provider.
Let's say I'm a business with a local DNS server that resolves my internal resources. I need my corporate iPhones to hit a 3rd-party secure DNS server selected by me. The latter has no idea about domain "my.business.gg".
Using NEDNSSettings.matchDomains
has the opposite effect.
Maybe NEDNSSettingsManager.onDemandRules
is the way to go? If so, how would one use it? If not, is it possible to do what I need to do with DNS settings, or should I look into DNS Proxy instead?
Please help. Thanks
Figured out what to do using on demand rules described here: https://www.wwdcnotes.com/notes/wwdc20/10047 . It turns out that the rules are evaluated one-by-one, and the .neverConnect
means that the matching request is handled by the default DNS provider, not our custom one (which is exactly what I need)