首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >NEVPNManager停止使用iOS 14测试版

NEVPNManager停止使用iOS 14测试版
EN

Stack Overflow用户
提问于 2020-08-06 23:57:10
回答 1查看 480关注 0票数 4

我已经尝试在iOS 14测试版上运行我的应用程序。它在iOS 13上运行良好,但在iOS 14测试版上无法连接到任何服务器。NEVPNManager.shared().connection.startVPNTunnel()没有抛出任何错误,并且我连接的任何服务器上的NEVPNStatus都变成了.disconnected。我找不到iOS 14上的NEVPNManager有什么变化。

这是我的经理的配置:

代码语言:javascript
复制
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
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-11-10 19:19:55

苹果似乎更改了iOS 14上的密码(有文档),你可以在这里看到一些线程:

代码语言:javascript
复制
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-modp2048esp=aes256-sha2_256,然后重启StrongSwan,然后它就可以在iOS 14上工作了。参考:https://wiki.strongswan.org/projects/strongswan/wiki/AppleClients

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/63287452

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档