我正在用 Go 编写一个应用程序,它将使用 WireGuard 隧道进行通信。我想将 WireGuard 嵌入应用程序中,而不是安装单独的 WireGuard 程序。我知道我可以使用wireguard.dll和tunnel.dll嵌入一般应用程序中。但鉴于我的应用程序也是用 Go 编写的,这仍然是正确的方法吗?或者我应该从 WireGuard-Windows 程序中调用 go 库?
文档很少,并且大部分不是基于 Go 的。这种方法在 Go 场景中还适用吗?
最佳答案
您可以使用zx2c4 wireguard-go
module ,( wireguard-windows
使用 wireguard-go
作为模块)
您可以在 main_windows.go
中查看示例:虽然 wireguard-windows
仍然是成熟的 Wireguard Windows 客户端,但这为您提供了从 Go 程序调用 Wireguard 的说明。
关于go - 将 WireGuard 嵌入到 Windows 上的 Go 应用程序中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69846561/