macOS: Exclude private IPs

Signed-off-by: Roopesh Chander <roop@roopc.net>
This commit is contained in:
Roopesh Chander
2019-02-16 18:25:17 +05:30
parent a355232e09
commit 5031a7db4c
3 changed files with 61 additions and 0 deletions
@@ -547,6 +547,14 @@ class TunnelViewModel {
}
}
func asWgQuickConfig() -> String? {
let saveResult = save()
if case .saved(let tunnelConfiguration) = saveResult {
return tunnelConfiguration.asWgQuickConfig()
}
return nil
}
@discardableResult
func applyConfiguration(other: TunnelConfiguration) -> Changes {
// Replaces current data with data from other TunnelConfiguration, ignoring any changes in peer ordering.