Questions tagged [nevpnmanager]

NEVPNManager, delivered as part of the iOS & macOS SDK's, is used to create and manage VPN configurations and to control the resulting VPN tunnel connections.

Each macOS and iOS application is allowed to create a single VPN configuration it can make use of. The NEVPNManager singleton instance corresponds to a single VPN configuration as displayed in the VPN Settings panel in the Settings app on iOS and the Network Preferences pane in the System Preferences application in macOS.

86 questions
3
votes
1 answer

How to access vpn api url in device using iOS Swift?

I have consuming OData from api url using swiftyJSON. Here api url is connected with VPN. And api url looks like http://192.xxx.xx.xx:8000/sap/opu/odata/sap/Z_SRV/PRListSetSet?$format=json When i run in simulator, i can able get data from odata api…
PvUIDev
  • 95
  • 1
  • 9
  • 38
3
votes
2 answers

Can a VPN Killswitch be configured/programmed in iOS?

I have been investigating it's possible to achieve the following. I have both an IKEv2 VPN server and have a Swift iOS client. On the client side I have enabled the isOnDemandEnabled on the NEVPNManager and have set the rules to match anything. var…
Houman
  • 64,245
  • 87
  • 278
  • 460
3
votes
1 answer

NEVPNManager saveToPreferences/loadFromPreferences callbacks never called

I am trying to setup a IPSec VPN connection but when I try to run manager.saveToPreferences or manager.loadFromPreferences The callback functions are never called and so I cannot start the VPN Tunnel, and "123" is never printed. The program just…
Max00355
  • 827
  • 2
  • 12
  • 28
3
votes
2 answers

Create Personal VPN connection using NEVPNManager

I am trying to create VPN connection in my app. I go through this link https://developer.apple.com/documentation/networkextension/nevpnmanager but did not find any official code to use NEVPNManager and even not found any tutorial to use this…
Shipra Gupta
  • 171
  • 1
  • 2
  • 10
3
votes
0 answers

Connecting to VPN with Swift 3

I'm trying to connect to a VPN in an iOS app. What I already know is the VPN type (L2TP over IPSec), account name, password and shared secret. The connection works through Mac's Network settings. Although, it seems a little more complicated, when…
Bartosz Woźniak
  • 2,065
  • 3
  • 14
  • 31
3
votes
0 answers

NEVPNManager - Connect on-demand blocks internet access

I'm creating a VPN profile through my app and I have the following rules and set up: let newIPSec = NEVPNProtocolIPSec() newIPSec.serverAddress = AppConfiguration.getVPNEndPoint() newIPSec.authenticationMethod =…
Siddharthan Asokan
  • 4,321
  • 11
  • 44
  • 80
2
votes
0 answers

Establish a VPN connection in Mac Catalyst

I'm creating a VPN app in Mac Catalyst. The demo works fine on the iOs platform but when I run on make catalyst, VPN status changes to Connecting... and then Disconnected.... The same code also works in macOS separate project. I've used…
Anis Mansuri
  • 335
  • 3
  • 10
2
votes
1 answer

iOS VPN configuration keeps disconnecting when on battery

I've set up a IKEv2 VPN configuration in my app, using NEVPNManager. The intention is for the connection to remain active until the user toggles it off, or is terminated by the VPN server. For that purpose, I've set the following configuration: let…
PM4
  • 624
  • 1
  • 5
  • 18
2
votes
0 answers

How to get server address and remoteIdentifier?

I am able to save VPN configuration. Please tell me how to make the server address variable or get a server address and what is the remote identifier for? I have used this example for reference: Connect to a VPN with certificate - iOS/Swift How can…
2
votes
2 answers

iOS VPN auto disconnected after sometime

I'm working on a VPN application, VPN working fine but after 15-20 minutes, its automatically disconnected. Here is configuration I'm using let vpnProtocol = NEVPNProtocolIKEv2() vpnProtocol.username =…
Subhash Sharma
  • 745
  • 6
  • 24
2
votes
0 answers

How to get the reason for the connection failure from the NEVPNManager IKEv2?

I'm trying to establish an IKEv2 connection on iOS using the NEVPNManager. I update my profile successfully using NEVPNProtocolIKEv2 and start the connection process but after a few seconds the connection stops without any error. Is there any way I…
2
votes
0 answers

How to track data consumed by each application using VPN in iOS

Recently I downloaded My Data Mgr from app store and they seem to track data usage of each app through vpn. I don't have enough knowledge in vpn and setting up one. But I guess they are setting up a local vpn and tunneling all the network data…
SUMIT NIHALANI
  • 387
  • 1
  • 10
2
votes
0 answers

NEVPNManager rules automatically disconnecting

I have a NEVPNProtocolIKEv2 connection. How to configure rule so that after 10 minutes the connection is disconnected? let providerManagerIKEv2 = NEVPNProtocolIKEv2() providerManagerIKEv2.authenticationMethod =…
2
votes
1 answer

How to stub the connection property (NEVPNConnection) in NEVPNManager?

I would like to extend the existing NetworkExtension classes by a protocol, in order to unit test my code. I have first created the protocol for NEVPNManager protocol NEVPNManagerProtocol { var connection : ConnectionProtocol { get } // <--…
Houman
  • 64,245
  • 87
  • 278
  • 460
2
votes
2 answers

"Error Domain=NEVPNErrorDomain Code=1 \"(null)\"" While connecting VPN server

I'm getting "Error Domain=NEVPNErrorDomain Code=1 \"(null)\"" only first time while connecting to VPN server, later onwards it works perfectly. I've checked NEVPNErrorDomain Error 1 when trying to start TunnelProvider network extension similar to my…
Shrikant K
  • 1,988
  • 2
  • 23
  • 34