VPN: Save the tunnel name when modifying a tunnel

This commit is contained in:
Roopesh Chander 2018-10-28 14:55:24 +05:30
parent 7d61385572
commit f2cbf10f72
1 changed files with 3 additions and 0 deletions

View File

@ -96,6 +96,9 @@ class TunnelsManager {
let tunnelProviderManager = tunnel.tunnelProvider
let isNameChanged = (tunnelName != tunnelProviderManager.localizedDescription)
if (isNameChanged) {
tunnel.name = tunnelName
}
tunnelProviderManager.protocolConfiguration = NETunnelProviderProtocol(tunnelConfiguration: tunnelConfiguration)
tunnelProviderManager.localizedDescription = tunnelName
tunnelProviderManager.isEnabled = true