Hello everybody.
I need to implement DNS settings with on/off toggle (so that user would not have to go to the iPhone settings).
So far my research have pointed me to the direction of proxy/tunnel.
And in the interface of NEPacketTunnelProvider
I've discovered that it's settings contain vpnSettings
property, just like NEDNSSettingsManager
So I've created a sample project (tunnel branch), and I've managed to get the vpn up and running, however I am unable to setup dns settings properly. Invoking NEPacketTunnelProvider.setTunnelNetworkSettings
with any kind of config prevents the tunnel from starting.
I've used similar settings with my NEDNSSettingsManager
, and it worked just fine.
My feeling is that I set invalid value into NETunnelProviderProtocol.serverAddress
and NETunnelNetworkSettings.tunnelRemoteAddress
, but I'm unable to verify that since I possess no access to any kind of infrastructure.
I am aware of MDM restrictions, and at this point I need to setup Google dns via packet tunnel with a on/off switch.
Thanks.