Jump to content
  • 0

VPN Tunneling of NSUrlRequests


Markus Bosch

Question

Posted

We want to implement an app for synchronizing of SharePoint content to local databases on iOS devices being protected by your MDM solution (SecureHub). The synchronization and other network related supporting processes of this app run smoothly. However, we have an issue with a specific process ("logfile sending") to submit a log file to a SharePoint library.

When the user triggers the sending of the log file, this app opens a NSMutableUrlRequest, it calls the "PUT" verb und determines the address of the SharePoint library to initiate the WebDAV request. With our implementation it looks like the app intents to bypass the VPN tunnel - whereas the other processes (synchronization and others) are using this tunnel. Thus, this specific request never reaches its target server and ends up in a timeout.

We were told by the vendor of the app that they basically use the same iOS interfaces and calls (NSMutableUrlRequest) to send or receive data as for the "logfile sending" process. Furthermore, the app runs with no issues in other scenarios.

The source code below shows how we create the request object for the upload request.

 

    NSMutableURLRequest *request = [self requestWithMethod:@"PUT" path:remoteDestination parameters:nil];

    [request setTimeoutInterval:k_timeout_upload];

    [request setValue:[NSString stringWithFormat:@"%lld", [UtilsFramework getSizeInBytesByPath:localSource]] forHTTPHeaderField:@"Content-Length"];

    [request setCachePolicy:NSURLRequestUseProtocolCachePolicy];

 

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...