Giter VIP home page Giter VIP logo

Comments (7)

ss-abramchuk avatar ss-abramchuk commented on May 31, 2024

Hi @RanchenY,
Have you provided a PacketFlow object to OpenVPNAdapter via configureTunnelWithSettings:callback: method of OpenVPNAdapterDelegate?

from openvpnadapter.

RanchenY avatar RanchenY commented on May 31, 2024

Hi @ss-abramchuk,
I did't do anything in this method.
Need setting something?

from openvpnadapter.

ss-abramchuk avatar ss-abramchuk commented on May 31, 2024

Yes, you need to pass NEPacketTunnelFlow object if everything is fine or nil if there was a error.

func configureTunnel(settings: NEPacketTunnelNetworkSettings, callback: @escaping (OpenVPNAdapterPacketFlow?) -> Void) {
    setTunnelNetworkSettings(settings) { (error) in
        callback(error == nil ? self.packetFlow : nil)
    }
}

callback accepts argument of type OpenVPNAdapterPacketFlow so don't forget to add this line of code -> extension NEPacketTunnelFlow: OpenVPNAdapterPacketFlow { }

from openvpnadapter.

RanchenY avatar RanchenY commented on May 31, 2024

I am sorry, I use the oc language.
But i don't understand about the method setTunnelNetworkSettings() .

from openvpnadapter.

ss-abramchuk avatar ss-abramchuk commented on May 31, 2024

OpenVPNAdapter is designed to use in conjunction with NEPacketTunnelProvider, method setTunnelNetworkSettings:completionHandler: is used to specify tunnel settings. You can read more of it here

from openvpnadapter.

RanchenY avatar RanchenY commented on May 31, 2024

Hi,
I read this link, it means create an extension? I do that, but get a hit, like this :-[NEProvider init]:51 NEProvider objects cannot be instantiated from non-extension processes..

from openvpnadapter.

ss-abramchuk avatar ss-abramchuk commented on May 31, 2024

You should read any tutorial about extensions. For example this one -> ios-9-vpn-api-network-extension-udp. I'm closing this issue cause it no more related to adapter.

from openvpnadapter.

Related Issues (20)

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.