Here is some sample code I am using to add a VPN configuration through my app. My question is, how can I also add in a proxy configuration. In the settings app and in Apple Configurator, users can add proxy settings (automatic or manual) along with their VPN settings.
Below is some sample code I found, but I could not find the slightest clue on how to add in a proxy as well.
let manager = NEVPNManager.shared()
manager.loadFromPreferences { (error) -> Void in
if manager.protocolConfiguration == nil {
let newIPSec = NEVPNProtocolIKEv2()
newIPSec.serverAddress = "mycompany.vpn"
newIPSec.username = "myvpnusername"
newIPSec.identityDataPassword = "myvpnpassword"
newIPSec.authenticationMethod = NEVPNIKEAuthenticationMethod.none
newIPSec.disconnectOnSleep = false
manager.protocolConfiguration = newIPSec
manager.isEnabled = true
manager.saveToPreferences(completionHandler: { (error) -> Void in
})
}