Download the PHP package projectmata/mobile-openvpn without Composer

On this page you can find all versions of the php package projectmata/mobile-openvpn. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package mobile-openvpn

Projectmata Mobile OpenVPN

Latest Version Total Downloads License

OpenVPN client plugin for NativePHP Mobile. Lets a Laravel + NativePHP mobile app bring up, tear down, and inspect an OpenVPN tunnel on Android and iOS.

Heads-up — native runtime required. Unlike biometrics or geolocation, neither Android nor iOS ship an OpenVPN implementation. This package scaffolds the bridge, PHP facade, and JS API but you must integrate an OpenVPN runtime (see Native integration) before Connect actually opens a tunnel.

Requirements

Installation

Laravel auto-discovery registers the service provider and facade. Rebuild the mobile app so NativePHP bundles the native plugin:

Usage

PHP (Laravel)

JavaScript (in-app)

The plugin registers itself on window.NativePHP.OpenVpn:

Bridge methods

Method Params Returns
OpenVpn.IsSupported — { success, supported }
OpenVpn.RequestPermission — { success, granted, message? }
OpenVpn.Connect { profile, username?, password?, displayName? } { success, status, displayName }
OpenVpn.Disconnect — { success, status }
OpenVpn.GetStatus — { success, status }

status is one of disconnected, connecting, or connected.

Native integration

Android

This package does not declare a default OpenVPN runtime dependency because popular Android OpenVPN implementations are not published as ordinary Maven Central artifacts. Vendor ics-openvpn or your chosen runtime into your app, then update resources/android/src/main/java/com/projectmata/mobileopenvpn/OpenVpnPlugin.kt Connect.execute() to:

  1. Parse the .ovpn profile via ConfigParser.
  2. Build a VpnProfile.
  3. Start OpenVPNService with VPNLaunchHelper.startOpenVpn(profile, context).

Also wire an Activity Result callback if your runtime needs to report back once the user grants consent.

iOS

Apple does not provide OpenVPN. Add a Network Extension target to your Xcode project backed by OpenVPNAdapter (SPM or CocoaPods). In Connect.execute():

  1. Create a NETunnelProviderProtocol whose providerBundleIdentifier matches your NE target.
  2. Pass the .ovpn bytes, username, and password via providerConfiguration.
  3. saveToPreferences → connection.startVPNTunnel().

You'll also need the Personal VPN and Network Extensions entitlements on both the host app and the NE target, plus a matching provisioning profile (Apple does not grant these to free accounts).

Permissions

Licensing caveats

Most Android OpenVPN stacks (ics-openvpn, openvpn-for-android) are GPL-v2. Linking them into your app may propagate GPL obligations to your app binary. If that is a concern, consider:

OpenVPNAdapter on iOS wraps openvpn3 and is typically AGPL — review before shipping commercially.

License

MIT (scaffold code). The OpenVPN runtime you link against carries its own license — see above.


All versions of mobile-openvpn with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package projectmata/mobile-openvpn contains the following files

Loading the files please wait ...