diff options
Diffstat (limited to 'version/version.go')
-rw-r--r-- | version/version.go | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/version/version.go b/version/version.go new file mode 100644 index 00000000..951d2731 --- /dev/null +++ b/version/version.go @@ -0,0 +1,20 @@ +/* SPDX-License-Identifier: MIT + * + * Copyright (C) 2019 WireGuard LLC. All Rights Reserved. + */ + +package version + +// #include "../version.h" +import "C" +import ( + "fmt" + "golang.zx2c4.com/wireguard/device" + "runtime" +) + +const WireGuardWindowsVersion = C.WIREGUARD_WINDOWS_VERSION + +func UserAgent() string { + return fmt.Sprintf("WireGuard/%s (wireguard-go %s; %s; %s; %s)", WireGuardWindowsVersion, device.WireGuardGoVersion, OsName(), runtime.Version(), runtime.GOARCH) +} |