RU | EN

TrifleVPN

Description

An example demonstrating the API for developing a VPN application for Aurora OS. The project is a basic example that allows VPN solution developers to understand how to build their projects. It shows the basic universal logic without being tied to a specific real provider. The server to which the connection is made does not exist, so the result "connected successfully" is immediately returned. At the same time, you can see and debug how the client part works. The project contains an example of the Trifle VPN provider, a plugin for connman and for system settings (jolla-settings), as well as a GUI application for communicating with the plugin.

Build status:

  • example - pipeline status
  • dev - pipeline status

Table of Contents

Detailed description

Plugin to integrate in connman

The plugin defines the necessary behavior to start a VPN tunnel and establishes a communication channel to the tunnel through which TUN/TAP interfaces can be configured.

  • triflevpn_plugin.c — contains the necessary functions to register the plugin in the Connman VPN.

Plugin to integrate in the system settings

Includes .qml files that will be dynamically loaded by system settings:

and plugin QQmlExtensionPlugin:

IPC between VPN provider and VPN application

The application obtains a socket to communicate with the provider through a call to a DBus service that the provider registers:

In order to the application has access a DBus service that the provider registers, the provider must register a service named ORG_NAME.APP_NAME, where APP_NAME is the name of the application.

Compatibility

The project is compatible with all the current versions of the Aurora OS. Aurora 4 has validator restrictions for installing packages, it is recommended to disable package validation.

Branch info

Application versions conform to the branch naming convention

Install and Run

The application is installed and launched according to the instructions Example's build.

The application needs to have permissions for VPN and Internet to work. These permissions are set in the .desktop file.

To install the application, its RPM package must be signed with extended profile key. Information about getting the key here.

Screenshots

screenshots

Use Cases

The application has the following use cases:

  1. Create a new VPN connection,
  2. Connect and disconnect to the created VPN connection,
  3. Editing the VPN connection,
  4. Removing the VPN connection.

Project Structure

The project has a standard structure of an application based on C++ and QML for Aurora OS.

  • application directory contains implementation of the application to edit the connection settings.
    • application.pro file describes the subproject structure for the qmake build system.
    • icons directory contains application icons for different screen resolutions.
    • qml directory contains the QML source code and the UI resources.
      • components directory contains user QML components which implements some input fields.
      • cover directory contains the application cover implementations.
      • images directory contains the custom images.
      • pages directory contains the application pages.
      • TrifleVPN.qml file provides the application window implementation.
    • src directory contains the C++ source code.
      • main.cpp file is the application entry point.
    • ru.auroraos.TrifleVPN.desktop file defines the display and parameters for launching the application.
  • provider directory contains implementation of a VPN provider.
  • rpm directory contains the rpm-package build settings.
  • plugin directory contains the plugin to integrate in connman.
  • settings directory contains the plugin to integrate in the system settings.
  • translations directory contains the UI translation files.

Terms of Use and Participation

The source code of the project is provided under the license, which allows its use in third-party applications.

The contributor agreement documents the rights granted by contributors of the Open Mobile Platform.

Information about the contributors is specified in the AUTHORS file.

Code of conduct is a current set of rules of the Open Mobile Platform which informs you how we expect the members of the community will interact while contributing and communicating.