Class NETunnelProvider

  • All Implemented Interfaces:
    NSObject
    Direct Known Subclasses:
    NEAppProxyProvider, NEPacketTunnelProvider

    public class NETunnelProvider
    extends NEProvider
    [@interface] NETunnelProvider The NETunnelProvider class declares the programmatic interface for an object that provides a network tunnel service. Instances of this class are thread safe.
    • Constructor Detail

      • NETunnelProvider

        protected NETunnelProvider​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

        public static java.lang.Object allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(java.lang.String key)
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(java.lang.Object aTarget,
                                                                                 org.moe.natj.objc.SEL aSelector,
                                                                                 java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        public static org.moe.natj.objc.Class classForKeyedUnarchiver()
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • description_static

        public static java.lang.String description_static()
      • hash_static

        public static long hash_static()
      • instanceMethodSignatureForSelector

        public static NSMethodSignature instanceMethodSignatureForSelector​(org.moe.natj.objc.SEL aSelector)
      • instancesRespondToSelector

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
      • isSubclassOfClass

        public static boolean isSubclassOfClass​(org.moe.natj.objc.Class aClass)
      • keyPathsForValuesAffectingValueForKey

        public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(java.lang.String key)
      • new_objc

        public static java.lang.Object new_objc()
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • version_static

        public static long version_static()
      • appRules

        public NSArray<? extends NEAppRule> appRules()
        [@property] appRules An array of NEAppRule objects specifying which applications are currently being routed through the tunnel provided by this NETunnelProvider. If application-based routing is not enabled for the tunnel, then this property is set to nil.
      • handleAppMessageCompletionHandler

        public void handleAppMessageCompletionHandler​(NSData messageData,
                                                      NETunnelProvider.Block_handleAppMessageCompletionHandler completionHandler)
        handleAppMessage:completionHandler: This function is called by the framework when the container app sends a message to the provider. Subclasses should override this method to handle the message and optionally send a response.
        Parameters:
        messageData - An NSData object containing the message sent by the container app.
        completionHandler - A block that the method can execute to send a response to the container app. If this parameter is non-nil then the method implementation should always execute the block. If this parameter is nil then the method implementation should treat this as an indication that the container app is not expecting a response.
      • protocolConfiguration

        public NEVPNProtocol protocolConfiguration()
        [@property] protocolConfiguration An NEVPNProtocol object containing the provider's current configuration. The value of this property may change during the lifetime of the tunnel provided by this NETunnelProvider, KVO can be used to detect when changes occur. For different protocol types, this property will contain the corresponding subclass. For NEVPNProtocolTypePlugin protocol type, this property will contain the NETunnelProviderProtocol subclass. For NEVPNProtocolTypeIKEv2 protocol type, this property will contain the NEVPNProtocolIKEv2 subclass.
      • reasserting

        public boolean reasserting()
        [@property] reasserting A flag that indicates to the framework if this NETunnelProvider is currently re-establishing the tunnel. Setting this flag will cause the session status visible to the user to change to "Reasserting". Clearing this flag will change the user-visible status of the session back to "Connected". Setting and clearing this flag only has an effect if the session is in the "Connected" state.
      • routingMethod

        public long routingMethod()
        [@property] routingMethod The method by which network traffic is routed to the tunnel. The default is NETunnelProviderRoutingMethodDestinationIP.
      • setReasserting

        public void setReasserting​(boolean value)
        [@property] reasserting A flag that indicates to the framework if this NETunnelProvider is currently re-establishing the tunnel. Setting this flag will cause the session status visible to the user to change to "Reasserting". Clearing this flag will change the user-visible status of the session back to "Connected". Setting and clearing this flag only has an effect if the session is in the "Connected" state.
      • setTunnelNetworkSettingsCompletionHandler

        public void setTunnelNetworkSettingsCompletionHandler​(NETunnelNetworkSettings tunnelNetworkSettings,
                                                              NETunnelProvider.Block_setTunnelNetworkSettingsCompletionHandler completionHandler)
        setTunnelNetworkSettings:completionHandler: This function is called by tunnel provider implementations to set the network settings of the tunnel, including IP routes, DNS servers, and virtual interface addresses depending on the tunnel type. Subclasses should not override this method. This method can be called multiple times during the lifetime of a particular tunnel. It is not necessary to call this function with nil to clear out the existing settings before calling this function with a non-nil configuration.
        Parameters:
        tunnelNetworkSettings - An NETunnelNetworkSettings object containing all of the desired network settings for the tunnel. Pass nil to clear out the current network settings.
        completionHandler - A block that will be called by the framework when the process of setting or clearing the network settings is complete. If an error occurred during the process of setting or clearing the IP network settings then a non-nill NSError object will be passed to this block containing error details.