Dump and expose WireGuard Go version info.
This commit is contained in:
parent
675a17f51a
commit
5e6f8d30bd
|
@ -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