Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Network Extension (Built-in VPN)

Network Extension (Built-in VPN)

Andrii Doroshko

Alexander Saenko

June 15, 2019
Tweet

More Decks by Alexander Saenko

Other Decks in Programming

Transcript

  1. Problem API are: - protected and located on a private

    company’s network. - without corporative VPN connection we can not work with it (API). How to solve? - Ask user to install existing OpenVPN app. - Investigate possible ways to achieve VPN connection inside our app. So that? We make a decision to make a deep dive in to App Extension technology's facilities. What’s the problem?
  2. Agenda • What is App Extension • Network Extension overview

    • How it works? • Little bit of code • Types of App Extension
  3. Important things • App Extension is different from a host

    app • Use your host app to deliver your extension • Each extension is a separate binary that runs independently of the host app • Host app calls extension
  4. NETunnelProvider 2. An abstract base class shared by NEPacketTunnelProvider and

    NEAppProxyProvider. 1. Each instance corresponds to a single tunneling session, with a single associated configuration. 3. The NETunnelProvider class should not be subclassed directly. Instead, you should create subclasses of NETunnelProvider subclasses. - Use NEAppProxyProvider to operate on a TCP/UDP level. - Use NEPacketTunnelProvider to operate on a IP level.
  5. Host app User inputs credentials NETunnelProviderManager update with new credentials

    Extension Call `start()` method Call `start()` method Configure OpenVPN Adapter Establish connection