WireGuardKit: Change getWireGuardVersion() -> wireGuardVersion

Signed-off-by: Andrej Mihajlov <and@mullvad.net>
This commit is contained in:
Andrej Mihajlov 2020-12-02 13:38:38 +01:00
parent ef7de2500f
commit a6858bd126
4 changed files with 4 additions and 5 deletions

View File

@ -50,8 +50,7 @@ public class Logger {
if let appBuild = Bundle.main.infoDictionary?["CFBundleVersion"] as? String {
appVersion += " (\(appBuild))"
}
let goBackendVersion = getWireGuardVersion()
Logger.global?.log(message: "App version: \(appVersion); Go backend version: \(goBackendVersion)")
Logger.global?.log(message: "App version: \(appVersion); Go backend version: \(wireGuardVersion)")
}
}

View File

@ -209,7 +209,7 @@ extension AppDelegate {
}
let appVersionString = [
tr(format: "macAppVersion (%@)", appVersion),
tr(format: "macGoBackendVersion (%@)", getWireGuardVersion())
tr(format: "macGoBackendVersion (%@)", wireGuardVersion)
].joined(separator: "\n")
let donateString = NSMutableAttributedString(string: tr("donateLink"))
donateString.addAttribute(.link, value: "https://www.wireguard.com/donations/", range: NSRange(location: 0, length: donateString.length))

View File

@ -55,7 +55,7 @@ public class WireGuardAdapter {
return self.packetTunnelProvider?.packetFlow.value(forKeyPath: "socket.fileDescriptor") as? Int32
}
/// Returns a Wireguard version.
/// Returns a WireGuard version.
class var version: String {
return String(cString: wgVersion())
}

View File

@ -3,6 +3,6 @@
import Foundation
public func getWireGuardVersion() -> String {
public var wireGuardVersion: String {
return WireGuardAdapter.version
}