Coder Social home page Coder Social logo

jiesmart / flutter-vpn Goto Github PK

View Code? Open in Web Editor NEW

This project forked from x-dea/flutter_vpn

0.0 1.0 0.0 295 KB

Plugin to access VPN service for Flutter | Flutter 的 VPN 插件

License: GNU Lesser General Public License v2.1

Java 84.29% Kotlin 4.28% Swift 5.24% Objective-C 0.37% Dart 4.15% Ruby 1.67%

flutter-vpn's Introduction

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.

flutter-vpn's People

Contributors

ctrysbita avatar flyingblu avatar kamranpirwani avatar shivam2590 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.