Post

Replies

Boosts

Views

Activity

VPN start fail (some devices, sometimes)
APP start VPN process code: BOOL suc = [self.providerManager.connection startVPNTunnelWithOptions:options andReturnError:&startError];  if (startError) {   SLTunWarn(@"start tun error %@ %@", startError, startError.localizedDescription);   SLAPPError *err = (SLAPPError *)[SLAPPError fromSystemError:startError];   callback(err);   return;  }  SLTunInfo(@"call startTunnelWithOptions success, start wait tun status"); startVPNTunnelWithOptions return success, and then the app log is [TUN] system notify: [Disconnect] [TUN] sys tun status [1]=>[2] [TUN] system notify: [Connecting] [TUN] system notify: [Connecting] [TUN] system notify: [Connecting] [TUN] sys tun status [2]=>[1] can see that VPN state changed, from disconnect to connecting and finally disconnect VPN Process Code: - (instancetype)init {  self = [super init];  if (self) {   [[SLEGlobalData shared] onLaunch];   NSLog(@"PacketTunnelProvider init");   self.wormhole = [SLEWormhole shared];  }  NSLog(@"init end");  return self; } the log "PacketTunnelProvider init" in init func shows, but not any other logs. So near certain startTunnelWithOptions not be called. And app process did not receive any errors. this problem occur occasionally。 Most of the time, VPN process start successfully. So Any suggestions?
7
0
1.5k
Oct ’21