Auto switch between 2 VPN Profiles/Endpoints

Hello,

basically I want to achieve the following. I have an iPhone that should establish a vpn connection over every network connection (cellular, wifi) => always on demand. There is only one big requirement. Default should be "VPN Profile A". If it is connect to a special wifi, let's call it "SpecialWifi", it should use "VPN Profile B".

The "only" problem is, that I have to switch manually the vpn profile, weather I'm connected to "SpecialWifi" or not.

So my question is, is it possible that the vpn profile switch is done automatically or do I have to switch it manually?

This is my mobileconfig file, that works with my vpn gateway.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>PayloadContent</key>
	<array>
		
		<!-- Default VPN Profile -->
		<dict>
			<key>UserDefinedName</key>
			<string>Default VPN Profile</string>
			<key>PayloadDisplayName</key>
			<string>Default VPN Profile</string>
			<key>PayloadIdentifier</key>
			<string>com.apple.vpn.managed.default</string>
			<key>PayloadType</key>
			<string>com.apple.vpn.managed</string>
			<key>PayloadUUID</key>
			<string>xxxx</string>
			<key>PayloadVersion</key>
			<integer>1</integer>
			<key>Proxies</key>
			<dict>
				<key>HTTPEnable</key>
				<integer>0</integer>
				<key>HTTPSEnable</key>
				<integer>0</integer>
			</dict>
			<key>VPN</key>
			<dict>
				<key>AuthName</key>
				<string>DEFAULT</string>
				<key>AuthenticationMethod</key>
				<string>Password</string>
				<key>RemoteAddress</key>
				<string>DEFAULT</string>
			</dict>
			<key>VPNSubType</key>
			<string>net.openvpn.connect.app</string>
			<key>VPNType</key>
			<string>VPN</string>
			<key>VendorConfig</key>
			<dict>
				DefaultVPNEndpointConfiguration
			</dict>
			<key>OnDemandEnabled</key>
			<integer>1</integer>
			<key>OnDemandRules</key>
			<array>
				<dict>
					<key>InterfaceTypeMatch</key>
					<string>WiFi</string>
					<key>SSIDMatch</key>
					<array>
						<string>SpecialWifi</string>
					</array>
					<key>Action</key>
					<string>Disconnect</string>
				</dict>
				<dict>
					<key>Action</key>
					<string>Connect</string>
				</dict>
			</array>
			<key>IPv4</key>
			<dict>
				<key>OverridePrimary</key>
				<integer>1</integer>
			</dict>
		</dict>
		
		
		<!-- Special Wifi VPN Profile -->
		<dict>
			<key>UserDefinedName</key>
			<string>Special wifi Profile</string>
			<key>PayloadDisplayName</key>
			<string>Special wifi Profile</string>
			<key>PayloadIdentifier</key>
			<string>com.apple.vpn.manged.specialwifi</string>
			<key>PayloadType</key>
			<string>com.apple.vpn.managed</string>
			<key>PayloadUUID</key>
			<string>xxxx</string>
			<key>PayloadVersion</key>
			<integer>1</integer>
			<key>Proxies</key>
			<dict>
				<key>HTTPEnable</key>
				<integer>0</integer>
				<key>HTTPSEnable</key>
				<integer>0</integer>
			</dict>
			<key>VPN</key>
			<dict>
				<key>AuthName</key>
				<string>DEFAULT</string>
				<key>AuthenticationMethod</key>
				<string>Password</string>
				<key>RemoteAddress</key>
				<string>DEFAULT</string>
			</dict>
			<key>VPNSubType</key>
			<string>net.openvpn.connect.app</string>
			<key>VPNType</key>
			<string>VPN</string>
			<key>VendorConfig</key>
			<dict>
				SpecialVPNEndpointConfiguration
			</dict>
			<key>OnDemandEnabled</key>
			<integer>1</integer>
			<key>OnDemandRules</key>
			<array>
				<dict>
					<key>InterfaceTypeMatch</key>
					<string>WiFi</string>
					<key>SSIDMatch</key>
					<array>
						<string>SpecialWifi</string>
					</array>
					<key>Action</key>
					<string>Connect</string>
				</dict>
				<dict>
					<key>Action</key>
					<string>Disconnect</string>
				</dict>
			</array>
			<key>IPv4</key>
			<dict>
				<key>OverridePrimary</key>
				<integer>1</integer>
			</dict>
		</dict>
		
	</array>
    <key>PayloadDisplayName</key>
    <string>VPN Configuration</string>
    <key>PayloadIdentifier</key>
    <string>myidentifier.xxxxx</string>
    <key>PayloadRemovalDisallowed</key>
    <false/>
    <key>PayloadType</key>
    <string>Configuration</string>
    <key>PayloadUUID</key>
    <string>xxxx</string>
    <key>PayloadVersion</key>
    <integer>1</integer>
</dict>
</plist>		

Thanks for helping

Auto switch between 2 VPN Profiles/Endpoints
 
 
Q