Dump and expose WireGuard Go version info.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
2307bf25b5
commit
6cfab94713
|
@ -16,4 +16,6 @@
|
|||
- (BOOL) turnOnWithInterfaceName: (NSString *)interfaceName settingsString: (NSString *)settingsString;
|
||||
- (void) turnOff;
|
||||
|
||||
+ (NSString *)versionWireGuardGo;
|
||||
|
||||
@end
|
||||
|
|
|
@ -44,6 +44,7 @@ static void do_log(int level, const char *tag, const char *msg);
|
|||
|
||||
- (BOOL) turnOnWithInterfaceName: (NSString *)interfaceName settingsString: (NSString *)settingsString
|
||||
{
|
||||
os_log([WireGuardGoWrapper log], "WireGuard Go Version %{public}s", wgVersion());
|
||||
|
||||
wgSetLogger(do_log);
|
||||
|
||||
|
@ -61,6 +62,10 @@ static void do_log(int level, const char *tag, const char *msg);
|
|||
wgTurnOff(self.handle);
|
||||
}
|
||||
|
||||
+ (NSString *)versionWireGuardGo {
|
||||
return [NSString stringWithUTF8String:wgVersion()];
|
||||
}
|
||||
|
||||
+ (os_log_t)log {
|
||||
static os_log_t subLog = nil;
|
||||
static dispatch_once_t onceToken;
|
||||
|
|
Loading…
Reference in New Issue