Yedy
Yedy

Reputation: 2126

Detecting established VPN when iDevice is using 3G/UMTS/Edge

if the iDevice is connected to the internet via WiFi I'm able to detect VPN-status using kSCNetworkFlagsTransientConnection. It works fine.

But in the case of 3G/UMTS this flag is always true.

VPN on/off is both Reachability Flag Status: WR t----l- .

Is there a way to detect the VPN-status when the iDevice is connected to the internet via 3G/UMTS/EDGE ... ?

Upvotes: 2

Views: 1966

Answers (1)

onnoweb
onnoweb

Reputation: 3038

In case this is still of value. I found a way to test. At least for IPSec and Juniper it appears that the VPN connection alters the device's proxy settings:

NSDictionary *dict = (__bridge NSDictionary *)(CFNetworkCopySystemProxySettings());

When VPN is not on, dict has 0 items. When VPN is on, dict has a content relevant to the particular vpn connection.

Upvotes: 3

Related Questions