1

I am writing an application in Go that will use WireGuard tunnels to communicate. I want to embed WireGuard within the application rather than install the separate WireGuard program. I understand that I can use wireguard.dll and tunnel.dll to embed in a general application. But given my app is also written in Go, is this still the right way to go? Or should I be calling go libraries from within the WireGuard-Windows program instead?

The documentation is minimal and is mostly non-Go based. Does this approach still apply in a Go scenario?

PrecisionPete
  • 3,139
  • 5
  • 33
  • 52
  • Hi, Just curious , why would you use tunnels inside an application and not just open SSL/TLS socket ? Thanks – Alex Levit Jun 21 '22 at 08:37
  • My application is providing a management layer for the wireguard VPN tunnels themselves. i.e. the VPN is for general use by the PC. – PrecisionPete Jun 22 '22 at 03:11

1 Answers1

0

You could use the zx2c4 wireguard-go module, (wireguard-windows uses wireguard-go as a module)

You can see an example in main_windows.go: while wireguard-windows remains the full-fledge Wireguard Windows client, this give you an illustration for calling Wireguard from a Go program.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250