WireGuardKit: Change getWireGuardVersion() -> wireGuardVersion
Signed-off-by: Andrej Mihajlov <and@mullvad.net>
This commit is contained in:
parent
ef7de2500f
commit
a6858bd126
|
@ -50,8 +50,7 @@ public class Logger {
|
||||||
if let appBuild = Bundle.main.infoDictionary?["CFBundleVersion"] as? String {
|
if let appBuild = Bundle.main.infoDictionary?["CFBundleVersion"] as? String {
|
||||||
appVersion += " (\(appBuild))"
|
appVersion += " (\(appBuild))"
|
||||||
}
|
}
|
||||||
let goBackendVersion = getWireGuardVersion()
|
Logger.global?.log(message: "App version: \(appVersion); Go backend version: \(wireGuardVersion)")
|
||||||
Logger.global?.log(message: "App version: \(appVersion); Go backend version: \(goBackendVersion)")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -209,7 +209,7 @@ extension AppDelegate {
|
||||||
}
|
}
|
||||||
let appVersionString = [
|
let appVersionString = [
|
||||||
tr(format: "macAppVersion (%@)", appVersion),
|
tr(format: "macAppVersion (%@)", appVersion),
|
||||||
tr(format: "macGoBackendVersion (%@)", getWireGuardVersion())
|
tr(format: "macGoBackendVersion (%@)", wireGuardVersion)
|
||||||
].joined(separator: "\n")
|
].joined(separator: "\n")
|
||||||
let donateString = NSMutableAttributedString(string: tr("donateLink"))
|
let donateString = NSMutableAttributedString(string: tr("donateLink"))
|
||||||
donateString.addAttribute(.link, value: "https://www.wireguard.com/donations/", range: NSRange(location: 0, length: donateString.length))
|
donateString.addAttribute(.link, value: "https://www.wireguard.com/donations/", range: NSRange(location: 0, length: donateString.length))
|
||||||
|
|
|
@ -55,7 +55,7 @@ public class WireGuardAdapter {
|
||||||
return self.packetTunnelProvider?.packetFlow.value(forKeyPath: "socket.fileDescriptor") as? Int32
|
return self.packetTunnelProvider?.packetFlow.value(forKeyPath: "socket.fileDescriptor") as? Int32
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns a Wireguard version.
|
/// Returns a WireGuard version.
|
||||||
class var version: String {
|
class var version: String {
|
||||||
return String(cString: wgVersion())
|
return String(cString: wgVersion())
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,6 @@
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public func getWireGuardVersion() -> String {
|
public var wireGuardVersion: String {
|
||||||
return WireGuardAdapter.version
|
return WireGuardAdapter.version
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue