Embedding WireGuard in Custom Applications
The WireGuard Project's client applications have been designed with maximum reusability in mind, such that it is possible to create custom applications that use WireGuard. The story is slightly different on different platforms, and this page attempts to summarize what the project has available.
If you're a sysadmin simply trying to script existing WireGuard clients, this page is not for you. Instead, check out documentation of the
wg-quick(8) tools in addition to the Windows enterprise management guide.
macOS & iOS: WireGuardKit
Both macOS and iOS provide WireGuardKit from the same repository, allowing for easy integration using Swift PM.
Android provides the com.wireguard.android:tunnel library on Maven Central with extensive class documentation and a blurb for gradle.
The wireguard-tools package contains a single-file C library for use interacting with the kernel.
The wgctrl-go project allows creating and manipulating WireGuard configurations from Go.
Linux: NetworkManager, Systemd, connmann
NetworkManager, Systemd, and connman each have full WireGuard support, which can be manipulated using their respective dbus APIs.