Allow OnDemand to be toggled later (#1557)

This commit is contained in:
Jack Ivanov 2019-09-06 09:33:36 +02:00 committed by GitHub
parent 95eddccfb7
commit c6f45ead69
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,11 +8,11 @@
<dict> <dict>
<key>IKEv2</key> <key>IKEv2</key>
<dict> <dict>
{% if algo_ondemand_wifi or algo_ondemand_cellular %}
<key>OnDemandEnabled</key> <key>OnDemandEnabled</key>
<integer>1</integer> <integer>{{ 1 if algo_ondemand_wifi or algo_ondemand_cellular else 0 }}</integer>
<key>OnDemandRules</key> <key>OnDemandRules</key>
<array> <array>
{% if algo_ondemand_wifi or algo_ondemand_cellular %}
{% if algo_ondemand_wifi_exclude|b64decode != '_null' %} {% if algo_ondemand_wifi_exclude|b64decode != '_null' %}
{% set WIFI_EXCLUDE_LIST = (algo_ondemand_wifi_exclude|b64decode|string).split(',') %} {% set WIFI_EXCLUDE_LIST = (algo_ondemand_wifi_exclude|b64decode|string).split(',') %}
<dict> <dict>
@ -52,12 +52,12 @@
<key>URLStringProbe</key> <key>URLStringProbe</key>
<string>http://captive.apple.com/hotspot-detect.html</string> <string>http://captive.apple.com/hotspot-detect.html</string>
</dict> </dict>
{% endif %}
<dict> <dict>
<key>Action</key> <key>Action</key>
<string>Disconnect</string> <string>{{ 'Disconnect' if algo_ondemand_wifi or algo_ondemand_cellular else 'Connect' }}</string>
</dict> </dict>
</array> </array>
{% endif %}
<key>AuthenticationMethod</key> <key>AuthenticationMethod</key>
<string>Certificate</string> <string>Certificate</string>
<key>ChildSecurityAssociationParameters</key> <key>ChildSecurityAssociationParameters</key>