Flutter plugin that provides a quick&dirty workaround for incompatibility between VMWare Airwatch MDM solution and Dart Sockets implementation

Overview

airwatch_socket_workaround

This plugin has been created to enable flutter apps to reach endpoints that are only reachable using a VMWare airwatch per app vpn.

Current status

In development

TODO

  • provide simple example using custom HttpClient
  • prepare for publishing
  • add examples for websocket
  • null safety
  • add example for multipart post
  • provide HLD

Getting started

Example

Example provides 3 basic use cases:

  • HTTP GET
  • Websocket (WIP)
  • HTTP Post multipart (WIP)

Http requests

Http requests can be sent using the 'native' socket by using AirWatchHttpWorkAround. doRequest method receives a dart http Request which is part of dart http package and handover the request to the native part of the plugin.

Example:

Future<String> get(String endpoint) {
  var request = Request('GET', Uri.parse(endpoint));
  return AirWatchWorkAroundFactory.getInstance().doRequest(request);  
}

Why is this needed?

Because Flutter(dart actually) currently is not respecting system "proxy" and therefore per APN VPN solutions, like vmware AirWatch do not work. Therefore, this class should only be used in IOS Plugin based Network client

The responsibility of using only in IOS is not enforced in any way by this class, it is delegated to plugin users.

Other considerations

Why not fetching system proxy?

Trying to get the current system proxy DO NOT WORK, since the system proxy is always null.

Is there already a bug for this?

An issue exists in flutter: https://github.com/flutter/flutter/issues/41500

Plugin development

Actions

  • Build action is described in .github/workflows/build.yml, it executes flutter pub get and flutter test commands
  • Publish (NOT WORKING) action is described in .github/workflows/public.yml. Currently is not working since i do not wish to upload my personal google credentials to a github secret.
You might also like...

Permission plugin for Flutter. This plugin provides a cross-platform (iOS, Android) API to request and check permissions.

Flutter permission_handler plugin The Flutter permission_handler plugin is build following the federated plugin architecture. A detailed explanation o

Dec 31, 2022

Unloc customizations of the Permission plugin for Flutter. This plugin provides an API to request and check permissions.

Flutter Permission handler Plugin A permissions plugin for Flutter. This plugin provides a cross-platform (iOS, Android) API to request and check perm

Nov 26, 2020

Get It - Simple direct Service Locator that allows to decouple the interface from a concrete implementation and to access the concrete implementation from everywhere in your App. Maintainer: @escamoteur

Get It - Simple direct Service Locator that allows to decouple the interface from a concrete implementation and to access the concrete implementation from everywhere in your App. Maintainer: @escamoteur

❤️ Sponsor get_it This is a simple Service Locator for Dart and Flutter projects with some additional goodies highly inspired by Splat. It can be used

Jan 1, 2023

Riverpod State Mgmt for Flutter. StateProviders, StateNotifierProviders, FutureProviders, StreamProviders, autodisposed and families, and everything in-between.

Riverpod State Mgmt for Flutter. StateProviders, StateNotifierProviders, FutureProviders, StreamProviders, autodisposed and families, and everything in-between.

Flutter Riverpod Learning/Reference zone A Null-Safety flutter project acting as a learning/code reference zone Based on Riverpod (v1/v2) Page Transit

Dec 24, 2022

Pasar parametros - App to practice navigation between screens and passing parameters from A-B and B-A

Pasar parametros - App to practice navigation between screens and passing parameters from A->B and B->A

App 5 App para practicar navegacion entre pantallas y paso de parametros de A-B

Feb 6, 2022

A Flutter Material Button that animates between Progress and Error states

A Flutter Material Button that animates between Progress and Error states

progress_button A Material Flutter Button that supports progress and error visuals Getting Started ProgressButton is designed to be easy to use and cu

Sep 21, 2022

Allows communication between your bot and the Web App built in Flutter displayed inside Telegram.

tele_web_app It enables communication between your bot and the Flutter-embedded Web App displayed inside Telegram by making use of interoperability be

Dec 8, 2022

Widget for selecting between ThemeMode.dark and ThemeMode.light

Widget for selecting between ThemeMode.dark and ThemeMode.light

ThemeModeSelector Widget I am currently working with the concept of Theme's in Flutter and I wanted to build a widget which would allow me to switch b

