I am trying to create a VPN, but without any VPN server. I am not sure if this is possible or not, but I Have seen apps which creates VPN and their VPN configuration ther server address is 127.0.0.1
I am using NEVPNProtocolIPSec
let p = NEVPNProtocolIPSec()
p.username = "ScreenCoach"
p.serverAddress = "MY_DEVICE_IP_ADDRESS"
p.authenticationMethod = NEVPNIKEAuthenticationMethod.sharedSecret
let kcs = KeychainService();
kcs.save(key: "SHARED", value: "AppDemoKey")
kcs.save(key: "VPN_PASSWORD", value: "rootuser")
p.sharedSecretReference = kcs.load(key: "SHARED")
p.passwordReference = kcs.load(key: "VPN_PASSWORD")
p.useExtendedAuthentication = true
p.disconnectOnSleep = false
In the serverAddress
I have tried 127.0.0.1 , 0.0.0.0 and also my device's IP Address but nothing seems to work, and I am getting error alert message : The VPN server did not respond.
I don't know much about networking stuff, so can anyone please guide me here?
Thanks in advance.
EDIT
My Goal :
Use custom DNS server for all the DNS queries throughout the device, without using an actual VPN server, so just a proxy VPN with DNS settings. Also I can not use NEDNSSettingsManager because iOS 12 is our minimum target.