OpenVPN class
Constructors
OpenVPN ({dynamic onVpnStatusChanged (VpnStatus ? data )?, dynamic onVpnStageChanged (VPNStage stage , String rawStage )? })
OpenVPN's Constructions, don't forget to implement the listeners
onVpnStatusChanged is a listener to see vpn status detail
onVpnStageChanged is a listener to see what stage the connection was
Methods
connect (String config , String name , {String ? username , String ? password , List <String > ? bypassPackages , bool certIsRequired = false })
→ void
Connect to VPN
disconnect ()
→ void
Disconnect from VPN
initialize ({String ? providerBundleIdentifier , String ? localizedDescription , String ? groupIdentifier , dynamic lastStatus (VpnStatus status )?, dynamic lastStage (VPNStage status )? })
→ Future <void >
This function should be called before any usage of OpenVPN
All params required for iOS, make sure you read the plugin's documentation
isConnected ()
→ Future <bool >
Check if connected to vpn
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
requestPermissionAndroid ()
→ Future <bool >
Request android permission (Return true if already granted)
stage ()
→ Future <VPNStage >
Get latest connection stage
status ()
→ Future <VpnStatus >
Get latest connection status
toString ()
→ String
A string representation of this object.
inherited
Static Methods
filteredConfig (String ? config )
→ Future <String ? >
Sometimes config script has too many Remotes, it cause ANR in several devices,
This happened because the plugin check every remote and somehow affected the UI to freeze