place('{{onDemandRulesDict}}', '<key>OnDemandRules</key>\n          <array>\n' + onDemandRulesArr.join('')+'          </array>\n');
                } else {
                    onDemandRules = onDemandRules.replace('{{onDemandRulesDict}}', '');
                }

                xmlString = xmlString.replace('{{onDemandRules}}', onDemandRules)
                console.log(xmlString);
                download('vpn.mobileconfig', xmlString);
                location.reload(true)
            })
        });
    