防止Ipa被抓包
路由直连 直连模式简单的说就是不走代理服务器。关键属性是 connectionProxyDictionary
,具体配置代码如下,主要就是将 connectionProxyDictionary
设置为空字典,注意不是 nil
.
1
2
3
let sessionConfig = URLSessionConfiguration.default
sessionConfig.connectionProxyDictionary = [:]
session.config = sessionConfig
This post is licensed under CC BY 4.0 by the author.