defguard_wireguard_rs is a multi-platform Rust library providing a unified high-level API for managing WireGuard interfaces using native OS kernel and userspace WireGuard protocol implementations. It can be used to create your own WireGuard:tm: VPN servers or clients for secure and private networking.
It was developed as part of defguard security platform and used in the gateway/server as well as desktop client.
- Native OS Kernel
- Linux
- FreeBSD (and pfSense/OPNSense)
- Windows (in development)
- Userspace using wireguard-go
- Linux
- macOS
- FreeBSD
If you intend to use the userspace WireGuard implementation you should note that currently the library assumes
that the wireguard-go
binary will be available at runtime. There are some sanity checks when instantiating the API,
but installing it is outside the scope of this project.
- Client: https://github.com/DefGuard/wireguard-rs/blob/main/examples/client.rs
- Server: https://github.com/DefGuard/wireguard-rs/blob/main/examples/server.rs
See the documentation for more information.
Find us on Matrix: #defguard:teonite.com
Please review the Contributing guide for information on how to get started contributing to the project. You might also find our environment setup guide handy.
WireGuard is registered trademarks of Jason A. Donenfeld.