Oct 26, 2022
Comments
  • StreamedResponse

    StreamedResponse

    Hello @GoncaloPT,

    thanks for your workaround. It shall help me with an internal project. Is there a way to receive StreamedResponse for File-Downloads? This would really be helpful for bigger or longer file-downloads, to keep the user informed about the status / percentage.

    opened by albatrosify 3
  • StreamedResponse

    StreamedResponse

    Hello GoncaloPT,

    I am unable to do so on my own, so Id like to ask whether it would be possible to add a StreamedResponse Type Request. This would be helpful for downloading bigger files and still giving some information about progress to the user. Also I think the current implementation could run into problems when downloading big files and then sending the bytedata over platform channel at once.

    I have 0 idea about Swift and iOS code so I am really struggling to find a solution for this. Could you help with your knowledge?

    Best regards and thanks. 🙏

    opened by albatrosify 2
  • exception propagation in websocket

    exception propagation in websocket

    Adding code related to exception mapping. This means exceptions that occur on the native side are translated to typed exceptions on dart side. This is especially important for listening to stream scenarios.

    opened by GoncaloPT 0
  • Feature/all the request as raw

    Feature/all the request as raw

    • Removing support for string and multipart requests between dart and native; everything can be dealt by BaseRequest descendants and ios will always receive bodyBytes.
    • Adding multipart test in the example project
    • Adding integration test for basic HTTP requests ( string + bytes + multipart )
    opened by GoncaloPT 0
Releases(0.0.3)
  • 0.0.3(Oct 25, 2021)

    • Added example for websocket usage and logs capture
    • Added some more logs on airwatch_socket_workaround
    • Native side of http request workaround will now always return a byte array instead of a string. Dart side was adapted
    • be prepared for that.
    Source code(tar.gz)
    Source code(zip)
Owner
Gonçalo Silva
Technical Architect | Software developer | Cloud enthusiast
Gonçalo Silva
Anonchat-v2 - Anonchat - A microprotocol for communication build on Dart using sockets

AnonChat Originally made by Arslee on arslee07/anonchat. What's this? Anonchat i

null 6 Nov 11, 2022
changelog.dart provides a library and a command-line application to manage in the correct way the git metadata to build the changelog between two release

changelog.dart ?? changelog.dart: a collection of tools to manages in a fashion way a repository as maintainer. ?? Project Homepage Table of Content I

Vincenzo Palazzo 7 Dec 18, 2022
A quick sample app on how to implement a friend list and a profile page in Flutter.

FlutterMates All code resides in the /lib folder: there's no Android / iOS specific code needed. The article, slides and how this came to be, is here.

Codemate Ltd 528 Jan 8, 2023
A quick and powerful Flutter layout with a bottom navbar.

What is bottom_nav_layout? It is a quick flutter app layout for building an app with a bottom nav bar. You can get an app with fluent behavior running

Mustafa Azyoksul 31 Dec 21, 2022
[Flutter package] An easy and quick way to check if the local app is updated with the same version in their respective stores (Play Store / Apple Store ).

Retrieve version and url for local app update against store app Android and iOS Features Using as reference packages like in_app_update , version_chec

Kauê Murakami 11 Nov 9, 2022
Flutter quick code snippets - Feel free to contribute.

Flutter quick code snippets Points to be noted Here you can add your own quick flutter code snippets which can be referred while coding Please make a

Deepa Pandey 13 Sep 21, 2022
A Todo Notes Application developed with flutter, with basic functionalities to write quick Notes.

Notes Application - Flutter A Todo Notes Application developed with flutter, with basic functionalities to write quick Notes. NOTES PASSWORD-PROTECTED

Uttam 22 Jan 1, 2023
Vineet Kalghatgi 32 May 13, 2022
Ever want to create a quick form without wiring everything up? This might be the library for you.

Ever want to create a quick form without wiring everything up? This might be the library for you.

Adam Hammer 15 Sep 13, 2022
This plugin create a binding between your translations from .arb files and your Flutter app.

PROJECT MAINTENANCE PAUSED This project is no longer maintained due to the lack of time and availability. I'm a developer to and I know how frustratin

Razvan Lung 255 Dec 3, 2022