[GH-ISSUE #5919] [Feature Request / Question] Windows: wireguard-nt support for improved kernel-mode performance? #11285

Open
opened 2026-08-05 01:29:10 -04:00 by saavagebueno · 0 comments
Owner

Originally created by @Dual-0 on GitHub (Apr 18, 2026).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/5919

Hi! I've been looking into NetBird's Windows and had a question / feature request around potentially using wireguard-nt (wireguard.dll) on Windows for better performance.

What I observed in the codebase

From what I read so far, it looks like the following:

  • client/iface/device/device_windows.go creates the TUN interface via tun.CreateTUNWithRequestedGUID, which uses Wintun (wintun.dll)
  • WireGuard packet handling runs in userspace via device.NewDevice (wireguard-go)
  • go.mod lists golang.zx2c4.com/wintun v0.0.0-20230126152724-0fa3db229ce2 as a dependency

So on Windows, NetBird currently runs WireGuard in userspace + Wintun.

Idea

wireguard-nt (wireguard.dll) is a in-kernel WireGuard implementation for Windows, which can be used with the official WireGuard for Windows app. Unlike Wintun (which is just a TUN adapter), wireguard-nt handles WireGuard crypto and packet processing entirely in the NT kernel.

I know this is not a drop-in replacement for wintun.dll.

Questions

  1. Is kernel-mode WireGuard on Windows something that has been considered? The NB_WG_KERNEL_DISABLED environment variable exists, which suggests a kernel/userspace distinction — but I think, that this appears only to Linux. Is that correct or is there a Windows kernel path I missed?

  2. Is the architecture compatible? NetBird's NAT traversal and relay fallback appear to be deeply integrated at the userspace WireGuard layer. Would it be possible to retain this with a kernel-mode WireGuard driver or would that be a fundamental blocker?

  3. Are there any plans or prior discussions around this? I didn't find any existing issues on this topic.

Is it worth it?

The wireguard-nt project documents significant performance improvements over wireguard-go + Wintun, particularly in WiFi scenarios. I am coming from direct wireguard on Windows and have very good experiences with wireguard-nt. I think this could be meaningful for Windows users.

Originally created by @Dual-0 on GitHub (Apr 18, 2026). Original GitHub issue: https://github.com/netbirdio/netbird/issues/5919 Hi! I've been looking into NetBird's Windows and had a question / feature request around potentially using [wireguard-nt](https://git.zx2c4.com/wireguard-nt/about/) (`wireguard.dll`) on Windows for better performance. **What I observed in the codebase** From what I read so far, it looks like the following: - `client/iface/device/device_windows.go` creates the TUN interface via `tun.CreateTUNWithRequestedGUID`, which uses **Wintun** (`wintun.dll`) - WireGuard packet handling runs in **userspace** via `device.NewDevice` (wireguard-go) - `go.mod` lists `golang.zx2c4.com/wintun v0.0.0-20230126152724-0fa3db229ce2` as a dependency So on Windows, NetBird currently runs WireGuard in **userspace + Wintun**. **Idea** [wireguard-nt](https://git.zx2c4.com/wireguard-nt/about/) (`wireguard.dll`) is a in-kernel WireGuard implementation for Windows, which can be used with the official WireGuard for Windows app. Unlike Wintun (which is just a TUN adapter), wireguard-nt handles WireGuard crypto and packet processing entirely in the NT kernel. I know this is not a drop-in replacement for `wintun.dll`. **Questions** 1. **Is kernel-mode WireGuard on Windows something that has been considered?** The `NB_WG_KERNEL_DISABLED` environment variable exists, which suggests a kernel/userspace distinction — but I think, that this appears only to Linux. Is that correct or is there a Windows kernel path I missed? 2. **Is the architecture compatible?** NetBird's NAT traversal and relay fallback appear to be deeply integrated at the userspace WireGuard layer. Would it be possible to retain this with a kernel-mode WireGuard driver or would that be a fundamental blocker? 3. **Are there any plans or prior discussions around this?** I didn't find any existing issues on this topic. **Is it worth it?** The wireguard-nt project documents significant performance improvements over wireguard-go + Wintun, particularly in WiFi scenarios. I am coming from direct wireguard on Windows and have very good experiences with wireguard-nt. I think this could be meaningful for Windows users.
saavagebueno added the feature-request label 2026-08-05 01:29:10 -04:00
Sign in to join this conversation.
No Label feature-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#11285