Select a VPN profile (vpnconf.select)
Declaration
ok = vpnconf.select(nameOrId)
Parameters
- nameOrId
String. Display name or VPNID. If multiple profiles share the same name, selection is not deterministic. Use VPNID for precise selection.
Returns
- ok
Boolean. true on success; false on failure (usually because the specified profile does not exist).
Notes
You can obtain VPNID via vpnconf.list.
Example
local success = vpnconf.select('A Test VPN')
if success then
sys.alert('Operation succeeded')
else
sys.alert('Operation failed. Does the target VPN exist?')
end