Move logic to extension: Invoke startTunnel() without any options
This commit is contained in:
parent
f438f3ef6b
commit
c7cad030aa
|
@ -345,11 +345,8 @@ class TunnelContainer: NSObject {
|
||||||
startObservingTunnelStatus()
|
startObservingTunnelStatus()
|
||||||
let session = (tunnelProvider.connection as! NETunnelProviderSession)
|
let session = (tunnelProvider.connection as! NETunnelProviderSession)
|
||||||
do {
|
do {
|
||||||
os_log("startActivation: Generating options", log: OSLog.default, type: .debug)
|
|
||||||
let tunnelOptions = PacketTunnelOptionsGenerator.generateOptions(
|
|
||||||
from: tunnelConfiguration, withResolvedEndpoints: resolvedEndpoints)
|
|
||||||
os_log("startActivation: Starting tunnel", log: OSLog.default, type: .debug)
|
os_log("startActivation: Starting tunnel", log: OSLog.default, type: .debug)
|
||||||
try session.startTunnel(options: tunnelOptions)
|
try session.startTunnel()
|
||||||
os_log("startActivation: Success", log: OSLog.default, type: .debug)
|
os_log("startActivation: Success", log: OSLog.default, type: .debug)
|
||||||
completionHandler(nil)
|
completionHandler(nil)
|
||||||
} catch (let error) {
|
} catch (let error) {
|
||||||
|
|
Loading…
Reference in New Issue