Enable both HTTP and HTTPS proxies

This commit is contained in:
Davide De Rosa 2019-04-13 17:55:08 +02:00
parent 4f8a669967
commit b118030d43
1 changed files with 5 additions and 2 deletions

View File

@ -560,8 +560,11 @@ extension TunnelKitProvider: SessionProxyDelegate {
proxySettings = NEProxySettings()
proxySettings?.httpsServer = httpsProxy.neProxy()
proxySettings?.httpsEnabled = true
} else if let httpProxy = cfg.sessionConfiguration.httpProxy ?? reply.options.httpProxy {
proxySettings = NEProxySettings()
}
if let httpProxy = cfg.sessionConfiguration.httpProxy ?? reply.options.httpProxy {
if proxySettings == nil {
proxySettings = NEProxySettings()
}
proxySettings?.httpServer = httpProxy.neProxy()
proxySettings?.httpEnabled = true
}