BadvpnTun2socks for iOS Xcode project
- Include the header file in your project
#import <BadvpnTun2socks/TunnelInterface.h>
- In method
startTunnelWithOptions:completionHandler:
of yourNEPacketTunnelProvider
subclass, start the tunnel interface
NSError* error2 = [[TunnelInterface sharedInterface] startTun2Socks:(int)self->_s5_port withPacketTunnelFlow:self.packetFlow];
if (error2) {
completionHandler(error2);
return;
}
- In method
stopTunnelWithReason:completionHandler:
of yourNEPacketTunnelProvider
subclass, stop the tunnel interface
[[TunnelInterface sharedInterface] stopTun2Socks];