probeURL for NEOnDemandRuleConnect doesn't have affect

I have configured IKEv2 protocol which is working fine. I have a NEOnDemandRuleConnect so app always keep VPN connection enabled. But there are some cases when VPN server is inresponsible. In this case app keep trying to reconnect (because of the demandRule) and it blocks internet at all.

I would like to avoid this. I added probeURL property for my onDemandRule but it doesn't help.

App still trying to connect to VPN even when HTTP 500 response coming from probeURL.

So how to handle this situation properly?


        NEOnDemandRuleConnect *connectRule = [[NEOnDemandRuleConnect alloc] init];
        connectRule.probeURL = [NSURL URLWithString:@"http://httpstat.us/500"];
        [onDemandRules addObject:connectRule];


According to the docs:

/*!

* @property probeURL

* @discussion An HTTP or HTTPS URL. If a request sent to this URL results in a HTTP 200 OK response and all of the other conditions in the rule match, then then rule matches. If this property is nil (the default), then an HTTP request does not factor into the rule match.

*/

Replies

Also I created fake response here https://beeceptor.com/console/probetest just to check if VPN at least tries to reach out the probe. And it does. I can see that there was a request from 'nesessionmanager'. And response was 400 code.

Why VPN is reconnecting anyway though?