Skip to main content

Connect using the currently selected VPN (vpnconf.connect)

Declaration

ok = vpnconf.connect()

Returns

  • ok
    Boolean. true if the operation started successfully (not necessarily connected yet); false if the operation failed, usually because no profile is selected.

Example

local success = vpnconf.connect()
if success then
sys.alert('Operation succeeded, connecting...')
else
sys.alert('No VPN selected. After creating a VPN, call vpnconf.select to select it.')
end