The readme states that:
System proxy detector module
Now you can also detect if an app is connected to VPN
let amIProxied: Bool = IOSSecuritySuite.amIProxied(considerVPNConnectionAsProxy: true)
However, in version 2.2.0 of this library, the parameter considerVPNConnectionAsProxy is not included in the public function:
/// This type method is used to determine if HTTP proxy was set in the iOS Settings.
///
/// Usage example
/// ```swift
/// let amIProxied: Bool = IOSSecuritySuite.amIProxied()
/// ```
/// - Returns: Bool indicating if the device has a proxy setted (true) or not (false)
public static func amIProxied() -> Bool {
return ProxyChecker.amIProxied()
}
The parameter is only available in the internal ProxyChecker.amIProxied(considerVPNConnectionAsProxy:) with a default value of false:
internal class ProxyChecker {
static func amIProxied(considerVPNConnectionAsProxy: Bool = false) -> Bool {
...
}
}
Which makes it impossible for consumers to enable treating VPN as proxy.
I suggest one of the options:
- Update README.md and remove this parameter to make it consistent with the public API
- Update
IOSSecuritySuite.amIProxied() and make it take the parameter considerVPNConnectionAsProxy and pass it to the internal ProxyChecker
- Provide a new
IOSSecuritySuite.amIVPNed() that allows consumers to separately check if the app is connected to a VPN
The readme states that:
However, in version 2.2.0 of this library, the parameter
considerVPNConnectionAsProxyis not included in the public function:The parameter is only available in the internal
ProxyChecker.amIProxied(considerVPNConnectionAsProxy:)with a default value offalse:Which makes it impossible for consumers to enable treating VPN as proxy.
I suggest one of the options:
IOSSecuritySuite.amIProxied()and make it take the parameterconsiderVPNConnectionAsProxyand pass it to the internalProxyCheckerIOSSecuritySuite.amIVPNed()that allows consumers to separately check if the app is connected to a VPN