Refine again how proxy settings apply
Only set bypass domains if manual configuration.
This commit is contained in:
parent
0849fe6cc7
commit
a3202bb218
|
@ -117,23 +117,20 @@ extension OpenVPN.ConfigurationBuilder {
|
|||
|
||||
switch settings.configurationType {
|
||||
case .manual:
|
||||
if let proxyServer = settings.proxyServer {
|
||||
httpProxy = proxyServer
|
||||
httpsProxy = proxyServer
|
||||
proxyAutoConfigurationURL = nil
|
||||
}
|
||||
httpProxy = settings.proxyServer
|
||||
httpsProxy = settings.proxyServer
|
||||
proxyBypassDomains = settings.proxyBypassDomains.filter { !$0.isEmpty }
|
||||
proxyAutoConfigurationURL = nil
|
||||
|
||||
case .pac:
|
||||
if let pac = settings.proxyAutoConfigurationURL {
|
||||
httpProxy = nil
|
||||
httpsProxy = nil
|
||||
proxyAutoConfigurationURL = pac
|
||||
}
|
||||
httpProxy = nil
|
||||
httpsProxy = nil
|
||||
proxyBypassDomains = nil
|
||||
proxyAutoConfigurationURL = settings.proxyAutoConfigurationURL
|
||||
|
||||
case .disabled:
|
||||
break
|
||||
}
|
||||
proxyBypassDomains = settings.proxyBypassDomains.filter { !$0.isEmpty }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -65,9 +65,9 @@ public protocol DNSSettingsProviding {
|
|||
public protocol ProxySettingsProviding {
|
||||
var proxyServer: Proxy? { get }
|
||||
|
||||
var proxyAutoConfigurationURL: URL? { get }
|
||||
|
||||
var proxyBypassDomains: [String] { get }
|
||||
|
||||
var proxyAutoConfigurationURL: URL? { get }
|
||||
}
|
||||
|
||||
public protocol MTUSettingsProviding {
|
||||
|
|
Loading…
Reference in New Issue