Post

Replies

Boosts

Views

Activity

Comment on Packet Tunnel Provider - sleep
Hi Quinn - I am trying to implement 'disconnectOnSleep' = false so that I can control the quiesce / resume of the tunnel. But sleep and wake are not being called. I have removed the VPN profile and restarted, which should have taken the new setting: // In the container code proto.serverAddress = "104.196.39.114" proto.disconnectOnSleep = false // In the tunnel code public override func wake() { log.info("Waking Up....") sleeping = false } public override func sleep(completionHandler: @escaping () -> Void) { log.info("Preparing to sleep...") sleeping = true completionHandler() }
Oct ’21
Comment on Packet Tunnel Provider - sleep
Hi Quinn: Let's say that when wake() is called, I am temporarily unable to resume the tunnel, for whatever reason. If I call cancelTunnel(), can I then later try to call startTunnel from within my provider? Or is cancelTunnel() the end of the line and the user has to restart from the container app? What is the proper way (if there is one) to quiesce the tunnel in such a way that the tunnel is no longer capturing traffic in either direction, in other words the device can route traffic normally outside the tunnel until I re-setup my links, set the downstream read handlers, and start the upstream traffic pump?
Oct ’21