{"id":40519939,"url":"https://github.com/zikwall/flutter_openvpn_16kb","last_synced_at":"2026-01-20T21:04:06.021Z","repository":{"id":328594131,"uuid":"1116080082","full_name":"zikwall/flutter_openvpn_16kb","owner":"zikwall","description":null,"archived":false,"fork":false,"pushed_at":"2025-12-14T06:41:48.000Z","size":7437,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-12-16T09:35:30.674Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zikwall.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-14T06:37:19.000Z","updated_at":"2025-12-14T06:41:50.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/zikwall/flutter_openvpn_16kb","commit_stats":null,"previous_names":["zikwall/flutter_openvpn_16kb"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/zikwall/flutter_openvpn_16kb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zikwall%2Fflutter_openvpn_16kb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zikwall%2Fflutter_openvpn_16kb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zikwall%2Fflutter_openvpn_16kb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zikwall%2Fflutter_openvpn_16kb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zikwall","download_url":"https://codeload.github.com/zikwall/flutter_openvpn_16kb/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zikwall%2Fflutter_openvpn_16kb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28613679,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T18:56:40.769Z","status":"ssl_error","status_checked_at":"2026-01-20T18:54:26.653Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-20T21:04:05.954Z","updated_at":"2026-01-20T21:04:06.011Z","avatar_url":"https://github.com/zikwall.png","language":"Swift","funding_links":["https://paypal.me/nizwar/"],"categories":[],"sub_categories":[],"readme":"Connect to the OpenVPN service using Flutter. Contributions through issues and pull requests are highly appreciated!\n\n## Android Setup\n\n### 1. Permission Handler\n\n#### Java\nInclude the following code in the `onActivityResult` method of `MainActivity.java` (if you are using Java):\n\n```java\nOpenVPNFlutterPlugin.connectWhileGranted(requestCode == 24 \u0026\u0026 resultCode == RESULT_OK);\n```\n\nThe complete method should look like this:\n\n```java\n...\nimport id.laskarmedia.openvpn_flutter.OpenVPNFlutterPlugin;\n...\n\n@Override\nprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n    OpenVPNFlutterPlugin.connectWhileGranted(requestCode == 24 \u0026\u0026 resultCode == RESULT_OK);\n    super.onActivityResult(requestCode, resultCode, data);\n}\n```\n\n#### Kotlin\nInclude the following code in the `onActivityResult` method of `MainActivity.kt` (if you are using Kotlin):\n\n```kotlin\nOpenVPNFlutterPlugin.connectWhileGranted(requestCode == 24 \u0026\u0026 resultCode == RESULT_OK);\n```\n\nThe complete method should look like this:\n\n```kotlin\n...\nimport id.laskarmedia.openvpn_flutter.OpenVPNFlutterPlugin\n...\noverride fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {\n    OpenVPNFlutterPlugin.connectWhileGranted(requestCode == 24 \u0026\u0026 resultCode == RESULT_OK)\n    super.onActivityResult(requestCode, resultCode, data)\n}\n```\n\n### 2. App Bundle Build Not Connecting\n\nIf you encounter issues with the app not connecting using the latest Flutter SDK, apply the following quick fix:\n\nEnsure that you include the following attribute within the `\u003capplication\u003e` tag in your `AndroidManifest.xml` file:\n\n```xml\n\u003capplication\n    ...\n    android:extractNativeLibs=\"true\"\n    ...\u003e\n\u003c/application\u003e\n```\n\n## iOS Setup\n\n### 1. Add Capabilities\n\nAdd the `App Groups` and `Network Extensions` capabilities to the Runner's target. Refer to the image below for detailed instructions:\n\n\u003cimg src=\"https://blogger.googleusercontent.com/img/a/AVvXsEjYWGJ2ug4JM5g8_WslvdRY0Q-UUizOdmoCG8Ybhte9LiIv8_SSYFDHl-PzWApnAxvTA0hdpnBzca7C_zU5pHnyD8NLNoMw1ZOty7Zo6PTF22oIk7liB0aCXQnRAI1R0Zv9XfnuwuHuourtUR6lzf1ztrU_PTa6QFAU8kRPK-4h5MVu7QVzmpVs4Fvl=s600\"/\u003e\n\n### 2. Add New Target\n\nClick the `+` button on the bottom left, choose `NETWORK EXTENSION`, and follow the instructions in the image below:\n\n\u003cimg src=\"https://blogger.googleusercontent.com/img/a/AVvXsEirvK1MMCqLADbXdtjppE-z1QC_cDPBnCWZ1EPkNLCM7TYyG3c2IGf8zlb1svW6aP6UB4eNOpX3svFwP_e9D0iP9Mb-dlXVtnUsYlg3iIQVqi_mmw4vLH5d8peEt7UGORikSlB3Hy0o1vj4XIBJNv5g8bIellHTXo4Zu4toh7Dt0jw4ZMyWDAoepLp7=s600\"/\u003e\n\nAdd the same capabilities to the VPNExtension as you did for the Runner's target:\n\n\u003cimg src=\"https://blogger.googleusercontent.com/img/a/AVvXsEgEj_1oXmgRSaVISGFHutY88enlUG1V8ynqfDHso-uS6vKEBLa-dhhChjZQ12iN7UpNM6thCHLmll3h6p_lW9URAPca-pXkwIN1pmATdfk3NnqnmlYtgUAicbr-zDZmNF7JJ4l4EArFtdrb_IjxH_FpLJGCURkpGO9qBtkw9WYs3k2vRSa3c8ga9b6S=s600\"/\u003e\n\n### 3. Copy and Paste\n\nAdd the following lines to your Podfile (`ios/Podfile`):\n\n```dart\ntarget 'VPNExtension' do\n  use_frameworks!\n  pod 'OpenVPNAdapter', :git =\u003e 'https://github.com/ss-abramchuk/OpenVPNAdapter.git', :tag =\u003e '0.8.0'\nend\n```\n\nOpen `VPNExtension \u003e PacketTunnelProvider.swift` and copy-paste the script from [PacketTunnelProvider.swift](https://raw.githubusercontent.com/nizwar/openvpn_flutter/master/example/ios/VPNExtension/PacketTunnelProvider.swift).\n\n\u003cimg src=\"https://blogger.googleusercontent.com/img/a/AVvXsEhPf7Vl_8LPYMTTCn0UbpR3f3qzaFPFRMikSg8xetWRyfTuViq6o3fdrjU4-jD-xZtkOZV_i2WoNXkcHLn7znHengHZGgtlJlNbNk6vjNYgI2jYg8ToOYIQjR7QBd443ee4GqpEww0FYPrIiIpabUthpur6SakiPJM1dsDNCBW9ROWixuEzrk61aIod=s600\"\u003e\n\n## Note\n\nYou must use iOS devices instead of the simulator to connect.\n\n## Recipe\n\n### Initialize\n\nBefore starting, initialize the OpenVPN plugin:\n\n```dart\nlate OpenVPN openvpn;\n\n@override\nvoid initState() {\n    openvpn = OpenVPN(onVpnStatusChanged: _onVpnStatusChanged, onVpnStageChanged: _onVpnStageChanged);\n    openvpn.initialize(\n        groupIdentifier: \"GROUP_IDENTIFIER\", ///Example 'group.com.laskarmedia.vpn'\n        providerBundleIdentifier: \"NETWORK_EXTENSION_IDENTIFIER\", ///Example 'id.laskarmedia.openvpnFlutterExample.VPNExtension'\n        localizedDescription: \"LOCALIZED_DESCRIPTION\" ///Example 'Laskarmedia VPN'\n    );\n}\n\nvoid _onVpnStatusChanged(VPNStatus? vpnStatus){\n    setState((){\n        this.status = vpnStatus;\n    });\n}\n\nvoid _onVpnStageChanged(VPNStage? stage){\n    setState((){\n        this.stage = stage;\n    });\n}\n```\n\n### Connect to VPN\n\n```dart\nvoid connect() {\n  openvpn.connect(\n    config,\n    name,\n    username: username,\n    password: password,\n    bypassPackages: [],\n    // In iOS connection can get stuck in \"connecting\" if this flag is \"false\". \n    // Solution is to switch it to \"true\".\n    certIsRequired: false,\n  );\n}\n```\n\n### Disconnect\n\n```dart\nvoid disconnect(){\n    openvpn.disconnect();\n}\n```\n\n# Publishing to Play Store and App Store\n\n### Android\n\n1. You can use app bundles to publish the app.\n2. Add the following to your files in the `android` folder (special thanks to https://github.com/nizwar/openvpn_flutter/issues/10). Otherwise, the connection may not be established in some cases and will silently report \"disconnected\" when trying to connect. This is likely related to some symbols being stripped by Google Play.\n\n```\ngradle.properties \u003e android.bundle.enableUncompressedNativeLibs=false\nAndroidManifest \u003e android:extractNativeLibs=\"true\" in the application tag\n```\n\nAdd the following inside the `android` tag in `app/build.gradle`:\n\n```gradle\nandroid {\n    ...\n    //from here ======\n    lintOptions {\n        disable 'InvalidPackage'\n        checkReleaseBuilds false\n    }\n\n    packagingOptions {\n        jniLibs {\n            useLegacyPackaging = true\n        }\n    }\n\n    bundle {\n        language {\n            enableSplit = false\n        }\n        density {\n            enableSplit = false\n        }\n        abi {\n            enableSplit = false\n        }\n    }\n    //to here\n    ...\n}\n```\n\n#### Notifications\n\nAs the plugin shows notifications for connection status and connection details, you must request permission using third-party packages.\n\nExample using [permission_handler](https://pub.dev/packages/permission_handler):\n\n```dart\n///Put it anywhere you wish, like once you initialize the VPN or pre-connect to the server\nPermission.notification.isGranted.then((_) {\n  if (!_) Permission.notification.request();\n});\n```\n\n### iOS\n\n1. View [Apple Guidelines](https://developer.apple.com/app-store/review/guidelines/#vpn-apps) relating to VPN.\n2. This plugin DOES use encryption, but it uses exempt encryptions.\n\n## Licenses\n\n* [openvpn_flutter](https://github.com/nizwar/openvpn_flutter/blob/master/LICENSE) for this plugin\n* [ics-openvpn](https://github.com/schwabe/ics-openvpn) for the Android engine\n* [OpenVPNAdapter](https://github.com/ss-abramchuk/OpenVPNAdapter) for the iOS engine\n\n# Support\n\nIf you appreciate my work, don't forget to give a thumbs up or support me with a cup of coffee.\n\n\u003ca href=\"https://paypal.me/nizwar/\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/andreostrovsky/donate-with-paypal/master/blue.svg\" height=\"40\"\u003e\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzikwall%2Fflutter_openvpn_16kb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzikwall%2Fflutter_openvpn_16kb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzikwall%2Fflutter_openvpn_16kb/lists"}