Search packages, repositories and app categories

Package detailsv0.13.0

flutter_vpn

Plugin for developers to access VPN service in their flutter app.

AndroidiOS
30-day downloads
106
Likes
112
Pub points
140

Install package

flutter pub add flutter_vpn

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

A Flutter plugin enabling developers to integrate VPN services into their mobile applications for Android and iOS. It provides a straightforward interface to manage VPN connections, allowing apps to establish secure network tunnels programmatically. Designed for developers seeking to implement custom networking features or privacy-focused functionality within their apps, the plugin abstracts platform-specific complexities. It supports both Android and iOS platforms, making it suitable for cross-platform development. The package is open-source and hosted on GitHub, encouraging community contributions and transparency.

Use cases

  • Integrating secure network tunnels in apps
  • Enabling user-controlled VPN access
  • Building privacy-focused applications
  • Supporting corporate network connectivity
  • Creating network monitoring tools

Key features

  • Cross-platform support (Android & iOS)
  • Simple API for managing VPN connections
  • Open-source with public repository
  • Platform abstraction for native VPN APIs
  • Secure connection handling

Suitable for

  • Developers building secure communication apps
  • Apps requiring private network access
  • Enterprise mobility solutions
  • Network security tools
  • Privacy-enhancing applications

Considerations

  • Requires platform-specific permissions
  • May need additional configuration for enterprise use
  • Limited documentation beyond basic usage
  • Depends on underlying OS VPN capabilities
  • Potential compatibility issues with certain devices

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

Flutter VPN plugin

Pub Package Awesome Flutter

This plugin help developers to access VPN service in their flutter app.
本插件帮助开发者在自己的应用内调用 VPN 服务。

The Android part was implemented by strongswan which support ikev2 protocol.
The iOS part was implemented by NEVPNManager.

Issues and PRs are welcome!

Installation

For Android

Modify your app/build.gradle to use abiFilter since flutter doesn't apply abiFilter for target platform yet.

android {
    ...
    buildTypes {
        ...
        release {
            ...
            ndk {
                if (!project.hasProperty('target-platform')) {
                    abiFilters 'arm64-v8a', 'armeabi-v7a', 'x86_64'
                } else {
                    def platforms = project.property('target-platform').split(',')
                    def platformMap = [
                            'android-arm'  : 'armeabi-v7a',
                            'android-arm64': 'arm64-v8a',
                            'android-x86'  : 'x86',
                            'android-x64'  : 'x86_64',
                    ]
                    abiFilters = platforms.stream().map({ e ->
                        platformMap.containsKey(e) ? platformMap[e] : e
                    }).toArray()
                }
            }
    }
}

The plugin will automatically download pre-build native libraries from here if they haven't been downloaded.

For iOS

You need to open Personal VPN and Network Extensions capabilities in Xcode: see Project->Capabilities.

VPN connection errors are handled in swift code, you need to use Xcode to see connection errors if there is any.

Categories

Dependencies

Dependency list 1 items

  • plugin_platform_interface^2.0.2

Source repository

Projects using this package

No data available yet.