Intranet web sites via VPN [closed]
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this questionI have created an App that gets data from Web Services on an InTRAnet web site. In order for my App to see these sites I have to turn on the VPN that is setup for our company intranet. So when I turn on the VPN it asked for authentication. That has to be turned on before my App launches because I know of no way to access the VPN via code (Is there anything in the SDK for working with the VPN?)
The problem i开发者_C百科s that once my my App launches it needs to authenticate against the intranet web site (authentication can't be turned off for security reasons).
So in this scenario:
- User turns on VPN, enters network credentials to get access to internal network
- User starts App that ask for network credentials (because web server asked for auth)
So as you can see this is quite a pain (having to enter network credentials twice).
Anybody have any ideas on how I could get around this?
BTW - I'm using ASIHTTPRequest in my code.
There isn't any way around it. You can't roll your own in-app VPN provider. The best you can do is to check if the user is currently connected via VPN and if not, provide some feedback that indicates they need to turn on VPN and how to do it. Until it is turned on, disable all app functionality.
As of iOS5 the process becomes a bit better though. Now you can redirect the user directly to the settings page via URL scheme. To get to the network settings, you would use this scheme:
[NSURL URLWithString:@"prefs:root=General&path=Network"]];
you might wanna look at a subject called "VPN On Demand" on ipad/iphone it works with many providers and i think it should do what you want.
精彩评论