diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-08-29 16:16:48 -0600 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-08-30 08:47:21 -0600 |
commit | b70b012bc692477fdf51b09627c6a7333265ee31 (patch) | |
tree | 18badadf8bdf1b77b93932b947a352e5591ddf2b /version/useragent.go | |
parent | version: use ProductName and ProductVersion as strings (diff) | |
download | wireguard-windows-b70b012bc692477fdf51b09627c6a7333265ee31.tar.xz wireguard-windows-b70b012bc692477fdf51b09627c6a7333265ee31.zip |
version: hard code name and version at compile time
We really do want the true name and version in logs so that external
consumers have a good reference point for helping us debug.
We can then do the log file directory explicitly.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'version/useragent.go')
-rw-r--r-- | version/useragent.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/version/useragent.go b/version/useragent.go index 52fb5c83..1c1adf55 100644 --- a/version/useragent.go +++ b/version/useragent.go @@ -10,7 +10,11 @@ import ( "runtime" ) +// #include "version.h" +import "C" + +const Number = C.WIREGUARD_WINDOWS_VERSION_STRING + func UserAgent() string { - name, ver := RunningNameVersion() - return fmt.Sprintf("%s/%s (%s; %s)", name, ver, OsName(), runtime.GOARCH) + return fmt.Sprintf("WireGuard/%s (%s; %s)", Number, OsName(), runtime.GOARCH) } |