我已经尝试在iOS 14测试版上运行我的应用程序。它在iOS 13上运行良好,但在iOS 14测试版上无法连接到任何服务器。NEVPNManager.shared().connection.startVPNTunnel()没有抛出任何错误,并且我连接的任何服务器上的NEVPNStatus都变成了.disconnected。我找不到iOS 14上的NEVPNManager有什么变化。
这是我的经理的配置:
let p = NEVPNProtocolIKEv2()
p.authenticationMethod = NEVPNIKEAuthenticationMethod.none
p.serverAddress = account.server
p.disconnectOnSleep = false
p.deadPeerDetectionRate = NEVPNIKEv2DeadPeerDetectionRate.medium
p.username = account.account
p.passwordReference = KeychainWrapper.passwordRefForVPNID()
p.disableMOBIKE = false
p.disableRedirect = false
p.enableRevocationCheck = false
p.enablePFS = false
p.useExtendedAuthentication = true
p.useConfigurationAttributeInternalIPSubnet = false
p.remoteIdentifier = account.server
p.localIdentifier = account.account
let manager = NEVPNManager.shared()
manager.protocolConfiguration = p
manager.isEnabled = true
let ruleConnect = NEOnDemandRuleConnect()
ruleConnect.probeURL = account.probeUrl
manager.onDemandRules = [ruleConnect]
manager.isOnDemandEnabled = true发布于 2020-11-10 19:19:55
苹果似乎更改了iOS 14上的密码(有文档),你可以在这里看到一些线程:
https://developer.apple.com/forums/thread/659209
https://developer.apple.com/forums/thread/657792
https://developer.apple.com/forums/thread/657792
https://developer.apple.com/forums/thread/661298?page=2如果你像我一样使用StrongSwan,你可以通过从你的虚拟专用网络服务器更新配置来修复它,只需设置ike=aes256-sha2_256-modp2048和esp=aes256-sha2_256,然后重启StrongSwan,然后它就可以在iOS 14上工作了。参考:https://wiki.strongswan.org/projects/strongswan/wiki/AppleClients
https://stackoverflow.com/questions/63287452
复制相似问题