From 36d14fc7806c0bbdfebf0b169dd1361b9e0bed47 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Mon, 9 Aug 2021 22:44:15 +0200 Subject: embeddable-dll-service: use wgnt always Signed-off-by: Jason A. Donenfeld --- embeddable-dll-service/README.md | 2 +- embeddable-dll-service/csharp/README.md | 8 +------- embeddable-dll-service/main.go | 1 + 3 files changed, 3 insertions(+), 8 deletions(-) (limited to 'embeddable-dll-service') diff --git a/embeddable-dll-service/README.md b/embeddable-dll-service/README.md index aeb80eba..9e05ab56 100644 --- a/embeddable-dll-service/README.md +++ b/embeddable-dll-service/README.md @@ -1,6 +1,6 @@ ## Embeddable WireGuard Tunnel Library -This allows embedding WireGuard as a service inside of another application. Build `tunnel.dll` by running `./build.bat` in this folder. The first time you run it, it will invoke `..\build.bat` simply for downloading dependencies. After, you should have `amd64/tunnel.dll`, `x86/tunnel.dll`, and `arm64/tunnel.dll`. In addition, `tunnel.dll` requires `wintun.dll`, which can be downloaded from [wintun.net](https://www.wintun.net), and `wireguard.dll`, which can be downloaded from [the wireguard-nt download server](https://download.wireguard.com/wireguard-nt/). +This allows embedding WireGuard as a service inside of another application. Build `tunnel.dll` by running `./build.bat` in this folder. The first time you run it, it will invoke `..\build.bat` simply for downloading dependencies. After, you should have `amd64/tunnel.dll`, `x86/tunnel.dll`, and `arm64/tunnel.dll`. In addition, `tunnel.dll` requires `wireguard.dll`, which can be downloaded from [the wireguard-nt download server](https://download.wireguard.com/wireguard-nt/). The basic setup to use `tunnel.dll` is: diff --git a/embeddable-dll-service/csharp/README.md b/embeddable-dll-service/csharp/README.md index 39542f3d..24b36563 100644 --- a/embeddable-dll-service/csharp/README.md +++ b/embeddable-dll-service/csharp/README.md @@ -4,10 +4,4 @@ This is a simple client for demo.wireguard.com, which brings up WireGuard tunnel ## Building -The code in this repository can be built in Visual Studio 2019 by opening the .sln and pressing build. However, it requires [`tunnel.dll` and its dependencies](../README.md) to be present in the run directory. That can be built by: - -```batch -> git clone https://git.zx2c4.com/wireguard-windows -> cd wireguard-windows\embeddable-dll-service -> .\build.bat -``` +The code in this repository can be built in Visual Studio 2019 by opening the .sln and pressing build. However, it requires [`tunnel.dll` and `wireguard.dll`](../README.md). diff --git a/embeddable-dll-service/main.go b/embeddable-dll-service/main.go index df63034e..ee2f0ce1 100644 --- a/embeddable-dll-service/main.go +++ b/embeddable-dll-service/main.go @@ -25,6 +25,7 @@ func WireGuardTunnelService(confFile16 *uint16) bool { confFile := windows.UTF16PtrToString(confFile16) conf.PresetRootDirectory(filepath.Dir(confFile)) tunnel.UseFixedGUIDInsteadOfDeterministic = true + tunnel.ForceImplementation = 1 err := tunnel.Run(confFile) if err != nil { log.Printf("Service run error: %v", err) -- cgit v1.2.3-59-g8ed1b