We set below rule for IKEv2 / IPSec / NETunnelProviderManager custom protocols. where trusted domain contains www.whatismyipaddress.com and manually connected to VPN.
NEEvaluateConnectionRule *evalConnectionRule = [[NEEvaluateConnectionRule alloc] initWithMatchDomains:self.trustedDomains
andAction:NEEvaluateConnectionRuleActionNeverConnect];
NEOnDemandRuleEvaluateConnection *onDemandRule = [NEOnDemandRuleEvaluateConnection new];
onDemandRule.connectionRules = @[ evalConnectionRule ];
[activeRules addObject:onDemandRule];
[NEVPNManager sharedManager].onDemandRules = [evalConnectionRule];
[NEVPNManager sharedManager].onDemandEnabled = YES;
[NEVPNManager sharedManager].enabled = YES;
[[NEVPNManager sharedManager].connection startVPNTunnelAndReturnError:&connError];
www.whatismyipaddress.com shows correct public IP address and www.whatismyip.com shows correct VPN server address on Safari.
Above code snippet working fine on iOS / iPadOS on all bowsers but not on macOS browsers except Safari.
Is there something I'm missing here? Are there other settings that we have to configure in our NEVPNManager/NETunnelProviderManager for macOS specifically?
We are testing this in macOS Ventura.
1
0
707